DID number


I have 2 phone numbers (Trunks): 31202233444 and 31203344555
trunk 31202233444, contex: from-pstn-toheader
trunk 31203344555, contex: from-pstn-toheader

i have 5 extensions: 101-102-103-104-105
I have 2 ringgroups
i configured 2 ring groups:
ring group1: 101-102-103-104-105
ring group2: 105
when a customer calls our number 31202233444, i want this directed to ring group 1
when a customer calls our number 31203344555, i want this directed to ring group 2

i configured 2 inbound routes

  1. all, DID number: any
    so when i receive a call (31202233444 or 31203344555) it will go to all the extensions, ring group 1

  2. all, DID number: 31203344555
    so when i receive a call (31203344555) it will go to all the extensions, ring group 2

this does not work,
inbound 1 works, when I receive call “31202233444” it goes to ring group1
but when I receive call “31203344555” it goes also to all the extensiosn ring group2 in stead of ring group 1 (extension 105)

how to route calls to trunk 31203344555 to ring group2 ??

Pastebin a call trace of a problem call:

Dear Igaetz,

I do not understand what you mean.
shall I sent a log report from (/var/log/asterisk/full)

If you have the any did route first, then all calls for any did will go to that route, unless I’m missing something. If you want inbound calls routed by DID, you need to create two inbound routes, one for each DID, and not use an any did route at all.

I changed the 2 inbound routes specific to their trunks,
inbound 1, DID 31202233444, it works -> ring group1
inbound 2, DID 31203344555, it does not work -> ring group 2

should i change the context from: from-pstn-toheader to something else?

You were already provided instruction. You obviously did not bother to read what was linked. Yet you still expect us to help you?

If you cannot be bothered, why should we?

You should check how your provider sends the DID: which particular header and what number format. Delete both inbound routes, create an any/any inbound route and make an inbound call then look at the asterisk log when the call comes in and you will see the DID format that the provider is sending if the DID is on the default header. If you can’t see the DID, then you need to try one of the special contexts to extract the DID, like from-pstn-to-header.
Once you can see the DID format and header, create the inbound routes accordingly.

what kind of answer is this??
if it was clear for me i would not ask this question.
probably you are “expert” or you think you are expert, and everthing is clear to you.
but not everybody is an expert here

thanks arielgrin,

I will check

I was just trying to help. The idea is to give you tools to try to figure this out on your own so you can move forward. If you were expecting a step-by-step list of steps to follow, maybe you should first start by reading the docs from the wiki, then try to apply the knowledge to your particular installation and if you are still experiencing isuses, then ask specific questions and provide detailed information including logs and debug if necessary. Nobody expects anyone to be a complete expert, but at the same time you should first try to figure it out with the tools provided and not expect that anyone would write a detailed instructions manual specifically tailored for you. Remember that forum participants are just that, participants. Some will try to go to further extents to help, some will tell you to RTFM and then everything else in between those two extremes. Believe me when I say that you will feel extremely satisfied when you discover you can figure it out by yourself, even if some initial help was needed, at least that is my experience. Now if you were talking specifically about me, then no, I don’t definitely expect you to be a pro.

1 Like

OK thanks for your explanation :slight_smile:
I will check the configuration and the log files, and test again

we will solve the problem

The first line you see when a call arrives contains the DID if you have configured only one “any/any” inbound route. The line goes like this, assuming you are using the context from-trunk on a SIP trunk: Catch-All DID Match - Found XXXXXXX - You probably want a DID for this.

If that line doesn’t appear, then your provider is sending the DID info on a different header, like the From: field or maybe it is not sending the DID at all. At that point, you would need to debug the SIP session for the incoming call to find out if and how is your provider sending the DID.

No, you may not be an expert, but you didn’t even bother to follow the link posted by a Sangoma employee and follow the instructions.

So why should anyone else waste their time?

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