My understanding regarding the pattern match order is that Asterisk will not 
search include=> contexts unless there is no matching extension in the 
"original" context.  So, since _X. matches anything, the include=>parkedcalls 
context will never be searched.

A better way to accomplish what you want to do is to use exten => i (the 
Asterisk reserved extension for "invalid") to catch mis-dialed calls.  That way 
Asterisk will search for correct extensions in the original context, then 
search your include=> contexts, then fall through to exten => i if nothing 
matches.  And the i DOES need to be lower case.

-----Original Message-----
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Sebastian Arcus
Sent: Sunday, February 26, 2012 5:32 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Possible bug (or feature?) in extension matching and 
parking feature

I wanted a custom extension to match miss-dialled numbers in my dialplan. I've 
included the following:

exten => _X.,1,Answer()
exten =>
_X.,n,Playback(extension_not_found_please_make_sure_you_dial_nine_in_front_of_external_numbers)
exten => _X.,n,Hangup()

However, this has the curious side effect of making the parking extensions 
(located at 700, 701-720 - as per defaults) invisible. For some reason Asterisk 
doesn't seem to include those extensions on an even footing with extensions in 
the local context when extensions matching, although they are included with 
"include => parkedcalls". I can't park calls by transferring them to 700, I 
can't reach calls parked with the one step dialling sequence (which continues 
to work) any more.

My understanding is the * would match the most specific extension first
- but it would appear that this doesn't apply to parking extensions. All other 
extensions work fine when using the custom extension above.

I'm running Asterisk 10.1.2

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to 
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
The message does not contain any threats
AVG for MS Exchange Server (2012.0.1913 - 2114/4833)
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to