Info About DID.

Home » Asterisk Users » Info About DID.
Asterisk Users 1 Comment

Hi!

I need to make a dialplan by DID.

where it gets the asterisk values did? from sip headers or … ?

Thanks!

One thought on - Info About DID.

  • It will all be taken care of for you, so you don’t have to do anything special for calls to a direct inbound number. When a call comes into your Asterisk via a SIP trunk or ISDN line and hits the appropriate context in your dialplan, the destination number (i.e., what the person on the other end dialled) will be in the variable ${EXTEN}. (But *note*, it may be in any one of several formats: local number only; national number with STD [town]
    code, with or without initial 0; international number with IDD [country] and STD [town] codes). The same provider will always present the number in the same format, though; so if they include the STD code, they will -always-
    insert it, even for calls within the same town where the caller dialled only the local number.

    If you define an “s” extension which displays the value of ${EXTEN} in the console, then dial one of your direct lines, you can work out how the number is being presented:

    exten => s,1,NoOp(Incoming call for ${EXTEN})

    Then you can write appropriate extension logic in your dialplan. For instance, if one of the dialled numbers comes in as “206318”, you just need to have an extension like this in your dialplan;

    exten => 206318,1,DoSomething()

    And when somebody dials that number, it will fire the appropriate extension in your dialplan.