Attempt to Originate between IAX2/xxxx and an application hangs until timeout in

Home » Asterisk Users » Attempt to Originate between IAX2/xxxx and an application hangs until timeout in
Asterisk Users 4 Comments

I am investigating an issue with IAX2 extensions in Asterisk 1.8.x. My application connects to Asterisk via AMI and attempts to run an Originate command between an extension (such as SIP/5555 or IAX2/8888) and an application (in my case it is AgentLogin).
This works correctly for SIP extensions, in all Asterisk versions. With IAX2 extensions, this worked correctly in Asterisk, but started failing sometimes in Asterisk 1.8.7, and now happens every time in Asterisk I found out that any
application (not just AgentLogin) will trigger the issue. Instead of successfully ringing the IAX2 extension, as expected, the Originate attempt just sits there. The IAX2 extension does not receive any ringing indication. I can reproduce the issue by
running the following command from the Asterisk console:

originate IAX2/1099 application playback demo-congrats

This is supposed to ring the extension, and upon picking up, should play the audio file. Instead, the IAX2 extension sits idle. Also, the Asterisk console becomes unresponsive. If I try to execute any other command (such as “iax2 show threads”, or even
“help”), I get a prompt back but no command output. Then, after some time (the ring timeout, maybe), I get the output of all commands I issued during the hang.

When my application connects to AMI and runs the Originate command, it eventually gets a Hangup event, as if the extension never picked up the ringing. But actually the ringing never made it to the IAX2 extension.

We have noticed that the IAX2 extension itself can place calls to a SIP extension normally during the Originate hang, but it cannot receive a call from another SIP extension (Busy Here). When not attempting the Originate call, the IAX2 extension appears to
behave normally.

This has been triggered in three machines to date: a big server with some 40 IAX2 extensions, and two test machines (one physical and one virtual machine).

Before I get into a bug hunt, I would like to know: Is this a known issue? Are there any pointers on where to look first, or what to look for, based on my symptoms?

Testing with Asterisk x86_64 and Zoiper as an IAX2 client.

4 thoughts on - Attempt to Originate between IAX2/xxxx and an application hangs until timeout in

  • El 11/01/12 15:37, Alex Villací­s Lasso escribió:
    Some additional information – it is the Originate with IAX2 channel that has problems, not just applications. Given that 1099 is an IAX2 extension and 1065 is a SIP extension, with FreePBX contexts, i found that “originate IAX2/1099 extension
    1065@from-internal” hangs, but “originate SIP/1065 extension 1099@from-internal” succeeds.

  • El 11/01/12 18:01, Alex Villací­s Lasso escribió:
    Some more information about this:

    I have discovered the root cause of the issue. Due to a peculiarity of Zoiper 2.18, this program will *not* send a ACCEPT or RINGING packet back to Asterisk unless the NEW packet that announces the incoming call contains an IAX_IE_CALLING_NUMBER
    information element. It does not matter if the calling number is empty, but the corresponding IE must exist. This behavior is a change between Asterisk 1.6 and Asterisk 1.8.

  • Well, I applaud your troubleshooting skills and analysis… well done!

    Unfortunately, that IE is *not* mandatory in an IAX2 NEW packet, and
    thus Zoiper failing to properly process such NEW packets is a bug in
    Zoiper. Yes, Asterisk’s behavior has changed (since Caller ID handling
    was overhauled in Asterisk 1.8, while adding Connected ID support), but
    both the old and new behavior are compliant with the IAX2 protocol.

  • One good thing is now that you know what the problem is you should be able to work with zopier support and get them to fix zopier. They have been very responsive to a couple problems I have and I am running the free version.