Sending the below query to FreeSWITCH-dev list as well. Any hints will be very helpful.<br><br>Thanks<br>Goutham B G<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Goutham BG</b> <span dir="ltr"><<a href="mailto:bggoutham@gmail.com">bggoutham@gmail.com</a>></span><br>
Date: Wed, Jan 12, 2011 at 4:56 PM<br>Subject: Peculiar behavior in FreeSWITCH when media streams for SRTP and RTP are offered in the same SDP<br>To: FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>
<br><br>Hi,<br><br>I am observing a peculiar behavior in FreeSWITCH-1.0.7 with SRTP.<br><br>I have the following entry in my dialplan XML file:<br><br> <extension name="IVR"><br> <condition field="destination_number" expression="^IVR$"><br>
<action application="set" data="sip_secure_media=true"/><br> <action application="bridge" data="loopback/app=socket:<a href="http://47.152.232.156:8084" target="_blank">47.152.232.156:8084</a> async full"/><br>
</condition><br> </extension><br><br>A Polycom SoundPoint IP 550 configured in "SRTP best effort" mode dials into this extension and is connected to the IVR. In this mode, the phone offers two media streams in the SDP of INVITE; 1st one for SRTP and the 2nd one for RTP. But the problem is that the media is established in SRTP in one way and RTP in the other way.<br>
<br>The phone offers the following SDP in the INVITE message:<br><br>v=0<br>o=- 1167766638 1167766638 IN IP4 47.152.232.149<br>s=Polycom IP Phone<br>c=IN IP4 47.152.232.149<br>t=0 0<br>a=sendrecv<br>m=audio 5040 RTP/SAVP 9 0 8 18 127<br>
a=crypto:8 AES_CM_128_HMAC_SHA1_32 inline:svWhF9Uh0VonfhtmuvRLM4B9S6+ZEicc3hDd3dAQ<br>a=rtpmap:9 G722/8000<br>a=rtpmap:0 PCMU/8000<br>a=rtpmap:8 PCMA/8000<br>a=rtpmap:18 G729/8000<br>a=fmtp:18 annexb=no<br>a=rtpmap:127 telephone-event/8000<br>
m=audio 5040 RTP/AVP 9 0 8 18 127<br>a=rtpmap:9 G722/8000<br>a=rtpmap:0 PCMU/8000<br>a=rtpmap:8 PCMA/8000<br>a=rtpmap:18 G729/8000<br>a=fmtp:18 annexb=no<br>a=rtpmap:127 telephone-event/8000<br><br>As we can see, there are two "m=" lines in the SDP of the offer; the 1st one for SRTP and the other one for RTP. FreeSWITCH-1.0.7 answers the call by sending 200OK with the following SDP:<br>
<br>v=0<br>o=FreeSWITCH 1294817064 1294817065 IN IP4 47.152.232.156<br>s=FreeSWITCH<br>c=IN IP4 47.152.232.156<br>t=0 0<br>m=audio 11552 RTP/SAVP 9 127<br>a=rtpmap:9 G722/8000<br>a=rtpmap:127 telephone-event/8000<br>a=fmtp:127 0-16<br>
a=silenceSupp:off - - - -<br>a=ptime:20<br>a=crypto:8 AES_CM_128_HMAC_SHA1_32 inline:z5/m/v2U0negVFjfkCsXR/sNAo9fhBv+dspBIbtx<br>m=audio 0 RTP/AVP 19<br><br>As we can see above, FreeSWITCH accepts the SRTP stream and rejects the RTP stream (by sending port as 0) in the SDP. The Polycom phone sends the media in SRTP as expected. But, FreeSWITCH sends the media in RTP to the phone even though it accepted SRTP in the answer (200OK).<br>
<br>Please let me know if this is a bug or am I missing something here?<br><br>The debug log of the call coming into FreeSWITCH is pasted here <a href="http://pastebin.freeswitch.org/14998" target="_blank">http://pastebin.freeswitch.org/14998</a> . If required I can also send the wireshark traces of this scenario captured in the system where FreeSITCH is running.<br>
<br>Thanks<br>Goutham B G<br>
</div>