Does anyone know how can I configure the dial plan for my Sangoma phones to prepend a digit to the dialed number (for outbound routing purposes)?
Say I have this existing dial plan: {[2-9]xx[2-9]xxxxxx|[2-9]xxxxxx} and the user dials “234-1234”, I want the phone to send this to the PBX as 4234-1234 (prepend the 4 in the front).
Both. I will actually using this in a few different formats, not necessarily 4. I just need to flag the calls from all phones each of my locations to make sure they get picked up by the right outbound route to go out the right trunks with the right caller id
Usually, if extensions need to send different caller IDs on outbound calls, you would simply set Outbound CID for each extension accordingly. If a group of extensions needs to use a different trunk, e.g. because they are separately billed or you want to limit the number of concurrent calls they can make, you would use an Outbound Route that matches a range of extensions and delivers the calls to the proper trunk.
It is usually undesirable to rewrite numbers in the phone; for example, returning calls from history or contacts may not work correctly. If you have a special requirement where the phone must rewrite the number, please provide details.
Set up three Outbound Routes. They are identical except for the CallerID fields in the Dial Patterns and the trunks that are selected. Each route should match 911, your provider’s emergency test number (often 922 or 933) and your normal permitted external number formats.
For example, suppose that extensions 100-149 are at headquarters, 150-169 are at branch A and 170-189 are at branch B. The first route has 1[5-6]X in the CallerID field (of all patterns) and uses the trunk for branch A. The second has 1[7-8]X in the CallerID field and uses the trunk for branch B. The third has the CallerID field blank and uses the ‘headquarters’ trunk.
I like, but avoid using extensions that start with ‘1’. It conflicts with a bunch of stuff, like queue logins and other fun stuff. It can make direct dialing to voicemail for those extensions a little flaky.
I posted a simple example to show how routing based on extension number can work. I agree that it’s not a good range for a production system.
However, it’s IMO important that extension numbers don’t conflict with the external numbering plan. For example, it’s not a good idea to have an extension 212 and also permit dialing 2125551212. If someone dials 212 (and doesn’t press # or Send), there is a delay of typically four seconds while the phone waits to see if more digits are coming. Also, if he starts to dial a number beginning with 212 and pauses to look up the rest of the number, he’ll be connected to extension 212 instead. On my own system, extension numbers are 1000-1099. The phone dial plans put those calls through immediately, and they don’t conflict with external numbers. I don’t listen for in-call DTMF and have no trouble with conflicting feature codes.
That also is the biggest reason for moving toward 11digit NANP dialing where the 1 is also the countrycode , ,and you might notice that most key systems out there have the operator at 200 and extensions following
Always keep in mind the power of ‘MostSignificantDigits’ in any dialplan.