<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Just tested with my snom phone and it works fine.<div><br></div><div><div>2010-12-22 09:00:27.304273 [DEBUG] switch_rtp.c:1424 Starting timer [soft] 160 bytes per 20ms</div><div>2010-12-22 09:00:27.306260 [DEBUG] sofia_glue.c:3219 Set 2833 dtmf send payload to 101</div><div>2010-12-22 09:00:27.306260 [DEBUG] sofia_glue.c:3224 Set 2833 dtmf receive payload to 101</div><div>2010-12-22 09:00:27.306260 [INFO] switch_rtp.c:1253 Activating Secure RTP SEND</div><div>2010-12-22 09:00:27.306260 [DEBUG] switch_core_sqldb.c:1438 Secure Type: srtp:AES_CM_128_HMAC_SHA1_32</div><div>2010-12-22 09:00:27.306260 [INFO] switch_rtp.c:1233 Activating Secure RTP RECV</div><div>2010-12-22 09:00:27.306260 [DEBUG] switch_core_sqldb.c:1438 Secure Type: srtp:AES_CM_128_HMAC_SHA1_32</div><div>2010-12-22 09:00:27.306260 [DEBUG] mod_sofia.c:683 Local SDP sofia/internal/1000@192.168.1.113:5062:</div><div>v=0</div><div>o=FreeSWITCH 1293010327 1293010328 IN IP4 192.168.1.113</div><div>s=FreeSWITCH</div><div>c=IN IP4 192.168.1.113</div><div>t=0 0</div><div>m=audio 19700 RTP/SAVP 0 101</div><div>a=rtpmap:0 pcmu/8000</div><div>a=rtpmap:101 telephone-event/8000</div><div>a=fmtp:101 0-16</div><div>a=silenceSupp:off - - - -</div><div>a=ptime:20</div><div>a=sendrecv</div><div>a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:uJA327Ni4Srlz/MPcfvRc0H4gjeP3lpU9KEcPWcm</div><div><br></div><div><br></div><div><br></div><div>/b</div><div><br></div><div><div>On Dec 22, 2010, at 4:01 AM, Goutham BG wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks for the response.<br>I have pasted the freeswitch debug log of the call coming in to FreeSWITCH in <a href="http://pastebin.freeswitch.org/14852">http://pastebin.freeswitch.org/14852</a> .<br><br>I think I have set sip_secure_media=true before answering the call in my dialplan. The following is the entry for this extension in my dialplan:<br>
<br> <extension name="IVR"><br> <condition field="destination_number" expression="^IVR$"><br><b> <action application="set" data="sip_secure_media=true"/></b><br>
<action application="bridge" data="loopback/app=socket:<a href="http://47.152.232.156:8084/">47.152.232.156:8084</a> async full"/><br> </condition><br> </extension><br><br>Thanks<br>
Goutham B G<br><br><div class="gmail_quote">On Tue, Dec 21, 2010 at 11:47 PM, Brian West <span dir="ltr"><<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
And clearly you overlooked my response... are you setting sip_secure_media=true after the call is answered in your dialplan?\<br>
<br>
I need to see the full debug log of a call coming in to FreeSWITCH please on our pastebin.<br>
<br>
/b<br>
<div><div></div><div class="h5"><br>
On Dec 21, 2010, at 12:00 PM, Goutham BG wrote:<br>
<br>
> Posting the below query to freeswitch-users list as well. Any hints will be really helpful.<br>
><br>
> ---------- Forwarded message ----------<br>
> From: Goutham BG <<a href="mailto:bggoutham@gmail.com">bggoutham@gmail.com</a>><br>
> Date: Mon, Dec 20, 2010 at 9:16 PM<br>
> Subject: Query related to enabling SRTP in FreeSWITCH-1.0.7<br>
> To: <a href="mailto:freeswitch-dev@lists.freeswitch.org">freeswitch-dev@lists.freeswitch.org</a><br>
><br>
><br>
> Hi,<br>
><br>
> I have been trying to enable SRTP in FreeSWITCH-1.0.7 and have been facing some issues.<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="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 SIP phone (Avaya 12XX) configured in "SRTP best effort" mode dials into this extension and is connected to the IVR. But the media is established in SRTP in one way and RTP in the other way.<br>
> The phone offers the following SDP in the INVITE message:<br>
><br>
> v=0<br>
> o=- 10170 10170 IN IP4 47.152.232.147<br>
> s=Sip Call<br>
> c=IN IP4 47.152.232.147<br>
> t=0 0<br>
> m=audio 5016 RTP/AVP 0 8 18 101 102<br>
> a=rtpmap:0 PCMU/8000<br>
> a=ptime:20<br>
> a=rtpmap:8 PCMA/8000<br>
> a=ptime:20<br>
> a=rtpmap:18 G729/8000<br>
> a=ptime:20<br>
> a=fmtp:18 annexb=no<br>
> a=rtpmap:101 telephone-event/8000<br>
> a=fmtp:101 0-15<br>
> a=rtpmap:102 X-nt-inforeq/8000<br>
> a=sendrecv<br>
> m=audio 5016 RTP/SAVP 0 8 18 101 102<br>
> a=rtpmap:0 PCMU/8000<br>
> a=ptime:20<br>
> a=rtpmap:8 PCMA/8000<br>
> a=ptime:20<br>
> a=rtpmap:18 G729/8000<br>
> a=ptime:20<br>
> a=fmtp:18 annexb=no<br>
> a=rtpmap:101 telephone-event/8000<br>
> a=fmtp:101 0-15<br>
> a=rtpmap:102 X-nt-inforeq/8000<br>
> a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:Tjivoci1I/mVkt/Fq/ZsiY+<br>
> +ornJoXjZ5tSadho4<br>
> a=sendrecv<br>
><br>
> As we can see, there are two "m=" lines in the SDP of the offer; one for RTP and another for SRTP. FreeSWITCH-1.0.7 answers the call by sending 200OK with the following SDP:<br>
><br>
> v=0<br>
> o=FreeSWITCH 1291628984 1291628985 IN IP4 47.152.232.156<br>
> s=FreeSWITCH<br>
> c=IN IP4 47.152.232.156<br>
> t=0 0<br>
> m=audio 11280 RTP/AVP 0 101<br>
> a=rtpmap:0 PCMU/8000<br>
> a=rtpmap:101 telephone-event/8000<br>
> a=fmtp:101 0-16<br>
> a=silenceSupp:off - - - -<br>
> a=ptime:20<br>
> m=audio 0 RTP/SAVP 19<br>
><br>
> As you can see above, FreeSWITCH accepts the RTP stream and rejects the SRTP stream (by sending port as 0) in the SDP. The SIP phone sends the media in RTP(which is expected). But, FreeSWITCH sends the media in SRTP to the SIP phone. I believe this is a bug in FreeSWITCH as it is supposed to send the media in RTP since it accepted RTP in the answer (200OK).<br>
><br>
> Query:<br>
> ======<br>
> In order to make FreeSWITCH select SRTP in the SDP of the answer(200OK), I made the following change(i.e, setting sip_secure_media=true) in FS dial plan:<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>
> In FreeSWITCH-1.0.6(before updating to 1.0.7), this worked and FS accepted the SRTP stream and rejected RTP in the answer(200 OK) as shown below:<br>
><br>
> m=audio 0 RTP/AVP 19<br>
> m=audio 12084 RTP/SAVP 0 101<br>
> a=rtpmap:0 PCMU/8000<br>
> a=rtpmap:101 telephone-event/8000<br>
> a=fmtp:101 0-16<br>
> a=silenceSupp:off - - - -<br>
> a=ptime:20<br>
> a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:hgv7ClqDx1irTRrXq2NEm9Gbouw0969bBU3n+LcM<br>
><br>
> But after updating the FreeSWITCH-1.0.6 to 1.0.7, the above mentioned dial plan change (i.e, setting sip_secure_media=true) is not working. It is still behaving in the same way as it did without the XML change.<br>
><br>
> Can you please let me know if anything else needs to be added in dialplan XML file for enabling SRTP in this case in FreeSWITCH-1.0.7 or am I missing something here?<br>
><br>
> I have referred the following FS wiki pages for making the SRTP changes:<br>
> <a href="http://wiki.freeswitch.org/wiki/Secure_RTP" target="_blank">http://wiki.freeswitch.org/wiki/Secure_RTP</a><br>
> <a href="http://wiki.freeswitch.org/wiki/SRTP" target="_blank">http://wiki.freeswitch.org/wiki/SRTP</a><br>
><br>
> Note: There is no issue when the SIP phone is configured in "SRTP only" mode where only SRTP stream is offered in the SDP of the INVITE. In this case, SIP phone and FreeSWITCH communicate properly using SRTP. This doesn't require setting "sip_secure_media=true" in the dialplan XML file.<br>
> P.S: I am a newbie to FreeSWITCH. So, please forgive me if I am asking basic questions.<br>
><br>
> Thanks<br>
> Goutham B G<br>
</div></div>> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>
_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>