Summary:ASTERISK-15008: With delayreject=yes calls sometimes fail
Reporter:Alec Davis (alecdavis)Labels:
Date Opened:2009-10-19 04:18:44Date Closed:2009-10-21 09:45:13
Versions:Frequency of
Environment:Attachments:( 0) iax_debug_sitea_cap2.txt
( 1) iax_debug_siteb_cap2.txt
Description:This is repeatable about 1 in ~10 calls

Every call succeeds when commenting out delayreject=yes in iax.conf.

Or with delayreject=yes set in iax.conf but also commenting out the following code in the 3 places iax2.c fixes it.<pre>
/* For security, always ack immediately */
                               if (delayreject)
                                       send_command_immediate(iaxs[fr->callno], AST_FRAME_IAX, IAX_COMMAND_ACK, fr->ts, NULL, 0,fr->iseqno);</pre>

Obvoiusly cannot stay this way, but the Security fix that applied these changes looks like it broke IAX.


repeating this in quick succesion on the console highlights the problem.
astrid*CLI> console dial 8899
astrid*CLI> console hangup

console output:
"removed the chan_oss warnings"

astrid*CLI> console dial 8899
   -- Executing [8899@default:1] Dial("Console/dsp", "IAX2/siteb/8899,,r") in new stack
   -- Called siteb/8899
   -- Call accepted by (format alaw)
   -- Format for call is alaw
   -- IAX2/siteb-16386 answered Console/dsp
<< Console call has been answered >>
astrid*CLI> console hangup
   -- Hungup 'IAX2/siteb-16386'
 == Spawn extension (default, 8899, 1) exited non-zero on 'Console/dsp'
<< Hangup on console >>
astrid*CLI> console dial 8899
   -- Executing [8899@default:1] Dial("Console/dsp", "IAX2/siteb/8899,,r") in new stack
   -- Called siteb/8899
   -- Hungup 'IAX2/siteb-16387'
 == Everyone is busy/congested at this time (1:0/0/1)
   -- Executing [8899@default:2] Hangup("Console/dsp", "") in new stack
 == Spawn extension (default, 8899, 2) exited non-zero on 'Console/dsp'
<< Hangup on console >>
Comments:By: Alec Davis (alecdavis) 2009-10-19 04:39:54

introduced ASTERISK-1821
similar fault description ASTERISK-4190

By: Alec Davis (alecdavis) 2009-10-19 05:17:50

debug attached of 3 consequtive calls. The 3rd fails.

By: Alec Davis (alecdavis) 2009-10-19 05:49:24

Please remove iax_debug_siteb.txt I didn't manage to capture both ends.

Using iax_debug_sitea_cap2.txt and iax_debug_siteb_cap2.txt, both captured at same time.

sitea is the originating site.
siteb is the terminating site.

The receive sequence gets out of order at site A. Timestamps are right, but received apparently out of order.

Site A, good call:

Site A, failed call:

By: Alec Davis (alecdavis) 2009-10-20 04:44:41

I forgot to include version number of these asterisk boxes SVN-branch-1.6.1-r202764M.

Updated to SVN-branch-1.6.1-r224673 and this issue is now fixed.

This closes this issue.

By: Leif Madsen (lmadsen) 2009-10-21 09:45:13

Fixed in 1.6.1 revision 224673. Issue closed. Thanks for following up!