Jump to content

Catch all Trunk configuration


Recommended Posts

Hello,

 

I'm trying to test with a trunk that can do "everything" that means local calling and international calling. I've so far been very successful in creating the trunks for local calling but i'm having some difficulties with the international part.

 

I'm testing this on the latest version and i don't remember it functioning this way but maybe I'm wrong in this regard.

 

So i create a generic trunk with no global number replacements and the system uses area code 1 for local calling and DID representation.

 

Dial Plan 1:

This is to catch all calls that start with a 1

Pattern#1: 1xxxxxxxxxx Replacement: *

This is to catch calls that did not start with a 1 and to add it afterwards

Pattern#2: 2xxxxxxxxx|3xxxxxxxxx|4xxxxxxxxx|5xxxxxxxxx|6xxxxxxxxx|7xxxxxxxxx|8xxxxxxxxx|9xxxxxxxxx Replacement: 1*

Last pattern is generic 011* with * replacement to remove the 011

 

This does seem to work but in some environments it doesn't look like the dial plan is adding the replacements patterns and the trunk takes precedence. What this means that if a switch expects to see a 1 in front of the number it will try to find a local route, otherwise everything goes international.

 

When the trunk is setup for NANPA 11 digits, local calling works excellently, but international does not.

Checking the logs it looks like the system matches the international prefix correctly but then the trunk takes over and adds a 1 to match the NANPA 11 digit rule i guess.

 

So it starts to look like this:

Dialplan "Test1": Match 011##telephone@pbx.system.com to sip:##telephone@127.0.0.1;user=phone on trunk Trunk #1

replacement":"sip:##telephone@127.0.0.1;user=phone",
request-uri":"sip:1##telephone@127.0.0.1;user=phone",

 

Basically what i'm trying to accomplish is this. 1 Trunk solution. If users don't enter a 1 in front of their number, add it. If users enter a one in front of their number, leave it be. If users try to call international, remove the 011 AND not add a 1 in front of their number. Right now i'm able to do either one separately but not together.

 

Link to post
Share on other sites

There is a option the dial plan that tells the system how to present numbers into the pattern field ("Number presentation in dial plan"). If you select "For NANPA (10 digits)" the PBX will do all the work for you and present everything national with 10 digits.

I would check for 011* first, then you don't have to deal with all the exceptions. 

BTW we have also patterns like [usa]xxxxxxx, which takes out Canada and potentially other expensive and hazardous area codes (only contintental USA). There is a another pattern called [fre] that contains all the free numbers (800 888 877 866 855 844 833).

So you could use:

100 x11  
110 011* 011*
120 [usa]xxxxxxx  
130 [fre]xxxxxxx  
Link to post
Share on other sites

Hello,

 

Thanks for your reply.

 

I ended up playing around with it some more after my post and then read up on the new dial plan documentation. I did use the suggested 011* replacement pattern and setup the trunk with E.164 without leading + and it actually did resolve my issue with outbound calling.

 

Testing it again I realized that I did not check for inbound calling. The inbound calls do show up and they do work, but PBX seems to add 011 to every incoming call in the CDR.

 

So instead of seeing 416-xxx-xxxx, i now see 011416-xxx-xxxx. I mean it still works but this would mess with all the records for inbound calls.

Two steps forward, but unfortunately one backwards 😅

Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...