[asterisk-users] Asterisk parking hold and transferdigittimeout

Jared Smith jsmith at digium.com
Wed Mar 26 07:01:13 CDT 2008


On Wed, 2008-03-26 at 12:30 +0100, Guido Hecken wrote:
> Now, what happens:
> 
> Call for 9556230 reaches capi-in, is redirected through include statement to
> capi-in-sub and executed.
> So far so fine, expected behaviour.
> 
> Call for 95562315 reaches capi-in and is executed direct, the include
> directive isn't executed at all!
> Why?
> Through the include statement, asterisk has to look first in capi-in-sub,
> there it should
> find this extension:
> exten => 95562315,1,DoSomethingAnybodyWouldExpect()
> ...
> 
> and follow the dialplan under capi-in-sub since a valid extension was found.
> 
> What's wrong, any ideas?

This is a very popular misconception regarding include statements, so
let me try to reiterate how includes work.

When a call comes into a particular context, Asterisk looks for the
following items:

1) Exact matches in the current context.  If a match is found, Asterisk
will not continue searching.
2) Pattern matches in the current context.  If at least one pattern
match is found that matches the dialed extension, Asterisk will not
continue searching (even if a better match is included .
3) Any "switch =>" statements.  These can be used for remote dialplan
lookups, realtime dialplan lookups, DUNDi, etc.  If Asterisk finds at
least one match, it will not continue searching.
4) Any included contexts.  These will be followed in order, and for each
included context, this same list will be applied.

In your example above, you somehow assumed that the included context
would be searched, even though Asterisk already found a match in the
current context.
   
-- 
Jared Smith
Community Relations Manager
Digium, Inc.




More information about the asterisk-users mailing list