我在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(dddd)$">
<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="^(dddd)$">
<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(dddd)$">
<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="^(dddd)$">
<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()
我可以问为什么您要离开自由开关?恕我直言,它比星号要容易得多,要好得多,而且性能很棒