[Asterisk-Dev] Dial() and non-BUSY failures

Stephen Davies steve at daviesfam.org
Tue Dec 23 12:36:26 MST 2003


Hi,

Dial() treats failures like busy.  Or, more exactly, if all dialed
addresses fail then Dial reacts like all were Busy.

For example, doing Dial(Zap/1/number) when the Zap/1 interface is
already in use will cause Asterisk to report first "Unable to create
channel of type Zap" and then "Everyone is busy at this time" and then
branch to step+101.

You can't distinguish between the busy channel and a busy remote
number.  Which makes it hard to know whether to retry the call on
another interface (over IAX, say) or to play Busy to the caller.

In dial_exec in app_dial.c I adjusted the big do-while loop to count
the number of ast_requests that succeed.  At the end of the loop, if
none succeeded then I just exited with res=0.

This works much better for me - in that in extensions.conf flow just
continues and I can attempt another Dial on a different interface.

I suspect that what is really needed is more specific result codes
from the apps, exposed to the extensions.conf level where they can be
handled "programmatically".  But that's for another day.

In the meantime my simple change seems to be an improvement.  Mark, do
you want a patch?

Regards,
Steve




More information about the asterisk-dev mailing list