Jump to content

Rewriting inbound caller IDs?


Recommended Posts

One of our SIP-trunk providers isn't particularly good about how they present the CIDs on inbound calls.

Is there a way to rewrite these according to some rules, for example replacing 001 with +1 , or adding a country code to local numbers.

Note for clarity: I'm talking about how numbers are presented in the From field in CDRs, logs, etc.



Link to comment
Share on other sites

Ok. Where do I configure these things in this version? Ideally I would like to prefix +423 to all numbers lacking a 00 prefix (local numbers) and replace 00 prefixes with + for international numbers.

So 2371336 would turn into +423 2371336 and 0013343456666 would turn into +1 3343456666 .

(Incoming calls only)

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...

I was wondering if there is a handbook somewhere on this. I was wondering why the Vodia would remove +1 from calls. I see them as being presented but in log files but in the call logs and on the phone, the number gets changed from  +15555551212 to 555-555-1212 in the logs, and 5555551212 on the phone.

The list of expressions above only directs the call, it doesnt seem to have anything to do with inbound caller id as mentioned above.

Where is the setting for caller id.


Link to comment
Share on other sites

Inbound caller ID settings headers: https://doc.vodia.com/trunk_custom_headers (you can navigate on the left hand side to look for more settings).

And the admin level shows the +1 along with the numbers in the call logs if you want to take a look. Inside the domain, it's the default setting that reformats the number to look like 555-555-1212 by default.

Link to comment
Share on other sites

i am not clear by your response.

When i click on the link....the first thing it says is:

Trunk Custom Headers

The PBX can send just about anything in the SIP headers when making outbound calls. This is particularly useful if the trunk provider needs special parameters/values in the SIP headers.

When you say the left hand side, is this a reply for the question regarding expressions, as i am just looking for quidance. I tried to use your example above and it didnt work and the call went to voicemail.

!^([2-9]{10})$!+\1! !^([1-9]{11})$!+\1! 38

i understand that the default setting using 1 but why not +1  as that will not work.

In any event, if there is no way to actually receive calls 1+, just say so. I cannot find a way to do so using the default 1 settings.



Link to comment
Share on other sites

The headers are really just about outbound calls. There is no need to come up with headers on inbound calls.

Generally the idea is that telephone numbers should be converted into the internal "global" format. That means in the case of the PBX, that the numbers start with a +-symbol. There are a couple of settings for the trunk on how it expects the numbers and that usuually works well (there are a few providers that send e.g. From in international format and To in E164-format which is causing a lot of confusion).

So I would recommend to review the format of the trunk and check if the numbers are read correctly. Then there is no need to use the ERE pattern matching for inbound calls.

Link to comment
Share on other sites

12 minutes ago, koolandrew said:

If so, how will this help with the dial plan when + is involved.

Yes, that's what it's supposed to do. 

Again, we're talking about inbound calls here right? I wasn't referring to dial plans at all. These are just trunk setting which "should" take effect on inbound calls.

Link to comment
Share on other sites

  • 8 months later...

Our SIP Provider does really strange things on inbound trunk calls:

From: <sip:035xxxxxx@sip.xxxx.de>
To: <sip:4935xxxxxx@sip.xxxx.de>

They format the FROM with a leading 0 and the TO with E164 format. So when I change the Rewrite global numbers setting either the FROM number or the TO number is formatted correctly but the other one is always wrong. So I really would like to see the possibility to also manipulate inbound trunk IDs...

Is there any chance to achieve this with the current version 66.0.6?

Link to comment
Share on other sites

The provider is called easybell. You already have a template for that, but maybe they have changed the way they format numbers. 


They even have some if else:

1. If it is only a single number or the root number of a trunk it is international format 0049xxxxx
2. If it is an extension number of the trunk it is E.164 (49xxxxx)

So maybe you can script it that both options would work.

Link to comment
Share on other sites

We support easybell for some time. What they are saying is they are contacting whatever was provided in the contact header for a single line account (which makes a lot of sense) and the E164 format if there are multiple numbers. It would make sense to use the E164 format all the time, including in the Contact header. You can set the contact header explicitly for the trunk to the E164-formatted number—would that solve the problem in all cases (and set the number interpretation for the trunk to E164)? If yes we could change the template for easybell and make this the default for easybell. The alternative would be to have the PBX look at the To-header, and not the Request-URI for an incoming call.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

  • Create New...