我在freeswitch中有以下代码。我们决定改用星号。
我已经设置,如果您拨打 8XXXX,您将拨打另一台服务器。
sip1:/usr/local/freeswitch/conf/autoload_configs/acl.conf.xml
<node type="allow" cidr="192.168.0.2/32"/>
sip1:/usr/local/freeswitch/conf/dialplan/default.xml
redirect numbers 8XXXX to sip2
<extension name="Dial to sip2">
<condition field="destination_number" expression="^8(\d\d\d\d)$">
<action application="bridge" data="sofia/internal/$1@192.168.0.2"/>
</condition>
</extension>
sip1:/usr/local/freeswitch/conf/dialplan/public.xml
route foreign calls to the the extension
<extension name="Calls from sip2">
<condition field="destination_number" expression="^(\d\d\d\d)$">
<action application="transfer" data="$1 XML default"/>
</condition>
</extension>
sip2:/usr/local/freeswitch/conf/autoload_configs/acl.conf.xml
<node type="allow" cidr="192.168.0.1/32"/>
sip2:/usr/local/freeswitch/conf/dialplan/default.xml
redirect numbers 8XXXX to sip1
<extension name="Dial to sip1">
<condition field="destination_number" expression="^8(\d\d\d\d)$">
<action application="bridge" data="sofia/internal/$1@192.168.0.1"/>
</condition>
</extension>
sip2:/usr/local/freeswitch/conf/dialplan/public.xml
route foriegn calls to the extension
<extension name="Calls from sip1">
<condition field="destination_number" expression="^(\d\d\d\d)$">
<action application="transfer" data="$1 XML default"/>
</condition>
</extension>
在自由切换代码中,我看到文件 acl.conf.xml 已配置?星号中对应的文件是什么?以及如何在该文件中实现相同的配置?
我在下面创建了 extensions.conf 文件。仅此文件就足够了吗?我是否缺少一些将这些绑定在一起的胶水逻辑?我是 SIP 配置的新手。
[incoming]
exten => 123,1,Answer()
same => n(menuprompt),Background(main-menu)
exten => 1,1,Playback(digits/1)
same => n,Goto(incoming,menuprompt,123)
exten => 2,1,Playback(digits/2)
same => n,Goto(incoming,menuprompt,123)
exten => 9,1,Hangup()
[main-menu]
exten => n(menuprompt),Background(main-menu)
exten => 3,1,Playback(digits/3)
same => n,Goto(main-menu,menuprompt,n)
exten => 4,1,Playback(digits/4)
same => n,Goto(main-menu,menuprompt,n)
exten => 9,1,Hangup()