Multiple DID Based Call Routing

Hi,

My Account Number: 17771234567
DID Numbers: 19292212345 and 15163612345

I want to do the following things:

  1. When user dials 19292212345, it should play IVR.
  2. When user dials 15163612345, it should ring 123 extension.

I followed the callcentric.com/support/device/did_routing link and below is my configuration:

sip.conf:

[general]
context=default
disallow=all
allow=ulaw
allow=g729
allow=alaw
dtmfmode = rfc2833
context=from-callcentric
srvlookup=yes
register => 19292212345:password@callcentric.com

[123]
type=friend
username=123
host=dynamic
secret=123
context=default

extensions.conf:

[general]
static=yes
writeprotect=no

[default]
exten => 123,1,Answer()
exten => 123,n,Dial(SIP/123,20,tr)
exten => 123,n,Hangup

include => from-callcentric
include => incoming
include => from-ivrabc

[from-callcentric]
exten => s,1,Goto(incoming,s,1)

[incoming]
exten => s,1,Set(Var_TO=${SIP_HEADER(TO)})
exten => s,2,GotoIf($["${Var_TO}" = “sip:17771234567@callcentric.com”]?extension2,s,1:3)
exten => s,3,GotoIf($["${Var_TO}" = “sip:17771234567@ss.callcentric.com”]?extension2,s,1:4)
exten => s,4,GotoIf($["${Var_TO}" = “sip:19292212345@ss.callcentric.com”]?from-ivrabc,s,1:5)
exten => s,5,GotoIf($["${Var_TO}" = “sip:19292212345@66.193.176.35”]?from-ivrabc,s,1:6)
exten => s,6,GotoIf($["${Var_TO}" = “sip:15163612345@ss.callcentric.com”]?Dial(SIP/123,20,tr):5)
exten => s,7,GotoIf($["${Var_TO}" = “sip:15163612345@66.193.176.35”]?Dial(SIP/123,20,tr):7)
exten => h,8,Macro(hangupcall)

include => default
include => from-ivrabc

[from-ivrabc]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Set(TIMEOUT(digit)=5)
exten => s,n,Set(TIMEOUT(response)=20)
exten => s,n,Background(welcome)
exten => s,n,Goto(from-ivrabc,s,1)

include => incoming
include => default

Please correct the above configuration. I think I am doing some mistake in [incoming] section.

Please do needful. Thanks in advance.

Regards,
Chandra.

The DID number is used as the extension in the incoming context. You should not need to look at the To header (and, in any case, that is not, the information on which routing should be performed).

123 is not an extension. It is a device address.

As you got the weird configuration advice (which may be a workaround for defects in their sip configuration) from Concentric, you should ask them for support.

If all else fails, you will need to provide a copy of the SIP INVITEs that they are actually sending, so we can work out how to cope with their non-standard usage.