Changes between Version 8 and Version 9 of pjsip-doc/call
- Timestamp:
- Jul 3, 2018 3:30:59 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pjsip-doc/call
v8 v9 71 71 Call Disconnection 72 72 ------------------- 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.73 Call 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. 74 74 75 75 The call disconnection is reported in onCallState() method of Call and it can be detected as follows: … … 81 81 CallInfo ci = getInfo(); 82 82 if (ci.state == PJSIP_INV_STATE_DISCONNECTED) { 83 /* Delete the call*/84 del ete this;83 /* Schedule/Dispatch call deletion to another thread here */ 84 del_call_scheduled = true; 85 85 } 86 86 }