pjsip video call :hangup videocall will block thread when network disconnected

W
weili.wu
Thu, Aug 17, 2017 9:32 AM

hi,

I have a iOS chat application developed by oc.I'm currently using pjsip https://github.com/pjsip/pjproject library(version:2.6) to register to a SIP server using PJSIP.I use pjsua_call_make_call to make videoCall,and use pjsua_call_hangup to hangup call.when network is reachable,everything is ok .This is a problem when network disconnected. Below are steps to reproduce(audiocall is ok and i have search similar problems but no results) :

make videoCall to other,other answer 200 to the call to change videoCall state to confirmed
i disconnected network
i hangup videocall
then issue appear:thread will be blocked, can not do anything!

below are log:

2017-08-17 16:22:57.703826+0800 ipjsua[706:379759] 16:22:57.703  pjsua_media.c  ........Call 0: deinitializing media..
2017-08-17 16:22:57.704065+0800 ipjsua[706:379759] 16:22:57.704  pjsua_media.c  ..........Media stream call00:0 is destroyed
2017-08-17 16:22:57.704105+0800 ipjsua[706:379759] 16:22:57.704    pjsua_vid.c  ..........Stopping video stream..
2017-08-17 16:22:57.735486+0800 ipjsua[706:379759] 16:22:57.735  darwin_dev.m  ...........Stopping Darwin video stream
2017-08-17 16:22:57.800198+0800 ipjsua[706:379759] 16:22:57.800    pjsua_vid.c  ...........Window 1: destroying..
2017-08-17 16:22:57.800319+0800 ipjsua[706:379759] 16:22:57.800    vid_port.c  ............Closing Front Camera..

if network is reachable,log will be :

2017-08-17 17:26:16.091366+0800 ipjsua[724:388461] 17:26:16.091  pjsua_media.c  .......Media stream call00:0 is destroyed
2017-08-17 17:26:16.091435+0800 ipjsua[724:388461] 17:26:16.091    pjsua_vid.c  .......Stopping video stream..
2017-08-17 17:26:16.100753+0800 ipjsua[724:388461] 17:26:16.100  darwin_dev.m !........Stopping Darwin video stream
2017-08-17 17:26:16.157440+0800 ipjsua[724:388461] 17:26:16.156    pjsua_vid.c  ........Window 1: destroying..
2017-08-17 17:26:16.159050+0800 ipjsua[724:388461] 17:26:16.158    vid_port.c  .........Closing Front Camera..
2017-08-17 17:26:16.163967+0800 ipjsua[724:388461] 17:26:16.163 ios_opengl_dev  ........Stopping ios opengl stream
2017-08-17 17:26:16.164191+0800 ipjsua[724:388461] 17:26:16.164    pjsua_vid.c  ........Window 0: destroying..
2017-08-17 17:26:16.164370+0800 ipjsua[724:388461] 17:26:16.164 ios_opengl_dev  .........Stopping ios opengl stream
2017-08-17 17:26:16.164505+0800 ipjsua[724:388461] 17:26:16.164    vid_port.c  .........Closing OpenGL renderer..
2017-08-17 17:26:16.181862+0800 ipjsua[724:388461] 17:26:16.181  pjsua_media.c  .......Media stream call00:1 is destroyed
2017-08-17 17:26:17.092319+0800 ipjsua[724:388461] 17:26:17.091    pjsua_aud.c  Closing sound device after idle for 1 second(s)
2017-08-17 17:26:17.092553+0800 ipjsua[724:388461] 17:26:17.092    pjsua_app.c  .Turning sound device OFF
2017-08-17 17:26:17.095616+0800 ipjsua[724:388461] 17:26:17.095    pjsua_aud.c  .Closing iPhone IO device sound playback device and iPhone IO device sound capture device
2017-08-17 17:26:17.138181+0800 ipjsua[724:388461] 17:26:17.137 coreaudio_dev.  .core audio stream stopped

Thank you.

Best regards,

hi, I have a iOS chat application developed by oc.I'm currently using pjsip <https://github.com/pjsip/pjproject> library(version:2.6) to register to a SIP server using PJSIP.I use pjsua_call_make_call to make videoCall,and use pjsua_call_hangup to hangup call.when network is reachable,everything is ok .This is a problem when network disconnected. Below are steps to reproduce(audiocall is ok and i have search similar problems but no results) : make videoCall to other,other answer 200 to the call to change videoCall state to confirmed i disconnected network i hangup videocall then issue appear:thread will be blocked, can not do anything! below are log: 2017-08-17 16:22:57.703826+0800 ipjsua[706:379759] 16:22:57.703 pjsua_media.c ........Call 0: deinitializing media.. 2017-08-17 16:22:57.704065+0800 ipjsua[706:379759] 16:22:57.704 pjsua_media.c ..........Media stream call00:0 is destroyed 2017-08-17 16:22:57.704105+0800 ipjsua[706:379759] 16:22:57.704 pjsua_vid.c ..........Stopping video stream.. 2017-08-17 16:22:57.735486+0800 ipjsua[706:379759] 16:22:57.735 darwin_dev.m ...........Stopping Darwin video stream 2017-08-17 16:22:57.800198+0800 ipjsua[706:379759] 16:22:57.800 pjsua_vid.c ...........Window 1: destroying.. 2017-08-17 16:22:57.800319+0800 ipjsua[706:379759] 16:22:57.800 vid_port.c ............Closing Front Camera.. if network is reachable,log will be : 2017-08-17 17:26:16.091366+0800 ipjsua[724:388461] 17:26:16.091 pjsua_media.c .......Media stream call00:0 is destroyed 2017-08-17 17:26:16.091435+0800 ipjsua[724:388461] 17:26:16.091 pjsua_vid.c .......Stopping video stream.. 2017-08-17 17:26:16.100753+0800 ipjsua[724:388461] 17:26:16.100 darwin_dev.m !........Stopping Darwin video stream 2017-08-17 17:26:16.157440+0800 ipjsua[724:388461] 17:26:16.156 pjsua_vid.c ........Window 1: destroying.. 2017-08-17 17:26:16.159050+0800 ipjsua[724:388461] 17:26:16.158 vid_port.c .........Closing Front Camera.. 2017-08-17 17:26:16.163967+0800 ipjsua[724:388461] 17:26:16.163 ios_opengl_dev ........Stopping ios opengl stream 2017-08-17 17:26:16.164191+0800 ipjsua[724:388461] 17:26:16.164 pjsua_vid.c ........Window 0: destroying.. 2017-08-17 17:26:16.164370+0800 ipjsua[724:388461] 17:26:16.164 ios_opengl_dev .........Stopping ios opengl stream 2017-08-17 17:26:16.164505+0800 ipjsua[724:388461] 17:26:16.164 vid_port.c .........Closing OpenGL renderer.. 2017-08-17 17:26:16.181862+0800 ipjsua[724:388461] 17:26:16.181 pjsua_media.c .......Media stream call00:1 is destroyed 2017-08-17 17:26:17.092319+0800 ipjsua[724:388461] 17:26:17.091 pjsua_aud.c Closing sound device after idle for 1 second(s) 2017-08-17 17:26:17.092553+0800 ipjsua[724:388461] 17:26:17.092 pjsua_app.c .Turning sound device OFF 2017-08-17 17:26:17.095616+0800 ipjsua[724:388461] 17:26:17.095 pjsua_aud.c .Closing iPhone IO device sound playback device and iPhone IO device sound capture device 2017-08-17 17:26:17.138181+0800 ipjsua[724:388461] 17:26:17.137 coreaudio_dev. .core audio stream stopped Thank you. Best regards,