So, we spoke about how a call is going out when we spoke about the ARS tables. However, you might ask yourself how does the system know what number to display when you make that outbound call? If you remember, when you're dialing that 9 you're going out a trunk but you are going out as extension 1234 (let's say). However,if you dial an external number from that extension to a mobile let's say, you will notice a DID (like 416-900-1234 for example). We are going to discuss this process in this article. Not hard if you know where to look. PUBLIC-UNKNOWN-NUMBERING is the key word here.
We have the usual trinity of commands here (display/change/list)...
1. display public-unknown-numbering
2. change public-unknown-numbering
3. list public-unknown-numbering
However, we tend to use options 2 and 3 more as usually you either want to add a new range a dids to the system or to confirm the numbering system. If you remember we spoke in past that we defined the dialplan as we wish and we tend to link the last digits of the did's that the telco is assigning to us to the last numbers. Eg ... if the DID is 416-123-1234 and we have a 4 digit numbering plan then the extension would be 1234.
As you can see the screen you can assign different numbering system depending on the trunk that you will be using. There are 5 columns of data that you can use.
So the way it works is that the system looks for the closest match for a extension with the length of ext len starting with ext code that goes over the trk. group specifed. If these conditions match then the system will add the CPN up to the total cpn lenght.
For example, in the table above you can see that any 4 digit extension startig with number 7 will have 416227 added in front. So any extension in the format 7000 to 7999 (4 digits) would present hereself outside as 416-227-7000 to 416-227-7999. You notice that we are using 10 digits in the DID number because we have 10 digits defined in the Total CPN len.
You can also program the system in a way that would replace any number for which you don't have a DID to present a generic number. So let's say that you have the following scenario (and please ignore the absurd in it).
You have bought this range of Did's 416-227-7000 to 416-227-7099. However 416-227-7009 is no available so the telco gives you 416-730-7009. However the branch that you're programming has 200 extensions in the range, but you don't care for the extra 100 so you will be displaying the genering reception number of 4167301234. The way you would have to program this range would be like bellow.
Remember that we spoke about having the closest match ? Well, you will begin by finding the groups where numbers have the same prefix. Here are our matches/groups...
1. 7009 will have it's own entry as it will display 416-730-7009
2. 70xx will have it's own entry as it will display 416-227-70xx
3. 7xxx will have it's own entry as it will display 416-227-1234
The way to program this is like in the previous image. All three groups have a ext code of 4, however the ext code will be 7009 for (1), 70 for (2) and 7 for (3). The trunk will always be 1 as this is our main trunk and the CPN will wary according to what our company boght from the telcom. The total CPN lenght is 10 as we will be always displaying 10 digits.
Not to forget, the command to implement the changes would be change public-unknown-numbering 4 (we want to change the extensions that are 4 digits in length). Don't be scared if you don't see all the entries in the display table. Always confirm the change by issuing the command list public-unknown-numbering.
Hope that this article solved the mystery around how DID's are created.