Alex Villacís Lasso
2012-Jan-11 20:37 UTC
[asterisk-users] Attempt to Originate between IAX2/xxxx and an application hangs until timeout in 1.8.8.1
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 1.6.2.20, but started failing sometimes in Asterisk 1.8.7, and now happens every time in Asterisk 1.8.8.1. 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 1.8.8.1 x86_64 and Zoiper as an IAX2 client.
Alex Villacís Lasso
2012-Jan-11 23:01 UTC
[asterisk-users] Attempt to Originate between IAX2/xxxx and an application hangs until timeout in 1.8.8.1
El 11/01/12 15:37, Alex Villac??s Lasso escribi?:> 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 1.6.2.20, but started failing sometimes in Asterisk 1.8.7, and now happens every time in Asterisk 1.8.8.1. 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 1.8.8.1 x86_64 and Zoiper as an IAX2 client.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 at from-internal" hangs, but "originate SIP/1065 extension 1099 at from-internal" succeeds.
Alex Villacís Lasso
2012-Jan-12 17:58 UTC
[asterisk-users] Attempt to Originate between IAX2/xxxx and an application hangs until timeout in 1.8.8.1
El 11/01/12 18:01, Alex Villac??s Lasso escribi?:> El 11/01/12 15:37, Alex Villac??s Lasso escribi?: >> 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 1.6.2.20, but started failing sometimes in Asterisk 1.8.7, and now happens every time in Asterisk 1.8.8.1. 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 1.8.8.1 x86_64 and Zoiper as an IAX2 client. > 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 at from-internal" hangs, but "originate SIP/1065 extension 1099 at from-internal" succeeds.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.
Reasonably Related Threads
- Zopier Client
- How to allow AMI access to Originate yet deny Application: System
- Help debugging a possible SIP channel leak in 11.17.0, possible race condition
- Originate calls with AMI.
- How to configure asterisk to only accept SIP from kamailio@localhost but exchange RTP on all interfaces?