Hi Ashraf, This is a bug indeed, and just get fixed in https://trac.pjsip.org/repos/ticket/1457. Thanks for the report! BR, nanang On Tue, Mar 6, 2012 at 5:09 AM, Ashraf Jaddo <ash.x.ash at hotmail.com> wrote: > Hello All, > > I am using PJSIP 1.12 with iPhone 5.0.. I am getting ?Assertion failed: > (sdp_remote && m_rem), function transport_encode_sdp, file > ../src/pjmedia/transport_srtp.c, line 1299.? every timeI try to call certain > numbers.. > > First let me explain my setup: > > - We are using Asterisk as our SIP server.. > - We are using GSM as codec. > - We are using TCP to support background mode. > - When I call from iphone to another iphone on the same server everything is > fine. > - When I call from iphone to land Line everything is fine. > - When I call from iphone to US Cellphone everything is fine. > > the problem is when I call from iPhone to a PBX extension that is connected > to the service.. and I I get the above error, to be specific the code crash > only when I pick up the call from that extension.. > > > Can someone explain to me where I can start to debug this issue.. > > One more thing if I tried to call from that PBX extension back to my phone > it is working fine.. > > > Thanks all, > > > Logs: > > 2012-03-05 15:31:26.266 DigiMobile-iPhone[1065:707] Call > 2012-03-05 15:31:26.806 DigiMobile-iPhone[1065:707] SipWrapper [account:0] > Call phone Number: 9874 > 15:31:26.810? pjsua_media.c? Opening sound device PCM at 16000/1/20ms > 15:31:27.594 coreaudio_dev.? core audio stream started > 15:31:27.599?? pjsua_call.c? Making call with acc #0 to sip:9874 at 10.50.0.4 > 15:31:27.599? pjsua_media.c? Media index 0 selected for call 1 > 15:31:27.602?? pjsua_core.c? TX 1077 bytes Request msg INVITE/cseq=3242 > (tdta0x8ea000) to tcp 10.50.0.4:5060: > INVITE sip:9874 at 10.50.0.4 SIP/2.0 > Via: SIP/2.0/TCP > 10.50.1.10:50544;rport;branch=z9hG4bKPjbnLoh4HOQboPYybLoZLhkWVGS.94tJvx > Max-Forwards: 70 > From: sip:77999991@10.50.0.4;tag=PxbkZXr7smjwglhT87678rIypjrr0tln > To: sip:9874 at 10.50.0.4 > Contact: <sip:77999991 at 10.50.1.10:5060;transport=TCP;ob> > Call-ID: F3a8f5vZu0f6JEJFmlN5vIagy-P1De7h > CSeq: 3242 INVITE > Route: <sip:10.50.0.4;transport=tcp;lr> > Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, > MESSAGE, OPTIONS > Supported: replaces, 100rel, timer, norefersub > Session-Expires: 1800 > Min-SE: 90 > User-Agent: iphone_pjsip_1_12 > Content-Type: application/sdp > Content-Length:?? 420 > > v=0 > o=- 3539968287 3539968287 IN IP4 10.50.1.10 > s=pjmedia > c=IN IP4 10.50.1.10 > t=0 0 > a=X-nat:0 > m=audio 4002 RTP/AVP 98 97 99 104 0 8 3 96 > a=rtcp:4003 IN IP4 10.50.1.10 > a=rtpmap:98 speex/16000 > a=rtpmap:97 speex/8000 > a=rtpmap:99 speex/32000 > a=rtpmap:104 iLBC/8000 > a=fmtp:104 mode=30 > a=rtpmap:0 PCMU/8000 > a=rtpmap:8 PCMA/8000 > a=rtpmap:3 GSM/8000 > a=sendrecv > a=rtpmap:96 telephone-event/8000 > a=fmtp:96 0-15 > > --end msg-- > 2012-03-05 15:31:27.610 DigiMobile-iPhone[1065:707] SipWrapper [account:0] > *****ON CALL STATE***** > 2012-03-05 15:31:27.615 DigiMobile-iPhone[1065:707] SipWrapper [account:0] > Call 1 state=CALLING > 2012-03-05 15:31:27.623 DigiMobile-iPhone[1065:707] View will appear > 15:31:27.671 os_core_unix.c? Info: possibly re-registering existing thread > 15:31:27.681?? pjsua_core.c? RX 537 bytes Response msg 401/INVITE/cseq=3242 > (rdata0x9061bc) from tcp 10.50.0.4:5060: > SIP/2.0 401 Unauthorized > Via: SIP/2.0/TCP > 10.50.1.10:50544;branch=z9hG4bKPjbnLoh4HOQboPYybLoZLhkWVGS.94tJvx;received=10.50.1.10;rport=50544 > From: sip:77999991@10.50.0.4;tag=PxbkZXr7smjwglhT87678rIypjrr0tln > To: sip:9874 at 10.50.0.4;tag=as674a7bcb > Call-ID: F3a8f5vZu0f6JEJFmlN5vIagy-P1De7h > CSeq: 3242 INVITE > Server: TEST > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH > Supported: replaces, timer > WWW-Authenticate: Digest algorithm=MD5, realm="TEST", nonce="01895447" > Content-Length: 0 > > > --end msg-- > 15:31:27.696?? pjsua_core.c? TX 368 bytes Request msg ACK/cseq=3242 > (tdta0x990400) to tcp 10.50.0.4:5060: > ACK sip:9874 at 10.50.0.4 SIP/2.0 > Via: SIP/2.0/TCP > 10.50.1.10:50544;rport;branch=z9hG4bKPjbnLoh4HOQboPYybLoZLhkWVGS.94tJvx > Max-Forwards: 70 > From: sip:77999991@10.50.0.4;tag=PxbkZXr7smjwglhT87678rIypjrr0tln > To: sip:9874 at 10.50.0.4;tag=as674a7bcb > Call-ID: F3a8f5vZu0f6JEJFmlN5vIagy-P1De7h > CSeq: 3242 ACK > Route: <sip:10.50.0.4;transport=tcp;lr> > Content-Length:? 0 > > > --end msg-- > 15:31:27.698?? pjsua_core.c? TX 1242 bytes Request msg INVITE/cseq=3243 > (tdta0x8ea000) to tcp 10.50.0.4:5060: > INVITE sip:9874 at 10.50.0.4 SIP/2.0 > Via: SIP/2.0/TCP > 10.50.1.10:50544;rport;branch=z9hG4bKPjhLxCwUUKSm84IDJIOYkc4X86gmO3AuUK > Max-Forwards: 70 > From: sip:77999991@10.50.0.4;tag=PxbkZXr7smjwglhT87678rIypjrr0tln > To: sip:9874 at 10.50.0.4 > Contact: <sip:77999991 at 10.50.1.10:5060;transport=TCP;ob> > Call-ID: F3a8f5vZu0f6JEJFmlN5vIagy-P1De7h > CSeq: 3243 INVITE > Route: <sip:10.50.0.4;transport=tcp;lr> > Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, > MESSAGE, OPTIONS > Supported: replaces, 100rel, timer, norefersub > Session-Expires: 1800 > Min-SE: 90 > User-Agent: iphone_pjsip_1_12 > Authorization: Digest username="77999991", realm="TEST", nonce="01895447", > uri="sip:9874 at 10.50.0.4", response="b556ea6a369402092b9cd1350cfa6528", > algorithm=MD5 > Content-Type: application/sdp > Content-Length:?? 420 > > v=0 > o=- 3539968287 3539968287 IN IP4 10.50.1.10 > s=pjmedia > c=IN IP4 10.50.1.10 > t=0 0 > a=X-nat:0 > m=audio 4002 RTP/AVP 98 97 99 104 0 8 3 96 > a=rtcp:4003 IN IP4 10.50.1.10 > a=rtpmap:98 speex/16000 > a=rtpmap:97 speex/8000 > a=rtpmap:99 speex/32000 > a=rtpmap:104 iLBC/8000 > a=fmtp:104 mode=30 > a=rtpmap:0 PCMU/8000 > a=rtpmap:8 PCMA/8000 > a=rtpmap:3 GSM/8000 > a=sendrecv > a=rtpmap:96 telephone-event/8000 > a=fmtp:96 0-15 > > --end msg-- > 15:31:27.726?? pjsua_core.c? RX 526 bytes Response msg 100/INVITE/cseq=3243 > (rdata0x9061bc) from tcp 10.50.0.4:5060: > SIP/2.0 100 Trying > Via: SIP/2.0/TCP > 10.50.1.10:50544;branch=z9hG4bKPjhLxCwUUKSm84IDJIOYkc4X86gmO3AuUK;received=10.50.1.10;rport=50544 > From: sip:77999991@10.50.0.4;tag=PxbkZXr7smjwglhT87678rIypjrr0tln > To: sip:9874 at 10.50.0.4 > Call-ID: F3a8f5vZu0f6JEJFmlN5vIagy-P1De7h > CSeq: 3243 INVITE > Server: TEST > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH > Supported: replaces, timer > Session-Expires: 120;refresher=uas > Contact: <sip:9874 at 10.50.0.4:5060;transport=TCP> > Content-Length: 0 > > > --end msg-- > 15:31:27.730?? pjsua_core.c? RX 799 bytes Response msg 183/INVITE/cseq=3243 > (rdata0x9061bc) from tcp 10.50.0.4:5060: > SIP/2.0 183 Session Progress > Via: SIP/2.0/TCP > 10.50.1.10:50544;branch=z9hG4bKPjhLxCwUUKSm84IDJIOYkc4X86gmO3AuUK;received=10.50.1.10;rport=50544 > From: sip:77999991@10.50.0.4;tag=PxbkZXr7smjwglhT87678rIypjrr0tln > To: sip:9874 at 10.50.0.4;tag=as5a9c25b2 > Call-ID: F3a8f5vZu0f6JEJFmlN5vIagy-P1De7h > CSeq: 3243 INVITE > Server: TEST > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH > Supported: replaces, timer > Session-Expires: 120;refresher=uas > Contact: <sip:9874 at 10.50.0.4:5060;transport=TCP> > Content-Type: application/sdp > Content-Length: 215 > > v=0 > o=root 2007926168 2007926168 IN IP4 10.50.0.4 > s=TEST > c=IN IP4 10.50.0.4 > t=0 0 > m=audio 19504 RTP/AVP 3 96 > a=rtpmap:3 GSM/8000 > a=rtpmap:96 telephone-event/8000 > a=fmtp:96 0-16 > a=ptime:20 > a=sendrecv > > --end msg-- > 2012-03-05 15:31:27.730 DigiMobile-iPhone[1065:920b] SipWrapper > [account:0]?? *****ON CALL STATE***** > 2012-03-05 15:31:27.735 DigiMobile-iPhone[1065:920b] SipWrapper > [account:0]?? Call 1 state=EARLY > 15:31:27.861?? strm0x8e19b4? VAD temporarily disabled > 15:31:27.862?? strm0x8e19b4? Encoder stream started > 15:31:27.862?? strm0x8e19b4? Decoder stream started > 15:31:27.863? pjsua_media.c? Media updates, stream #0: GSM (sendrecv) > 2012-03-05 15:31:27.864 DigiMobile-iPhone[1065:920b] SipWrapper > [account:0]?? *****ON CALL MEDIA STATE***** > 15:31:27.865?? conference.c? Port 1 (sip:9874 at 10.50.0.4) transmitting to > port 0 (iPhone IO device) > 15:31:27.865?? conference.c? Port 0 (iPhone IO device) transmitting to port > 1 (sip:9874 at 10.50.0.4) > 15:31:27.901?? Master/sound? Underflow, buf_cnt=0, will generate 1 frame > 15:31:28.481?? strm0x8e19b4? VAD re-enabled > 2012-03-05 15:31:28.623 DigiMobile-iPhone[1065:707] SipWrapper [account:0] > Get Call Info > 2012-03-05 15:31:29.623 DigiMobile-iPhone[1065:707] SipWrapper [account:0] > Get Call Info > 2012-03-05 15:31:30.623 DigiMobile-iPhone[1065:707] SipWrapper [account:0] > Get Call Info > 15:31:31.365?? pjsua_core.c? RX 785 bytes Response msg 200/INVITE/cseq=3243 > (rdata0x9061bc) from tcp 10.50.0.4:5060: > SIP/2.0 200 OK > Via: SIP/2.0/TCP > 10.50.1.10:50544;branch=z9hG4bKPjhLxCwUUKSm84IDJIOYkc4X86gmO3AuUK;received=10.50.1.10;rport=50544 > From: sip:77999991@10.50.0.4;tag=PxbkZXr7smjwglhT87678rIypjrr0tln > To: sip:9874 at 10.50.0.4;tag=as5a9c25b2 > Call-ID: F3a8f5vZu0f6JEJFmlN5vIagy-P1De7h > CSeq: 3243 INVITE > Server: TEST > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH > Supported: replaces, timer > Session-Expires: 120;refresher=uas > Contact: <sip:9874 at 10.50.0.4:5060;transport=TCP> > Content-Type: application/sdp > Content-Length: 215 > > v=0 > o=root 2007926168 2007926169 IN IP4 10.50.0.4 > s=TEST > c=IN IP4 10.50.0.4 > t=0 0 > m=audio 19504 RTP/AVP 3 96 > a=rtpmap:3 GSM/8000 > a=rtpmap:96 telephone-event/8000 > a=fmtp:96 0-16 > a=ptime:20 > a=sendrecv > > --end msg-- > 2012-03-05 15:31:31.366 DigiMobile-iPhone[1065:920b] SipWrapper > [account:0]?? *****ON CALL STATE***** > 2012-03-05 15:31:31.371 DigiMobile-iPhone[1065:920b] SipWrapper > [account:0]?? Call 1 state=CONNECTING > 15:31:31.374??? inv0x99c864? SDP negotiation done, message body is ignored > 15:31:31.375?? pjsua_core.c? TX 346 bytes Request msg ACK/cseq=3243 > (tdta0x990400) to tcp 10.50.0.4:5060: > ACK sip:9874 at 10.50.0.4:5060;transport=TCP SIP/2.0 > Via: SIP/2.0/TCP > 10.50.1.10:50544;rport;branch=z9hG4bKPjOSEpL-oDoYUwgfLJlJuIE1ahXztHSHzD > Max-Forwards: 70 > From: sip:77999991@10.50.0.4;tag=PxbkZXr7smjwglhT87678rIypjrr0tln > To: sip:9874 at 10.50.0.4;tag=as5a9c25b2 > Call-ID: F3a8f5vZu0f6JEJFmlN5vIagy-P1De7h > CSeq: 3243 ACK > Content-Length:? 0 > > > --end msg-- > 2012-03-05 15:31:31.376 DigiMobile-iPhone[1065:920b] SipWrapper > [account:0]?? *****ON CALL STATE***** > 2012-03-05 15:31:31.389 DigiMobile-iPhone[1065:920b] SipWrapper > [account:0]?? Call 1 state=CONFIRMED > 15:31:31.393?? pjsua_core.c? RX 703 bytes Request msg UPDATE/cseq=102 > (rdata0x9061bc) from tcp 10.50.0.4:5060: > UPDATE sip:77999991 at 10.50.1.10:5060;transport=TCP;ob SIP/2.0 > Via: SIP/2.0/TCP 10.50.0.4:5060;branch=z9hG4bK4b370dd7;rport > Max-Forwards: 70 > From: sip:9874@10.50.0.4;tag=as5a9c25b2 > To: sip:77999991 at 10.50.0.4;tag=PxbkZXr7smjwglhT87678rIypjrr0tln > Contact: <sip:9874 at 10.50.0.4:5060;transport=TCP> > Call-ID: F3a8f5vZu0f6JEJFmlN5vIagy-P1De7h > CSeq: 102 UPDATE > User-Agent: TEST > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH > Supported: replaces, timer > X-asterisk-Info: SIP re-invite (External RTP bridge) > Content-Type: application/sdp > Content-Length: 102 > > v=0 > o=root 2007926168 2007926170 IN IP4 172.16.201.225 > s=TEST > c=IN IP4 172.16.201.225 > t=0 0 > > --end msg-- > 15:31:31.396?? pjsua_call.c? Call 1: received updated media offer > Assertion failed: (sdp_remote && m_rem), function transport_encode_sdp, file > ../src/pjmedia/transport_srtp.c, line 1299. > [Switching to process 22531 thread 0x5803] > [Switching to process 22531 thread 0x5803] > (gdb) > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >