Hi Arie, sorry for the late reply. Yeah it seems that the two m=audio lines confused pjsua-lib, as it (naively) always assumes that the usable audio m= line would always be the first m= line. I fixed this in http://www.pjsip.org/trac/ticket/433. Thanks for the report. cheers, -benny Velthoen, Arie wrote: > Hi Benny, > > > > I have a problem that no media are established, even though the SDP-negotiation was successful. > > > > PJSIP is given an SDP-offer containing 2 media-descriptions, of which the first (SRTP) is rejected with port=0, and the 2nd is accepted with port 49000 : > > > > The SDP offer to PJSIP is: > > v=0 > > o=- 1197975037 1197975037 IN IP4 192.168.9.74 > > s=Polycom IP Phone > > c=IN IP4 192.168.9.74 > > t=0 0 > > m=audio 49200 RTP/SAVP 8 0 9 18 96 > > a=sendrecv > > a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:tMuyik1Aiiq9p4DQVHhAASSWDEP7K7wo0cICOn39 > > a=rtpmap:8 PCMA/8000 > > a=rtpmap:0 PCMU/8000 > > a=rtpmap:9 G722/8000 > > a=rtpmap:18 G729/8000 > > a=rtpmap:96 telephone-event/8000 > > m=audio 49200 RTP/AVP 8 0 9 18 96 > > a=rtpmap:8 PCMA/8000 > > a=rtpmap:0 PCMU/8000 > > a=rtpmap:9 G722/8000 > > a=rtpmap:18 G729/8000 > > a=rtpmap:96 telephone-event/8000 > > > > > > The SDP answer from PJSIP is: > > v=0 > > o=- 3406967846 3406967847 IN IP4 192.168.9.35 > > s=pjmedia > > c=IN IP4 192.168.9.35 > > t=0 0 > > a=X-nat:0 > > m=audio 0 RTP/SAVP 8 0 9 18 96 > > a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:tMuyik1Aiiq9p4DQVHhAASSWDEP7K7wo0cICOn39 > > a=rtpmap:8 PCMA/8000 > > a=rtpmap:0 PCMU/8000 > > a=rtpmap:9 G722/8000 > > a=rtpmap:18 G729/8000 > > a=rtpmap:96 telephone-event/8000 > > a=inactive > > m=audio 49000 RTP/AVP 8 101 > > a=rtcp:49001 IN IP4 192.168.9.35 > > a=rtpmap:8 PCMA/8000 > > a=sendrecv > > a=rtpmap:101 telephone-event/8000 > > a=fmtp:101 0-15 > > > > > > I have found: > > > > pjmedia_session_info_from_sdp() only considers the first stream, and passes this to > pjmedia_stream_info_from_sdp() which marks this as an "Inactive stream" > with "si->dir = PJMEDIA_DIR_NONE;", because "local_m->desc.port == 0". > > > > Call-stack : > > - inv_negotiate_sdp > > - pjsua_call_on_media_update > > - pjsua_media_channel_update > > - pjmedia_session_info_from_sdp > > - pjmedia_stream_info_from_sdp > > > > Further-on this makes pjsua_media_channel_update fail, > because it interprets the condition > > "sess_info.stream_info[0].dir == PJMEDIA_DIR_NONE" > as if the call was on-hold. > > > > Can you advice me how to solve this? > > > > > > Regards, > > Arie Velthoen >