[Freeswitch-users] Peculiar behavior in FreeSWITCH when media streams for SRTP and RTP are offered in the same SDP
Goutham BG
bggoutham at gmail.com
Wed Jan 12 14:26:40 MSK 2011
Hi,
I am observing a peculiar behavior in FreeSWITCH-1.0.7 with SRTP.
I have the following entry in my dialplan XML file:
<extension name="IVR">
<condition field="destination_number" expression="^IVR$">
<action application="set" data="sip_secure_media=true"/>
<action application="bridge" data="loopback/app=socket:
47.152.232.156:8084 async full"/>
</condition>
</extension>
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.
The phone offers the following SDP in the INVITE message:
v=0
o=- 1167766638 1167766638 IN IP4 47.152.232.149
s=Polycom IP Phone
c=IN IP4 47.152.232.149
t=0 0
a=sendrecv
m=audio 5040 RTP/SAVP 9 0 8 18 127
a=crypto:8 AES_CM_128_HMAC_SHA1_32
inline:svWhF9Uh0VonfhtmuvRLM4B9S6+ZEicc3hDd3dAQ
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:127 telephone-event/8000
m=audio 5040 RTP/AVP 9 0 8 18 127
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:127 telephone-event/8000
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:
v=0
o=FreeSWITCH 1294817064 1294817065 IN IP4 47.152.232.156
s=FreeSWITCH
c=IN IP4 47.152.232.156
t=0 0
m=audio 11552 RTP/SAVP 9 127
a=rtpmap:9 G722/8000
a=rtpmap:127 telephone-event/8000
a=fmtp:127 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=crypto:8 AES_CM_128_HMAC_SHA1_32
inline:z5/m/v2U0negVFjfkCsXR/sNAo9fhBv+dspBIbtx
m=audio 0 RTP/AVP 19
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).
Please let me know if this is a bug or am I missing something here?
The debug log of the call coming into FreeSWITCH is pasted here
http://pastebin.freeswitch.org/14998 . If required I can also send the
wireshark traces of this scenario captured in the system where FreeSITCH is
running.
Thanks
Goutham B G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110112/2d8b93a5/attachment-0001.html
More information about the FreeSWITCH-users
mailing list