如何在 freeswitch 中用 switch_r_sdp 重写 SDP?
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
在上面的SDP中,我想更改IP地址xxx.xxx.xxx.xxx
不同 yyy.yyy.yyy.yyy。我在互联网上搜索,发现我需要使用 "action application="set"![CDATA[(sdp here)]] /action"
但我不确定我需要进行哪些具体更改。请帮助我。
如果您使用 NAT,您可以在 Sofia SIP 配置文件中配置外部 RTP:
<param name="ext-rtp-ip" value="yyy.yyy.yyy.yyy"/>
FreeSwitch 将在传出的 SDP 中显示此 IP。
https://freeswitch.org/confluence/display/FREESWITCH/Sofia+SIP+Stack
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
在上面的SDP中,我想更改IP地址xxx.xxx.xxx.xxx 不同 yyy.yyy.yyy.yyy。我在互联网上搜索,发现我需要使用 "action application="set"![CDATA[(sdp here)]] /action"
但我不确定我需要进行哪些具体更改。请帮助我。
如果您使用 NAT,您可以在 Sofia SIP 配置文件中配置外部 RTP:
<param name="ext-rtp-ip" value="yyy.yyy.yyy.yyy"/>
FreeSwitch 将在传出的 SDP 中显示此 IP。
https://freeswitch.org/confluence/display/FREESWITCH/Sofia+SIP+Stack