[asterisk-users] Does Asterisk support DNIS?

Yuan LIU yliu11 at hotmail.com
Mon Feb 19 01:02:46 MST 2007


>From: "David Ruggles" <david at safedatausa.com>
>Date: Sun, 18 Feb 2007 20:41:46 -0500
>
>I'm sending 12345 as DNIS on a Wink Start T1. In case it makes a 
>difference,
>I'm using a Sangoma A101 card. Asterisk sees each digit as a separate
>extension number so most of the dialplain suggestions offered so far won't
>work. I did try the Wait() function as was suggested. I tried it first in 
>an
>"s" extension but this didn't work, it still gave the error: "Unknown
>extension '1' in context '1st-T1' requested" I then changed it to extension
>1 and while it does seem to work (it doesn't try the other extensions) it
>seems like the DNIS is completely lost.

I'm still confused.  As others indicated, when DNIS is offered, there must 
be a delimiter of some kind (like *).  When both ANI and DNIS are offered, 
the order must be predetermined, too.

I understand that your dial plan reacts to each digit as separate 
extensions.  The first thought I have is: what's the TIMEOUT(digits) value?  
Might it be too short so Asterisk won't see the DNIS string as a group?

A second thought test is: do you see any of the predefined delimiters in 
Asterisk? i.e., when dial plan branches to DNIS digits, does it ever stop at 
extension '*'?

DNIS must use either timeout and delimiter, or both, to separate itself from 
actual voice.

Assume delimiters are there, and assume that your dial plan won't budge with 
a reasonable TIMEOUT(digits) so it still sends the call to extensions '*', 
'1' - '5', '*'.  There are still ways to reassemble the entire DNIS string 
from these discrete extensions.  e.g., (untested code)

exten => s,1,DNIS=""; resets
exten => s,n,Answer()
exten => *,1,GotoIf(${DNIS}=""?more:); delimited as *DNIS*
exten => *,n,DNIS=${DNIS:1}
exten => *,n,Goto(handleDNIS,${DNIS},1); hand call to another context
exten => *,n(more),NoOp(start collecting DNIS)
exten => _X,1(),DNIS=${DNIS}${EXTEN}

Yuan Liu

>As I said in my first post (although it may have been a little too 
>abrasive)
>this configuration is very standard and so I find it hard to believe that
>Asterisk can't handle it.
>
>Thanks,
>
>David Ruggles
>CCNA MCSE (NT) CNA A+
>Network Engineer  Safe Data, Inc.
>(910) 285-7200    david at safedatausa.com




More information about the asterisk-users mailing list