[asterisk-users] Calling rules

Steve Edwards asterisk.org at sedwards.com
Tue Jan 18 13:06:47 CST 2011


Un-top-posting and discarding cruft...

On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote:

> Users, have to dial "0" to get an external line, and afterwords the 
> number they want to dial (exe 12345). The thing is:
>
> 1-If user dial "012345" there is an error and the call isn't made and 
> the error is "handle_request_invite: Call from 'XXX' to extension 
> '012345' rejected because extension not found in context 
> 'DLPN_DialPlanX'. 2-If user dials "0" waits for the signal, and then 
> dials "12345" then it works fine.
>
> Should the result be the same? Shouldn't asterisk automatically "dial" 
> 0, wait and then dial the external number?

> From: "Danny Nicholas" <danny at debsinc.com>

> My best guess is that it is a "dialplan inconsistency".  The "standard" for
> "outside line" dialing is something like this:
> - exten => 0.,1,Dial(DAHDI/1,${EXTEN:1})
> Where the dialplan "chomps" the first digit off of the dialed string.

On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote:

> exten = _0,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,)
>
> Notice the difference between your "0." and my "_0".
>
> Is "mine" correct?

Both are 'wrong.'

I'm guessing Danny just typed that in off the top of his head -- he forgot 
the leading underscore in the pattern.

Please read up on pattern matching. In particular, what '_' and '.' mean.

http://www.voip-info.org/tiki-index.php?page=Asterisk%20config%20extensions.conf
http://www.voip-info.org/wiki/view/Asterisk+Dialplan+Patterns
http://www.voip-info.org/wiki/view/Asterisk+Extension+Matching

Should get you started.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list