Incoming routing based on DID don't work

and when a leave any/any empty all work well inbound call but i receive all calls in one extension with any/any, which is not my end, my goal is to link each did to an extension
there is the log when inbound work fine with any/any

As Tom said, change the context for your trunk to from-pstn-toheader and retest.

when i changed the context to from-pstn-toheader no playback but when i try to join my did, my personal phone is always listening to the connection to the did but in the end hangs up automatically


OK, please stop giving us screen shots. Give us the full call. You need to copy and paste everything from the start to finish of the call. You need to do sip set debug on so we can see the full SIP headers and how things are being sent to you.

Do that and then use pastebin and give us the link here.

Now it is good? there is the log file with sip set debug on

Well you have something not configured right with your provider. Both those headers have the same information. They are sending to the s extension they aren’t even sending you a DID to match against. You need to contact them and find how exactly how they want you to connect with them and how they send calls to you.

INVITE sip:[email protected]:5060;transport=udp SIP/2.0
To:<sip:[email protected]:5060;transport=udp>

1 Like

Do you have more than one trunk with Commpeak, each with a different DID? If so, you can configure with different register strings to distinguish. Otherwise, you need to configure their end to send the DID.

What country is the DID in? You’re in Morocco with an HK provider serving you from UK?

yes i have several sip account with them but i am trying to test with a sip account linked to 2 did, yes i’m from morocco brother, and my provider is commpeak

Don’t point him to the CDR. It’s fine for a manager.

You need to set up and “ANY/ANY” route and, when a call comes in, look in the /var/log/asterisk/full log file. In there will be a note that says “You should probably have a specific inbound route for this.” (or something similar, I haven’t looked in a long time.

That line in your …/full log will tell you exactly what the incoming format of the number is.

Yeah but I did not get the sense that we were at that depth of understanding here. The cdr did show that something is quite messed up on his server and I am fresh out of ten-foot poles.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.