inbound route for direct SIP connections?

Joined
Dec 14, 2008
Messages
1,120
Points
0
How can I create an inbound route for calls directed to my pbx directly ie sip:blahblah@mydomain.com

I have created an inbound route with DID:Any and CID:any and accept anonymous sip call to at least receive the calls, but I would like to be able to create different routes depending on the sip address that is used.

Specially for people using ENUM on my DIDs, I'm loosing the DID information in the process (even if I've registered each DID with a different sip address).
 
Joined
Dec 14, 2008
Messages
1,120
Points
0
I've made some good progress.

if I dial sip:extension@mydomain.com it is routed to extension
if I dial sip:did@mydomain.com it will be routed to the inbound route that has the did

my problem was in fact with zoiper and X-lite.

when I dial sip:blahblah@mydomain.com with Zoiper Asterisk does not detect any extension in
[from-sip-external]
exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
exten => _.,n,Goto(s,1)
exten => s,1,GotoIf($["${ALLOW_SIP_ANON}"="yes"]?from-trunk,${DID},1)


and then go directly to the [from-trunk]

now, if I dial the same with x-lite, the blahblah is seen as an extension, and will be converted as DID by the [from-sip-external] to be able to be routed correctly...


Patrick
 
Joined
Dec 14, 2008
Messages
1,120
Points
0
now if you want to avoid that external sip connections can dial directly to an extension and bypass your inbound routes you can add in extensions_override_freepbx.conf

[from-pstn]
include => from-pstn-custom
include => ext-did
include => ext-did-post-custom
;include => from-did-direct
include => ext-did-catchall
exten => fax,1,Goto(ext-fax,in_fax,1)


That's just a copy of the [from-pstn] context from extension.conf with the include => from-did-direct commented out.
 

Members online

No members online now.

Forum statistics

Threads
30,992
Messages
131,106
Members
17,716
Latest member
Orbit114
Top