Hi, I am newbie in asterisk world, I have two asterisk servers working in the same network, I want to connect them with each other in following way
- First server redirects all four digit number calls to second server, but handles all three digit numbers locally
- Second server vice versa. Redirects three digit numbers and handles four digit numbers.
I followed this tutorial
http://www.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/I_sect14_tt670.html
Here is configuration for First Server it has IP - 192.168.0.111
File /etc/asterisk/iax.conf
[general]
autokill=yes
register => asterfirst:welcomefirst@192.168.0.112
bandwidth=low
disallow=lpc10
jitterbuffer=no
[astersecond]
type=friend
host=dynamic
trunk=yes
secret=welcomesecond
context=incoming_second
deny=0.0.0.0/0.0.0.0
permit=192.168.0.112/255.255.255.255
File /etc/asterisk/extensions.conf
[general]
static=yes
writeprotect=no
[globals]
[default]
include => confrence
[managers-context]
include => crosp-main
[support-context]
include => crosp-main
[crosp-main]
exten => _XXX,1,Dial(SIP/${EXTEN})
include => conference
include => remote-second
[remote-second]
exten => _XXXX,1,NoOp()
exten => _XXXX,n,Dial(IAX2/astersecond/${EXTEN})
exten => _XXXX,n,Hangup()
And second server
Here is configuration for Second Server it has IP - 192.168.0.112
File /etc/asterisk/iax.conf
[general]
register => astersecond:welcomesecond@192.168.0.111
bandwidth=low
;
disallow=lpc10
;
jitterbuffer=no
autokill=yes
[asterfirst]
type=friend
host=dynamic
trunk=yes
secret=welcomefirst
context=incoming_first
deny=0.0.0.0/0.0.0.0
permit=192.168.0.111/255.255.255.255
[guest]
type=user
context=public
callerid="Guest IAX User"
File /etc/asterisk/extensions.conf
[general]
static=yes
writeprotect=no
[globals]
[default]
[developers-context]
include => crosp-main
[remote-first]
exten => _XXX,1,NoOp()
exten => _XXX,n,Dial(IAX2/asterfirst/${EXTEN})
exten => _XXX,n,Hangup()
[crosp-main]
exten => _XXXX,1,Dial(IAX2/${EXTEN})
include => remote-first
Is it possible to have such configuration. So all clients connected over SIP protocol but communication between two servers is done via IAX ?
Or in this case all clients have to connect over IAX protocol as well ?
I would be grateful for any help.