Dual server problem


#1

I have two Asterisk servers. One with IP 192.168.0.87 (SmartPBX), another one with IP 192.168.1.86 (BrikerPBX) .

I am trying to connect both servers together in order to let the extensions of each server can call to another server.

My code as following:
192.168.0.87 iax.conf:

[code][general]
register=BrikerPBX:123456@192.168.1.86

[SmartPBX]
type=friend
host=dynamic
auth=md5
secret=123456
context=iax2user
peercontext=iax2user
qualify=yes[/code]

192.168.0.87 extensions.conf:

exten => _100Z,n,Dial(SIP/${EXTEN},15) exten => _100Z,n,Hangup() exten => _39XX,1,Dial(IAX2/SmartPBX/${EXTEN}@iax2user) exten => _39XX,n,Hangup() exten => i,1,Congestion()

192.168.1.86 iax.conf

[code][general]
register=SmartPBX:123456@192.168.0.87

[BrikerPBX]
type=friend
host=dynamic
auth=md5
secret=123456
context=iax2user
peercontext=iax2user
qualify=yes[/code]

192.168.1.86 extensions.conf:

exten => _39XX,1,Dial(SIP/${EXTEN},15) exten => _39XX,n,Hangup() exten => _100Z,1,Dial(IAX2/BrikerPBX/${EXTEN}@iax2user) exten => _100Z,n,Hangup() exten => i,1,Congestion()

However, I am manage to make calls from SmartPBX to BrikerPBX, but not BrikerPBX to SmartPBX. Wish to ask, is there anything I have missed out?

Thanks in advance.


#2

And now, they both automatically cannot call each other while i did nothing on the code. :cry:


#3

hi,

try to set the ip’s in “host=”. on .87 put host=192.168.1.86 and on .86 host=192.168.1.87
just a quick idea…

greets


#4

[quote=“bulkorok”]hi,

try to set the ip’s in “host=”. on .87 put host=192.168.1.86 and on .86 host=192.168.1.87
just a quick idea…

greets[/quote]

Hi bulkorok,

Thanks for replying, and you are really helpful, after assigning hosts to a static IP, both works.

Wish to ask, why “host=dynamic” doesn’t work?

Thanks.

Regards,
Johnson