I have to Asterisk systems joined by a IAX2 trunk.
System A have two nic boards (one lan and another wan)
System B is in LAN.
They are in diferent network, but they are conected to the same L3 data switch with routing enable.
I have a phone registered to System A though WAN, and a phone conected from System B.
If I call from System A to System B, I have no trouble but if I call from System B to A “all channels are busy”
Configuration:
System A:
outgoing:
host=192.168.200.5
username=test
secret=test
type=peer
disallow=all
allow=g729&alaw
incomming:
USER context=test
host=192.168.200.5
secret=test
type=peer
context=from-internal
disallow=all
allow=g729&alaw
For what it is worth I am using the following configuration which works well with different versions of asterisk and FreePBX and between different version mixes. I have found it is important that the Trunk Name and the opposite username match. This setup works equally well with IAX2 and SIP trunks. If you are using custom contexts you can change the context to any custom context you have set up and those rules will be obeyed:
Trunk Name: pbxA
PEER Details:
username=pbxB
type=friend
secret=password
qualify=yes
host=pbxB IP address
disallow=all
allow=ulaw
context=from-internal
Trunk Name: pbxB
PEER Details:
username=pbxA
type=friend
secret=password
qualify=yes
host=pbxA IP address
disallow=all
allow=ulaw
context=from-internal
Why do you have two almost identical peers, that won’t work well. Try type=friend and leave the inbound peer details blank. Inbound is only used when the system is terminating calls from a different server than it is originating.