QUESTION DID-based inbound routing problem

noguru

New Member
Joined
May 15, 2016
Messages
6
Reaction score
0
I have successfully managed to install WM's latest Raspi Incredible PBX 12.0.74 on Asterisk 13, and I am testing it for my own small business. I managed to setup serveral trunks to providers (in Switzerland btw) and a handful test-extensions as well. However, I am stuck with a problem with inbound routes. For some reason, I cannot route incoming calls based on their DID. Any inbound call seems to take the pre-configured AnyDID/AnyCID inbound route (as a catch-all), no matter what route I setup. (Testing an inbound route for a specific CID works fine though!)

It looks to me like my Swiss providers do not hand down the DID in a properly.

Any hints on how to test/debug/fix this ?
(I have to say that I am new to Asterisk, but old to Linux)
Thanks for any advice.
 
Is the last entry on your trunk registration after a / the DID of the trunk? What is placed here would be the DID for your inbound route.
 
Is the last entry on your trunk registration after a / the DID of the trunk? What is placed here would be the DID for your inbound route.
My registration strings look like:
register=41415112128:[email protected]
register=0413606544:mysecret:[email protected]
with the local phone-number (0413606544 in the second registration) at the start.
I have to emphasize, that all calls from all registered number do come in and can be answered. I just can't route them to different ring-groups based on their individual DIDs.
 
Try adding /NXXNXXXXXX at the end of your dial string where NXXNXXXXXX is the DID associated with that trunk. Then set an inbound route for that same DID and send it to your desired destination.

Most providers use that string at the end to format an incoming request sent to you when an incoming call happens. The numbers at the beginning of the register string are really your user account number not a real DID. In many cases however a DID is used as your account number, so they would look the same.

The reason the calls are going to the default catch all is that asterisk is not able to find a DID you specified in the incoming call request. You should be able to look at the >Reports>CDR Reports in the DID column to see what is being sent as the current DID value. Then after you add the /NXXNXXXXXX string at the end of your trunk registration string, make and incoming call and go back and check the >Reports>CDR Reports in the DID column to see how it is changed.
 
Last edited:
Try adding /NXXNXXXXXX at the end of your dial string where NXXNXXXXXX is the DID associated with that trunk. Then set an inbound route for that same DID and send it to your desired destination.

Most providers use that string at the end to format an incoming request sent to you when an incoming call happens. The numbers at the beginning of the register string are really your user account number not a real DID. In many cases however a DID is used as your account number, so they would look the same.

The reason the calls are going to the default catch all is that asterisk is not able to find a DID you specified in the incoming call request. You should be able to look at the >Reports>CDR Reports in the DID column to see what is being sent as the current DID value. Then after you add the /NXXNXXXXXX string at the end of your trunk registration string, make and incoming call and go back and check the >Reports>CDR Reports in the DID column to see how it is changed.

Dear VaHam, thank you very much for the solution, and the thorough explanation alongside. It now works as expected, and the DID shows up in the CDR report. (For completness, I also found that a "context=from-pstn-toheader" in the PEER Details of one of my providers did fix my problem, but only for ONE provider, not the other. Your solution is obviously the proper way to go).
 

Members online

Forum statistics

Threads
26,688
Messages
174,412
Members
20,259
Latest member
Fadeek86
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top