(Solved) Inbound route - DID-based? |
|
I have a same problem, on PBXes Premium account, we have a SIP trunk receiving calls for 11 DID.
I did a SIP trace: our DID provider sends the called number in the "To" SIP INVITE header:
To: <sip:[email protected]>
Now I configured a single SIP trunk with the main number, that is registered just fine.
Then I've added an inbound route to an extension with the trunk name: the extension rings to any of the 11 DID.
To route the call depending of what number is called, I would probably need to create 11 incoming routes with the name of the trunk, but I don't see a field "called ID", is there a special syntax like using a suffix to the trunk name?
Solution
You need to edit the `extension.conf` file, context `ext-did` in Source View, which require a Premium or Pro account.
[ext-did]
; Generated by the web interface inbound routing
exten => 41376543210,1,SetVar(FROM_DID=41376543210)
exten => 41376543210,2,SetVar(FAX_RX=disabled)
exten => 41376543210,3,Goto(ext-local,200,1)
exten => 41376543211,1,SetVar(FROM_DID=41376543211)
exten => 41376543211,2,SetVar(FAX_RX=disabled)
exten => 41376543211,3,Goto(ext-local,201,1)
exten => 41376543212,1,SetVar(FROM_DID=41376543212)
exten => 41376543212,2,SetVar(FAX_RX=disabled)
exten => 41376543212,3,Goto(ext-local,201,1)
; Custom routing for DID trunk
exten => TrunkName,1,Set(original_did=${CUT(CUT(SIP_HEADER(To),@,1),:,2)})
exten => TrunkName,2,GotoIf($["${original_did}" = "41376543210"]?41376543210,1:TrunkName,3)
exten => TrunkName,3,GotoIf($["${original_did}" = "41376543211"]?41376543211,1:TrunkName,4)
exten => TrunkName,4,GotoIf($["${original_did}" = "41376543212"]?41376543212,1:TrunkName,5)
exten => TrunkName,5,Hangup
This post has been edited 3 time(s), it was last edited by eco on 06.11.2024 at 15:28.
|