daknetworks.com

You are here: Blog Asterisk Interoffice Calling Doesn't Work | IAX2

Asterisk Interoffice Calling Doesn't Work | IAX2

Three pbx/asterisk servers. MPLS is in place. Two servers can interoffice call through extension number. The third is reachable through the main number but not through extension number. It waits, then says "goodbye" and hangs up.

Looking at the logs when a call is made:

-type: asterisk -rvvvvv
-dial an extension in the other office
-returns:
======

[Apr 26 16:52:37] WARNING[5653]: app_dial.c:1523 dial_exec_full: Unable to create channel of type 'IAX2' (cause 20 - Unknown)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-remote-call:11] Goto("Local/P1220@hud-caller-answer-e107;1", "s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-remote-call,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-remote-call:1] Goto("Local/P1220@hud-caller-answer-e107;1", "s,x-dial") in new stack
    -- Goto (macro-remote-call,s,12)
    -- Executing [s@macro-remote-call:12] Dial("Local/P1220@hud-caller-answer-e107;1", "IAX2/c10325x@c16067x/1524775950.8016-1-3109-external-") in new stack
[Apr 26 16:52:37] WARNING[5653]: app_dial.c:1523 dial_exec_full: Unable to create channel of type 'IAX2' (cause 20 - Unknown)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Timeout on Local/P1220@hud-caller-answer-e107;1
  == CDR updated on Local/P1220@hud-caller-answer-e107;1
    -- Executing [t@internal:1] BackGround("Local/P1220@hud-caller-answer-e107;1", "vm-goodbye") in new stack

=====

-type: asterisk -R -x 'iax2 show peers'
Name/Username    Host                 Mask             Port          Status
c23013x          10.162.44.31    (S)  255.255.255.255  4569          OK (44 ms)
c23013i          10.162.44.31    (S)  255.255.255.255  4569          OK (44 ms)
c16067x          10.162.30.10    (S)  255.255.255.255  4569          UNREACHABLE
c16067i          10.162.30.10    (S)  255.255.255.255  4569          UNREACHABLE
4 iax2 peers [2 online, 2 offline, 0 unmonitored]

This shows that the servers are set to be reached through the local IP addresses in the MPLS. This also shows that the second server is "unreachable."

-there is a file at: /etc/asterisk/iax.conf
-iax is interoffice asterisk exchange

Perhaps what is happening here is that the UDP port binding in the MPLS is maintained by sending traffic through it. The binding expired, and there is no way for Asterisk to communicate with the IAX peer (other-Asterisk).

-go to remote asertisk server that cannot be reached.
-type: asterisk -R -x 'iax2 show peers'
Name/Username    Host                 Mask             Port          Status
c23013x          10.162.44.31    (S)  255.255.255.255  4569          UNREACHABLE
c23013i          10.162.44.31    (S)  255.255.255.255  4569          UNREACHABLE
c11025x          10.162.100.31   (S)  255.255.255.255  4569          UNREACHABLE
c11025i          10.162.100.31   (S)  255.255.255.255  4569          UNREACHABLE
4 iax2 peers [0 online, 4 offline, 0 unmonitored]

This shows that the server cannot reach either of the other two servers.

You have 2 options here.

1- Restart the iax service

asterisk -rx "module unload chan_iax2.so"
sleep 90;
asterisk -rx "module load chan_iax2.so"

2- Rebooted the server:

-type: /sbin/shutdown -r +5

-wait for reboot to finish

-type: asterisk -R -x 'iax2 show peers'
Name/Username    Host                 Mask             Port          Status
c23613x          10.162.44.31    (S)  255.255.255.255  4569          OK (40 ms)
c23613i          10.162.44.31    (S)  255.255.255.255  4569          OK (41 ms)
c11325x          10.162.100.31   (S)  255.255.255.255  4569          OK (28 ms)
c11325i          10.162.100.31   (S)  255.255.255.255  4569          OK (28 ms)

You can see the peers are reachable again.

NOTES:
http://www.cyber-cottage.co.uk/?p=994
https://www.voip-info.org/asterisk-iax-qualify

Contact Dak Networks

We are not taking on new clients at this time.