Reputation: 15010
I have the following code in freeswitch. We have decided to use asterisk instead.
I've setup so that if you dial 8XXXX you will dial the other server.
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/[email protected]"/>
</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/[email protected]"/>
</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>
In the free switch code I see that the file acl.conf.xml was configured? what is the corresponding file in asterisk? and How do I implement the same configuration in that file?
I have created extensions.conf file below.Is this file alone enough?? Am I missing some glue logic that binds these together? I am new to SIP configuration.
[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()
Upvotes: 0
Views: 1065
Reputation: 1961
May I ask why you move away from FreeSWITCH? IMHO it's much easier and better to handle than Asterisk, and performance is great
Upvotes: 1