在dockerized FreeSWITCH上设置SDP的问题

时间:2018-03-30 13:55:42

标签: docker rtp freeswitch sdp

我在Docker容器中运行FreeSWITCH。我需要发送SDP信息以引用docker主机的IP地址。我在FreeSWITCH上定义了这个内部配置文件:

freeswitch@36fe182d8fb3> sofia status profile internal
=================================================================================================
Name                internal
Domain Name         N/A
Auto-NAT            false
DBName              sofia_reg_internal
Pres Hosts          0.0.0.0,0.0.0.0
Dialplan            XML
Context             public
Challenge Realm     auto_from
RTP-IP              CONTAINER_IP_ADDRESS
Ext-RTP-IP          HOST_IP_ADDRESS
SIP-IP              CONTAINER_IP_ADDRESS
Ext-SIP-IP          HOST_IP_ADDRESS
URL                 sip:mod_sofia@HOST_IP_ADDRESS:5060
BIND-URL            sip:mod_sofia@HOST_IP_ADDRESS:5060;maddr=CONTAINER_IP_ADDRESS;transport=udp,tcp
WS-BIND-URL         sip:mod_sofia@CONTAINER_IP_ADDRESS:5066;transport=ws
WSS-BIND-URL        sips:mod_sofia@CONTAINER_IP_ADDRESS:7443;transport=wss
HOLD-MUSIC          local_stream://moh
OUTBOUND-PROXY      N/A
CODECS IN           OPUS,G722,PCMU,PCMA,VP8
CODECS OUT          OPUS,G722,PCMU,PCMA,VP8
TEL-EVENT           101
DTMF-MODE           rfc2833
CNG                 13
SESSION-TO          0
MAX-DIALOG          0
NOMEDIA             false
LATE-NEG            true
PROXY-MEDIA         false
ZRTP-PASSTHRU       true
AGGRESSIVENAT       false
CALLS-IN            0
FAILED-CALLS-IN     0
CALLS-OUT           0
FAILED-CALLS-OUT    0
REGISTRATIONS       0

鉴于此个人资料,我期待c=IN IP4 HOST_IP_ADDRESS,但这是发送的内容:

v=0
o=FreeSWITCH 1522401421 1522401423 IN IP4 CONTAINER_IP_ADDRESS
s=FreeSWITCH
c=IN IP4 CONTAINER_IP_ADDRESS
t=0 0
m=audio 16390 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

如何确保FreeSWITCH发送c=IN IP4 HOST_IP_ADDRESS而不是c=IN IP4 CONTAINER_IP_ADDRESS

谢谢

1 个答案:

答案 0 :(得分:0)

我认为您的FreeSwitch落后于SIP代理。 如果是,则需要配置ACL并更新SIP配置文件的“ local-network-acl”变量。例子

<param name="local-network-acl" value="loopback.auto"/>