Inbound DID routing help

Hey - I can see the inbound SIP invites from my gateway, however they all get routed to the invalid station intercept.

I looked at th code and it looks right.

Inbound is very close. I have tried changing the context to from-trunk and from-pstn with no change. The box answers with a not in service message. I tried to follow the contexts in extensions.conf just to understand the meaning of the context but could not figure it out.

I have copied my trunk settings below,

[ext-did]
include => ext-did-custom
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => s,1,Set(__FROM_DID=${EXTEN})
exten => s,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => s,n,Set(CALLERID(name)=${CALLERID(num)})
exten => s,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => s,n,Goto(from-did-direct,200,1)
exten => 6312846580,1,Set(__FROM_DID=${EXTEN})
exten => 6312846580,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => 6312846580,n,Set(CALLERID(name)=${CALLERID(num)})
exten => 6312846580,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => 6312846580,n,Goto(from-did-direct,203,1)

[[email protected]]
type=friend
insecure=very
host=64.158.162.78
context=from-trunk

Debug trace:

Executing NoOp(“SIP/64.158.177.99-08fd42a0”, “Received incoming SIP connection from unknown peer to 6312846580”) in new stack
– Executing Set(“SIP/64.158.177.99-08fd42a0”, “DID=6312846580”) in new stack
– Executing Goto(“SIP/64.158.177.99-08fd42a0”, “s|1”) in new stack
– Goto (from-sip-external,s,1)
– Executing GotoIf(“SIP/64.158.177.99-08fd42a0”, “0?from-trunk|6312846580|1”) in new stack
– Executing Set(“SIP/64.158.177.99-08fd42a0”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2008-03-07 04:01:54 UTC.
– Executing Answer(“SIP/64.158.177.99-08fd42a0”, “”) in new stack
– Executing Wait(“SIP/64.158.177.99-08fd42a0”, “2”) in new stack
– Executing Playback(“SIP/64.158.177.99-08fd42a0”, “ss-noservice”) in new stack
– Playing ‘ss-noservice’ (language ‘en’)
– Executing PlayTones(“SIP/64.158.177.99-08fd42a0”, “congestion”) in new stack
– Executing Congestion(“SIP/64.158.177.99-08fd42a0”, “5”) in new stack

Try allowing anonymous sip and set up an inbound route for your DID. Watch the CLI as a call comes in and see where it goes.

Thank you, that works and I can change the route and point the DID to any extension. I would like to figure out how to get the inbound route correct so that I can tearn this off.

I have both originating IP addresses for the inbound. It will always be in the form of a tel uri [email protected]

I will continue digging. The help is much appreciated.

I leave anonymous SIP on all of the time. I do not, however, have an any/any route. I feel that anonymous SIP is no less a risk than a regular POTS line as long as you don’t have that any/any route. Anyone that calls your box over SIP will have to know one of your DID’s, just like a POTS line.

I’m having a problem with Incoming DIDs as well. I am trying to use the Zap Channel DID, which is supposed to assign the same DID to all calls on that particular channel right, but when I put the DID I assigned into the incoming DID the system rings wrong number.