Changes between Version 8 and Version 9 of pjsip-doc/call


Ignore:
Timestamp:
Jul 3, 2018 3:30:59 AM (6 years ago)
Author:
ming
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pjsip-doc/call

    v8 v9  
    7171Call Disconnection 
    7272------------------- 
    73 Call disconnection event is a special event since once the callback that reports this event returns, the call is no longer valid and any operations invoked to the call object will raise error exception. Thus, it is recommended to delete the call object inside the callback. 
     73Call disconnection event is a special event since once the callback that reports this event returns, the call is no longer valid. Thus, you should not invoke any operations to the call object, otherwise it will raise an error exception. To delete the call object, it is recommended to schedule/dispatch it to another (registered) thread, such as the main thread or worker thread, instead of deleting it inside the callback. 
    7474 
    7575The call disconnection is reported in ​onCallState() method of ​Call and it can be detected as follows: 
     
    8181        CallInfo ci = getInfo(); 
    8282        if (ci.state == PJSIP_INV_STATE_DISCONNECTED) { 
    83             /* Delete the call */ 
    84             delete this; 
     83            /* Schedule/Dispatch call deletion to another thread here */ 
     84            del_call_scheduled = true; 
    8585        } 
    8686    }