[asterisk-dev] chan_dahdi - can not dial FXS until call is first recieved - including fix

Karl Fife karlfife at gmail.com
Sat Jan 10 21:04:16 CST 2009

Someone mentioned the following issue (below) on the users list back in October (on Asterisk 1.6.0-beta9 & Dahdi 2.0.x)
I'm seeing it now on and Dahdi 2.1.x.

The original poster (Jim Duda) made a one-line change in chan_dahdi.c which fixed the problem for him 
I made the same 1-line change in chan_dahdi.c in asterisk, recompiled, and the issue was fixed for me as well.  

Jim seems like a very talented developer but new to Asterisk & he didn't have the time to follow up and submit the patch.  I'd like to present the issue here in this forum with the fix.  I've never posted a bug before, so I though I'd post it here in high-level terms for a sanity check.  If it's a bona-fide bug, I'll take it to the next level.  

The one-line fix is listed below, but unfortunately I'm not good enough yet to understand the theory of this fix (and whether it's brilliant and elegant or a total kludge).

Thanks for looking at this and thanks in advance for your directives.
-Karl Fife

Asterisk & Dahdi 2.1.x (for me)
Asterisk 1.6.0-beta9 & Dahdi 2.0.x (originally for Jim)

AFTER a system reboot, If I attempt to dial from a device attached to an FXS port on my TDM800P (only after a reboot), I get the following error:

[Jan 10 04:23:05] WARNING[2975]: app_dial.c:1502 dial_exec_full: Unable to create channel of type 'DAHDI' (cause 0 - Unknown)
  == Everyone is busy/congested at this time (1:0/0/1)

BUT after the first INBOUND call to the device on that FXS port, I the issue disappears and the device/port continues to work normally until the next reboot.

Restarting Dahdi and/or reloading chan_dahdi does not cause the issue to reappear
Restarting Asterisk does not cause the issue to reappear

On line 8730
of chan_dahdi.c
replace a "return 0"  with return "1".

if (par.rxisoffhook)
return 1;
- return 0;
+ return 1;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090110/080c6a95/attachment.htm 

More information about the asterisk-dev mailing list