FreePBX | Register | Issues | Wiki | Portal | Support

Using +E164 numbering format in all SIP headers


(a12) #1

I have established a new SIP trunk with my SIP provider.

It’s a PJSIP trunk with no out of the ordinary setup. Calls are working both inbound and outbound, however when I dial outbound, I am getting a +1 (US) number show on my mobile phone.

I have set the CallerID on my SIP trunk to the number that should show, however it is still showing as +1

My SIP provider has replied saying:
“Please verify that you are using the +E164 numbering format in all SIP Headers”
“The +E164 is the standard format in Enterprise SIP”

Can anyone point me in the right direction to ensure I am using this format? where would this be set in the PJSIP trunk settings?

Thanks


(a12) #2

FYI I have already tried enabling the below

image


(Dave Burgess) #3

There are three parts to this.

  1. On inbound calls, stripping the E164 stuff and normalizing the numbers to a format you can enter from a phone is a good idea. This allows you manage things like caller ID and CRM interfaces in a way that doesn’t get stupid.

You can implement this by using a trunk context of “from-pstn-e164-uk”. We were discussing a context like this a couple weeks ago and one of the other correspondents submitted a Feature Request that establishes the E164 normalizer for the UK. The one for the US (NANP) is already in /etc/asterisk/extensions.conf (from-pstn-e164-us, IIRC). Search that file for e164 to see what’s there.

  1. On your outbound connections (your routes and trunks), you should use the Dialed Number Manuipulation rules to reformat your normalized, dialable numbers into the format your provider(s) want. If you have more than one trunk and they require different formats, you will need to decide on a format that you can use that bridges your multiple trunks. I recommend that you do this regardless of the number of trunks you have, since you may add another trunk and changing the rules on just the trunk is simpler than rewickering the entire outbound system.

  2. When storing numbers in your system, always use a ‘reasonable’ numbering scheme. Since you are in the UK, your numbering scheme will probably include country codes to non-local numbers, and may include country codes and area codes (whatever those are called in the UK) to be included.

So, how does that work?

An inbound call arrives. You strip the number down from the E164 format to what you want to use. I’m sure one of the UK members (perhaps @dicko, who has written on this extensively) so that your numbers make sense for CID lookup sources and your CRM system. When you store the number, store it in the format you are using. When you “click to dial” from CRM or call someone back with the “dial last number” button. Finally, set up your trunk so that, whatever the format of the number is, it is always stripped and converted to the E164 number format your provider wants.


(a12) #4

Great, thanks for the explanation. I will use the trunk to manipulate for my setup.