Jump to content

Dropping a leading zero on outbound calls, but adding a prefix


Mr. Black

Recommended Posts

At my location we have cell phone numbers that are always 10 digits and always start with 08 or 09.

 

Long distance PSTN Calls start with 02,03,04,05,06 and 07 and are always 9 digits long.

 

I got the dialplan sorted out to figure out cellphone vs. long distance numbers and select this trunk.

 

The trunk I want to use is US-based and would like to receive numbers with the country code prefixed and the leading zero stripped.

 

But I cannot figure out how to strip the leading zero.

 

Example: cellphone number 0866884100 needs to be sent to the trunk as 66866884100

 

I got the dialplan looking like this:

 

300;inhouse-th-guests;;08XXXXXXXX;66*;;false

 

Now dialling 0866884100 will prefix the country code but the leading zero is there and will cause the trunk provider to drop the call (obviously).

 

What's the magic involved in dropping that leading zero ?

 

 

 

 

Link to comment
Share on other sites

I always had the country code for the domain left blank and set the trunks to "don't re-write" and controlled things via the dial-plans because they are assigned on user-level and we have a broad mix of users in the domain who have different "local number formats" and different permissions.

 

If I could do it all again today I would have sites in different countries in different domains and make more use of the trunk setting "Rewrite global numbers:".

 

I popped the country code in the domain now and assigned these users a dial-plan appropriate for their needs and set the "Rewrite global numbers:" to e.164 and it's all working now! No need to play with extravagant regex in the dial plans :) Thanks for pointing me to the right direction!

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.

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.

×
×
  • Create New...