[pjsip] Uncatchable termination canceling call in early state

Tanny pjsip at blog22.com
Sun Apr 3 02:57:06 EDT 2016

I am using pjsua2 with python 2.7, in single-threaded mode:

ep_cfg.uaConfig.threadCnt = 0
ep_cfg.uaConfig.mainThreadOnly = True

I initiate two outgoing phone calls though my ISP, and when the first 
call is answered, I attempt to cancel the second, unanswered call, like 


This initially seems to work, the hangup() invocation returns and the 
call becomes DISCONNECTED, but then my application prints these messages 
and terminates:

23:24:12.655 sip_transactio  ...Unable to register CANCEL transaction 
(key exists)
23:24:12.663   pjsua_call.c  .Failed to send end session message: Object 
already exists (PJ_EEXISTS) [status=70015]
23:24:12.663       call.cpp  pjsua_call_hangup(id, prm.statusCode, 
param.p_reason, param.p_msg_data) error: Object already exists 
(PJ_EEXISTS) (status=70015) [../src/pjsua2/call.cpp:501]
terminate called after throwing an instance of 'pj::Error'

... and there is nothing I can do to catch the exception and recover.  
Any advice on how to cancel a call while in early state will be greatly 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20160402/429c6e40/attachment-0002.html>

More information about the pjsip mailing list