1 |
Creating or editing the inbound context |
|
Here we will configure the inbound context which will be used to handle the routing of inbound calls to your Asterisk installation. To create this context you can either use the command line or a text editor to edit the extensions.conf file.
Once you are able to access the extensions.conf file you can follow the steps below:
1. Enter the following context:
[incoming]
exten => s,1,Set(Var_TO=${SIP_HEADER(TO)})
exten => s,2,GotoIf($["${Var_TO}" = "<sip:1777MYCCID@callcentric.com>"]?extension2,s,1:3)
exten => s,3,GotoIf($["${Var_TO}" = "<sip:1777MYCCID@ss.callcentric.com>"]?extension2,s,1:4)
exten => s,4,GotoIf($["${Var_TO}" = "<sip:MYCCDID@ss.callcentric.com>"]?extension1,s,1:5)
exten => s,5,GotoIf($["${Var_TO}" = "<sip:MYCCDID@66.193.176.35>"]?extension1,s,1:6)
exten => h,6,Macro(hangupcall)
Where <sip:1777MYCCID@callcentric.com> and <sip:MYCCDID@ss.callcentric.com> are the exact information returned by Callcentric's servers for your 1777 number and any DID on your account, respectively.
And where extension1 and extension2 are contexts which decide where to send the call. For example:
[extension1]
exten => s,1,Dial(SIP/100)
[extension2]
exten => s,1,Dial(SIP/200)
2. Save the file.
|
2 |
Configure your inbound routing to route to your DID routing context |
|
In your extensions.conf file use the following, from-callcentric can also be your own incoming context:
[from-callcentric]
exten => s,1,Goto(incoming,s,1)
|
3 |
Placing Test Calls |
|
Once you are done save your changes and then test incoming calling to see that your Asterisk setup now routes inbound calling based on the number called.
To test inbound calls from Callcentric to your new DID based routing setup, follow the directions listed in this FAQ.
You will also want to test calls directly to your DID from a PSTN phone if you have a DID on your account.
|
|