IAX - Connection between two office


#1

Hi everyone,

I want to connect main office with one of the branch, then with the rest and use the main pbx as a gateway between branch calls. The problem is all my branches have dynamic IP. I can make phone calls from my branchA to the main office but not on the other way. Here is my configuration:

Asterisk on Branch Office (SERVER A)
(Dynamic IP – behind Nat)

iax.conf
[general]

Register => branch1:password1@serverB

[interoffice]
Type=friend
Host=serverB
Username=branch1
Secret=password1

extensions.conf

[outbound-interoffice]

Exten => _7XXXX,1,Dial(IAX2/interoffice/${EXTEN:1})

Asterisk on Main Office (SERVER B)
(Public IP)

iax.conf
[general]

[branch1]
Type=friend
Secret=1234
Host=dynamic

extensions.conf

[outbound-interoffice]
Exten => _7XXXX,1,Dial(IAX2/branch1:password1/${EXTEN:1})


#2

You may have to make sure username and secret are the same at both ends.

Have you read:

voip-info.org/wiki-Asterisk±+dual+servers


#3

Thanks WillKemp,

I read a lot of docs related to this matter (including voip-info.org), because of that I’m able to make calls from branch to main office, but i didn’t find any configuration for calls from main office to branch office (which has dynamic IP).

MainOffice Asterisk
*CLI> – IAX2/branch1-5 is circuit-busy
– Hungup ‘IAX2/branch1-5’
==Everyone is busy/congested at this time (1:0/1/0)

Branch office Asterisk
*CLI> blank… nothing happens…

Any clue?