简体   繁体   中英

How to hang up call in pjsip while its ringing

I am working on iOS VOIP app using pjsip. I am able to make call and also able to hang up answered call but the problem is I can't hangup call when it is in its ringing state. So if anyone has any idea about it then please help.

You can't call pjsua_call_hangup on a call that hasn't been established state yet. This is a sip part of the sip protocol.

What you do is send a response with a rejection status code. So in pjsip you call pjsua_call_answer with a status code of something like 486 (busy here) or 603 (decline). This will effectively "hangup" your ringing leg of the call. You could also return a status code of 600 (busy everywhere) if you want all ringing legs to be released (assuming the sip proxy handles this status code correctly).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM