Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: call_manager.cpp
- Revision:
- 115:a1e1e2e60a2c
- Parent:
- 114:472502b31a12
- Child:
- 116:39a41ebb675c
diff -r 472502b31a12 -r a1e1e2e60a2c call_manager.cpp --- a/call_manager.cpp Mon Apr 20 14:40:09 2015 +0000 +++ b/call_manager.cpp Thu Apr 23 13:57:54 2015 +0000 @@ -18,7 +18,6 @@ if( cb->get_invite_response() == false ){ invite_pkg_retry_timer.reset(); - //cb->set_msg_id( cb->get_msg_id() & ~BIT7 ); cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); send2callboxes( __build_cb_package__( cb->get_ext(), cb->get_port(), __INVITE__, ( char * )data, @@ -37,7 +36,6 @@ if( cb->get_bye_response() == false ){ bye_pkg_retry_timer.reset(); - //cb->set_msg_id( cb->get_msg_id() & ~BIT7 ); cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); send2callboxes( __build_cb_package__( cb->get_ext(), cb->get_port(), __CB_BYE__, ( char * )data, @@ -78,16 +76,12 @@ ts->return_timeslice( cb->get_timeslice() ); cb->set_timeslice( 0x00 ); data[ __TIMESLICE_PLACE__ ] = 0x00; -// cb->set_msg_id( ( cb->get_msg_id() & ~BIT7 ) + 1 ); cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); send2callboxes( __build_cb_package__( cb->get_ext(), cb->get_port(), __CB_BYE__, ( char * )data, cb->get_msg_id(), __CB_BUFFER_SIZE__ - __VZ_HEADER_OFFSET__, write_buffer ) ); cb->send_bye(); set_status( cb->sip->status, sip_idle ); - //cb->re_start_timer(); cb -> reset_cb_status(); - //cb -> set_rtp_port ( 0 ); - //cb -> reset_rtp_timer (); } delete( call ); } @@ -99,9 +93,6 @@ uint8_t write_buffer[ __CB_BUFFER_SIZE__ ]; if( inviting_cb != NULL ){ - //if( inviting_cb->status != cb_on_call ){ - - //} if( inviting_cb->status == cb_idle ){ inviting_cb->cb_set_status( cb_trying ); if( debug_invite ) debug_msg("Request invite cbx status :: cb_trying" ); @@ -133,7 +124,6 @@ set_status( cb->sip->status, sip_idle ); - //cb->set_msg_id( ( cb->get_msg_id() & ~BIT7 ) + 1 ); cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); if( debug_invite ) debug_msg( "-- Trying -- without TS --"); @@ -146,7 +136,6 @@ cb->set_invite_response_pending(); - //cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ( ~BIT7 ) ); cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); send2callboxes( __build_cb_package__( ext, port, __INVITE__, @@ -171,12 +160,10 @@ data[ __TIMESLICE_PLACE__ ] = cb->get_timeslice(); - //cb->set_msg_id( ( cb->get_msg_id() & ~BIT7 ) + 1 ); cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); send2callboxes( __build_cb_package__( ext, port, __INVITE__, ( char * )data, cb->get_msg_id(), __CB_BUFFER_SIZE__ - __VZ_HEADER_OFFSET__, write_buffer ) ); - //debug_msg("send ok liga o mic"); cb->set_invite_response_pending(); @@ -193,7 +180,6 @@ data[ __TIMESLICE_PLACE__ ] = 0x00; if( debug_invite ) debug_msg("-- %d on %d --", cb->get_ext(), data[ __TIMESLICE_PLACE__ ] ); - //cb->set_msg_id( ( cb->get_msg_id() & ~BIT7 ) + 1 ); cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); send2callboxes( __build_cb_package__( ext, port, __CB_BYE__, @@ -212,7 +198,6 @@ cb->send_bye(); set_status( cb->sip->status, sip_idle ); - //cb->re_start_timer(); }break; case cb_denied : { ts->return_timeslice( cb->get_timeslice() ); @@ -220,7 +205,6 @@ data[ __TIMESLICE_PLACE__ ] = 0x00; if( debug_invite ) debug_msg("-- %d on %d --", cb->get_ext(), data[ __TIMESLICE_PLACE__ ] ); - //cb->set_msg_id( ( cb->get_msg_id() & ~BIT7 ) + 1 ); cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); send2callboxes( __build_cb_package__( ext, port, __CB_BYE__, @@ -234,7 +218,6 @@ break; } } - //cb->re_start_timer(); if( debug_invite ) debug_msg( "-- Trying -- denying call request --" ); set_status( cb->status, cb_idle ); set_status( cb->sip->status, sip_idle );