freeswitchsdp

How can I rewrite SDP with switch_r_sdp in freeswitch?


v=0
o=- 1358463684 1358463684 IN IP4 xxx.xxx.xxx.xxx
s=Opal SIP Session
c=IN IP4 xxx.xxx.xxx.xxx
t=0 0
m=audio 3144 RTP/AVP 19 3 101 120
c=IN IP4 xxx.xxx.xxx.xxx
a=rtpmap:18 G729/8000/1
a=fmtp:18 annexb=no
a=rtpmap:3 gsm/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32,36
a=rtpmap:120 NSE/8000
a=fmtp:120 192-193 

In the above SDP, I would like to change the IP address xxx.xxx.xxx.xxx to different yyy.yyy.yyy.yyy. I searched in the internet and found that I need to use "action application="set"![CDATA[(sdp here)]] /action"

But I am not sure what is the exact changes I need to make. Please help me.


Solution

  • If you're behind NAT, you can configure the external RTP in your Sofia SIP Profile:

    <param name="ext-rtp-ip" value="yyy.yyy.yyy.yyy"/>
    

    FreeSwitch will then present this IP in outgoing SDP.

    https://freeswitch.org/confluence/display/FREESWITCH/Sofia+SIP+Stack