SSL timeout

A
Alex
Sat, Jan 14, 2017 2:04 AM

Updated the iOS app this week from pjsip 2.3 to pjsip 2.5.5 (latest).

Now when I try to place a call on some devices, I get an SSL timeout. Currently using openssl 1.0.2h. This all work fine with pjsip 2.3 and the same openssl version.

Here is the list of devices with the test result:
-> iphone 4s ios 8.1 fails.
-> simulator iphone 5 ios 9.3 fails.
-> iphone 5 iOS 9.3.5 works
-> simulator iphone 5 ios 10.2 works.
-> simulator iphone 5s ios 9.3 works.
-> simulator iphone 5s ios 10.2 works.
-> iphone 6 ios 10.2 works
-> simulator iphone 7 ios 10.2 works

Is this a known issue? Looking at the opened tickets I could not find anything related. At the beginning I thought it was a 64 vs 32 bit issue, but after further testing it is not the case because some of those devices run on 32 bits and don’t experience the issue (for example iphone 5 ios 10.2).

Relevant logs:
19:51:28.599  tsx0x13828c64  ...State changed from Null to Calling, event=TX_MSG
19:51:28.599  dlg0x14885c64  ....Transaction tsx0x13828c64 state changed to Calling
19:51:28.599 AKSIPUserAgent  ......Call 0 state changed to CALLING
19:51:28.615  ssl0x15890e00  SSL timeout after 0.1s
19:51:28.615 tlsc0x1589d014  TLS connect() error: Operation timed out (PJ_ETIMEDOUT) [code=70009]
19:51:28.615  tsx0x13828c64  State changed from Calling to Terminated, event=TRANSPORT_ERROR
19:51:28.615  dlg0x14885c64  .Transaction tsx0x13828c64 state changed to Terminated
19:51:28.616 AKSIPUserAgent  ...Call 0 is DISCONNECTED [reason = 503 (Operation timed out (PJ_ETIMEDOUT))]
19:51:28.616  pjsua_media.c  ...Call 0: deinitializing media..
19:51:28.616  pjsua_media.c  ....Call 0: cleaning up provisional media, prov_med_cnt=1, med_cnt=0
19:51:28.616        icetp00  ....Stopping ICE, reason=media stop requested
19:51:28.616        icetp00  ....Destroying ICE session 0x18807614

Updated the iOS app this week from pjsip 2.3 to pjsip 2.5.5 (latest). Now when I try to place a call on some devices, I get an SSL timeout. Currently using openssl 1.0.2h. This all work fine with pjsip 2.3 and the same openssl version. Here is the list of devices with the test result: -> iphone 4s ios 8.1 fails. -> simulator iphone 5 ios 9.3 fails. -> iphone 5 iOS 9.3.5 works -> simulator iphone 5 ios 10.2 works. -> simulator iphone 5s ios 9.3 works. -> simulator iphone 5s ios 10.2 works. -> iphone 6 ios 10.2 works -> simulator iphone 7 ios 10.2 works Is this a known issue? Looking at the opened tickets I could not find anything related. At the beginning I thought it was a 64 vs 32 bit issue, but after further testing it is not the case because some of those devices run on 32 bits and don’t experience the issue (for example iphone 5 ios 10.2). Relevant logs: 19:51:28.599 tsx0x13828c64 ...State changed from Null to Calling, event=TX_MSG 19:51:28.599 dlg0x14885c64 ....Transaction tsx0x13828c64 state changed to Calling 19:51:28.599 AKSIPUserAgent ......Call 0 state changed to CALLING 19:51:28.615 ssl0x15890e00 SSL timeout after 0.1s 19:51:28.615 tlsc0x1589d014 TLS connect() error: Operation timed out (PJ_ETIMEDOUT) [code=70009] 19:51:28.615 tsx0x13828c64 State changed from Calling to Terminated, event=TRANSPORT_ERROR 19:51:28.615 dlg0x14885c64 .Transaction tsx0x13828c64 state changed to Terminated 19:51:28.616 AKSIPUserAgent ...Call 0 is DISCONNECTED [reason = 503 (Operation timed out (PJ_ETIMEDOUT))] 19:51:28.616 pjsua_media.c ...Call 0: deinitializing media.. 19:51:28.616 pjsua_media.c ....Call 0: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 19:51:28.616 icetp00 ....Stopping ICE, reason=media stop requested 19:51:28.616 icetp00 ....Destroying ICE session 0x18807614
AS
Alex Solis
Mon, Jan 16, 2017 10:21 PM

For anyone experiencing the issue, it looks like the TLS timeout setting
changed in pjsip 2.5.5, so if you don't specify a timeout setting, an SSL
timeout will occur on some iOS devices. Setting a timeout of 1 second at
pjsip_tls_setting::timeout fixes the connection issue.

Alex.

On Fri, Jan 13, 2017 at 8:04 PM, Alex alex.solis@telcentris.com wrote:

Updated the iOS app this week from pjsip 2.3 to pjsip 2.5.5 (latest).

Now when I try to place a call on some devices, I get an SSL timeout.
Currently using openssl 1.0.2h. This all work fine with pjsip 2.3 and the
same openssl version.

Here is the list of devices with the test result:
-> iphone 4s ios 8.1 fails.
-> simulator iphone 5 ios 9.3 fails.
-> iphone 5 iOS 9.3.5 works
-> simulator iphone 5 ios 10.2 works.
-> simulator iphone 5s ios 9.3 works.
-> simulator iphone 5s ios 10.2 works.
-> iphone 6 ios 10.2 works
-> simulator iphone 7 ios 10.2 works

Is this a known issue? Looking at the opened tickets I could not find
anything related. At the beginning I thought it was a 64 vs 32 bit issue,
but after further testing it is not the case because some of those devices
run on 32 bits and don’t experience the issue (for example iphone 5 ios
10.2).

Relevant logs:
19:51:28.599  tsx0x13828c64  ...State changed from Null to Calling,
event=TX_MSG
19:51:28.599  dlg0x14885c64  ....Transaction tsx0x13828c64 state changed
to Calling
19:51:28.599 AKSIPUserAgent  ......Call 0 state changed to CALLING
19:51:28.615  ssl0x15890e00  SSL timeout after 0.1s
19:51:28.615 tlsc0x1589d014  TLS connect() error: Operation timed out
(PJ_ETIMEDOUT) [code=70009]

19:51:28.615  tsx0x13828c64  State changed from Calling to Terminated,
event=TRANSPORT_ERROR

19:51:28.615  dlg0x14885c64  .Transaction tsx0x13828c64 state changed to
Terminated
19:51:28.616 AKSIPUserAgent  ...Call 0 is DISCONNECTED [reason = 503
(Operation timed out (PJ_ETIMEDOUT))]
19:51:28.616  pjsua_media.c  ...Call 0: deinitializing media..
19:51:28.616  pjsua_media.c  ....Call 0: cleaning up provisional media,
prov_med_cnt=1, med_cnt=0
19:51:28.616        icetp00  ....Stopping ICE, reason=media stop requested
19:51:28.616        icetp00  ....Destroying ICE session 0x18807614

--
Alex

For anyone experiencing the issue, it looks like the TLS timeout setting changed in pjsip 2.5.5, so if you don't specify a timeout setting, an SSL timeout will occur on some iOS devices. Setting a timeout of 1 second at pjsip_tls_setting::timeout fixes the connection issue. Alex. On Fri, Jan 13, 2017 at 8:04 PM, Alex <alex.solis@telcentris.com> wrote: > Updated the iOS app this week from pjsip 2.3 to pjsip 2.5.5 (latest). > > Now when I try to place a call on some devices, I get an SSL timeout. > Currently using openssl 1.0.2h. This all work fine with pjsip 2.3 and the > same openssl version. > > Here is the list of devices with the test result: > -> iphone 4s ios 8.1 fails. > -> simulator iphone 5 ios 9.3 fails. > -> iphone 5 iOS 9.3.5 works > -> simulator iphone 5 ios 10.2 works. > -> simulator iphone 5s ios 9.3 works. > -> simulator iphone 5s ios 10.2 works. > -> iphone 6 ios 10.2 works > -> simulator iphone 7 ios 10.2 works > > Is this a known issue? Looking at the opened tickets I could not find > anything related. At the beginning I thought it was a 64 vs 32 bit issue, > but after further testing it is not the case because some of those devices > run on 32 bits and don’t experience the issue (for example iphone 5 ios > 10.2). > > Relevant logs: > 19:51:28.599 tsx0x13828c64 ...State changed from Null to Calling, > event=TX_MSG > 19:51:28.599 dlg0x14885c64 ....Transaction tsx0x13828c64 state changed > to Calling > 19:51:28.599 AKSIPUserAgent ......Call 0 state changed to CALLING > *19:51:28.615 ssl0x15890e00 SSL timeout after 0.1s* > *19:51:28.615 tlsc0x1589d014 TLS connect() error: Operation timed out > (PJ_ETIMEDOUT) [code=70009]* > *19:51:28.615 tsx0x13828c64 State changed from Calling to Terminated, > event=TRANSPORT_ERROR* > 19:51:28.615 dlg0x14885c64 .Transaction tsx0x13828c64 state changed to > Terminated > 19:51:28.616 AKSIPUserAgent ...Call 0 is DISCONNECTED [reason = 503 > (Operation timed out (PJ_ETIMEDOUT))] > 19:51:28.616 pjsua_media.c ...Call 0: deinitializing media.. > 19:51:28.616 pjsua_media.c ....Call 0: cleaning up provisional media, > prov_med_cnt=1, med_cnt=0 > 19:51:28.616 icetp00 ....Stopping ICE, reason=media stop requested > 19:51:28.616 icetp00 ....Destroying ICE session 0x18807614 > -- Alex