Multiple Asterisk servers

Hello all,

I have tried Asterisk to communicate directly with another Asterisk, and it works fine. Now, I want these asterisk servers to communicate ,not directly but via another asterisk, a Master Asterisk server(a centralized server).
Is it possible to have one master asterisk servers and multiple slave asterisk servers???Can anybody guide me??

I will be really thankful, if someone can help me.

Thanks.
kritikia

Down with master and slave! Equal rights for all Asterisk servers!
(this would be funnier if it wasn’t true- there was some local government in Texas that wanted to stop buying Dell computers because the IDE drives were labelled “Master” and “Slave”…)

but anyway

This is quite possible. The easiest way is to give each server its own extension range, say 4xxx for the master box, 5xxx for one slave and 6xxx for the other.

When one slave wants to dial the other, it just dials say 6xxx@masterbox, and the master box has a line saying like exten => _6XXX,1,Dial(SIP/otherslave/${EXTEN}). I think you might also be able to do this via iax2 with a switch statemnt, not sure about that though…

Hello IronHelix,

Thanks for the answer :smile: I want to ask you something upon this method that you say… where I have to register the servers (in the sip.conf? which server to register where ?)…?

I tried to do it with IAX not with SIP,but it is a kind of confusing with numbers and with prefixes…for this I want to see how my system behaves with the SIP channel.

Thanks again !

Kritikia

a rough outline-

master box sip.conf has friends defined for both other ones.
each other one only has the master box defined. Probably all as friends.
they either have each others IP or the other boxes register=> to the master box

then:

master box:
exten => _4XXX,1,Goto(extensions,${EXTEN},1) ; 4xxx extensions are local to master box
exten => _5XXX,1,Dial(SIP/otherbox1/${EXTEN}) ; send all the other calls to their right servers
exten => _6XXX,1,Dial(SIP/otherbox2/${EXTEN})

other box 1
exten => _5XXX,1,Goto(extensions,${EXTEN},1) ; 5xxx is local here
exten => _4XXX,1,Dial(SIP/masterbox/${EXTEN})
exten => _6XXX,1,Dial(SIP/masterbox/${EXTEN}) ; send other calls back to master

other box 2
exten => _6XXX,1,Goto(extensions,${EXTEN},1) ; 6xxx is local here
exten => _4XXX,1,Dial(SIP/masterbox/${EXTEN})
exten => _5XXX,1,Dial(SIP/masterbox/${EXTEN}) ; all other calls sent back to master

Were you to do it with a switch statement it might look like:
other box 2
exten => _6XXX,1,Goto(extensions,${EXTEN},1) ; 6xxx is local here
switch => SIP/masterbox

and I believe that will do the same thing but will match anything on the master box. Cant find much info on that tho.

Thanks a lot IronHelix for your interest and help!!!

kritikia

Hi kirtikia,

I have tried the same for connecting the two servers in a same network. i.e. we have two servers in a same LAN , and we need to make calls between the two servers . We are using sip clients . If u solved your problem , please let me know how to proceed…i did lot of online search …but nothing helped…

Thanks in advance…

Hi kirtikia,

I have tried the same for connecting the two servers in a same network. i.e. we have two servers in a same LAN , and we need to make calls between the two servers . We are using sip clients . If u solved your problem , please let me know how to proceed…i did lot of online search …but nothing helped…

Thanks in advance…

Sathish