Ron Fox wrote:
Arriving late to this discussion, sorry if this has already been mentioned
but DNIS and ANI can be variable length without confusion if the sender
uses the "*" DTMF tone as a delimiter. Thus sending *ANI*DNIS* (pronounced
"Star ANI Star DNIS Star" allows the receiver to identify the two values
unambiguously and to find the trailing boundary (when the 3rd "*" has been
received).

We have a Channelized Voice T1 from a long distance provider that is set
up this way into our non-Asterisk PBX where the provider sends us ANI as
the full originating phone number and DNIS as the "last 4 digits".  So the
DTMF string seen by our PBX for someone calling one of our toll-free
numbers, say 800-123-4567, from a local phone in Hawaii, say 808-555-1313,
would be "*8085551313*4567*".  The PBX parses this string and uses the
last 4 digits DNIS to route the call from the T1 trunk group to the proper
internal extension or hunt group.

Do Asterisk and Digium or Sangoma T1/E1 cards know about delimited ANI and DNIS?

Not really, but you can emulate this by something like this (not tested, but the idea and method is sound):

exten => _*NXXNXXXXXX*XXXX*,1,Set(MY_ANI=${EXTEN:1:10})
exten => _*NXXNXXXXXX*XXXX*,1,Goto(${EXTEN:12:4},1)

If you really have variable length of ANI and DID/DNIS then you would need to use the Cut() function and specify the delimiter as *. Doing it using Cut() is slightly more complicated, and requires more thought for the design, but would be more reliable.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

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

Reply via email to