将freeswitch转换为星号

时间:2012-10-21 21:55:44

标签: sip asterisk freeswitch sip-server

我在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()

1 个答案:

答案 0 :(得分:1)

我可以问你为什么要离开FreeSWITCH?恕我直言,它比Asterisk更容易和更好地处理,性能很好