Jump to content

Replacing + in dial plans


doncollier

Recommended Posts

I must be missing something fundamental as I cant believe no one else has come across this before and I cant find any topics on this subject on a search.

 

Modern cell phones have the capacity to dial directly +44 as a Uk number from anywhere in the world or say +48 for Poland so international travellers have this in their address books. How can I make this happen in a snom one?

 

At the moment all the + numbers just die and are coming up as errors in dialling. A real pain when creating directories as you have to put them though a cleaning routine.

is there any way to fix this in a dial plan so that a snom one set up in the UK it would remove the +44 and replace it with a 0 while the other numbers would have just the + replaced with a 0?

 

thanks

 

Don

Link to comment
Share on other sites

First of all, you can always fall back to extended regular expressions, where you can use \+ to match the plus symbol.

 

However, the real answer is more complex. The PBX actually always tries to keep phone numbers internally in a +-format (this explains why having dial-out prefixes are generally a bad idea). Then when feeding that number into the dial plan, it consults the country code of the domain. For NAPNA (10-digit US and Canada), it presents the number either as ten digits or 011xxx; for other areas is presents the number in 00xxyyzz, 0yyzz or zz-Format (how a naive user would dial the number). That said, there is no need to use + when you have a country code set and you dont have to worry how the user dials the number: Both 00493012345678 and 03012345678 will presented as 03012345678 to the dial plan if the country code is 49 and the area code is not 30. You need to cover this route only one time in the dial plan.

Link to comment
Share on other sites

First of all, you can always fall back to extended regular expressions, where you can use \+ to match the plus symbol.

 

However, the real answer is more complex. The PBX actually always tries to keep phone numbers internally in a +-format (this explains why having dial-out prefixes are generally a bad idea). Then when feeding that number into the dial plan, it consults the country code of the domain. For NAPNA (10-digit US and Canada), it presents the number either as ten digits or 011xxx; for other areas is presents the number in 00xxyyzz, 0yyzz or zz-Format (how a naive user would dial the number). That said, there is no need to use + when you have a country code set and you dont have to worry how the user dials the number: Both 00493012345678 and 03012345678 will presented as 03012345678 to the dial plan if the country code is 49 and the area code is not 30. You need to cover this route only one time in the dial plan.

 

 

Thanks but I am afraid I think I am now even more confused :(

 

The country code is set to 44 but anything with a + is just rejected .

 

Also in the future we may wish route calls through other trunks when the client has a valid sip stream in that country. Ideally therefore I would like to work out how to remove "+44" and replace it with "0". or for example if going through a UK Sip stream replace "+48" with "0048". So far I have been unsuccessful!

 

Can you give me an example of the regular expression for this?

Thanks

Don

Link to comment
Share on other sites

I would assume that a ERE like !\+4412345([0-9]*)!\1!123! should route all incoming calls to the number +4412345xxx to the extension xxx or to 123 if that number does not exists.

Routing calls through the system is a separate topic. For that you need to assume that the call came from an existing extension, so that the PBX knows what extension to charge for the call and what dial plan to use.

Link to comment
Share on other sites

I would assume that a ERE like !\+4412345([0-9]*)!\1!123! should route all incoming calls to the number +4412345xxx to the extension xxx or to 123 if that number does not exists.

Routing calls through the system is a separate topic. For that you need to assume that the call came from an existing extension, so that the PBX knows what extension to charge for the call and what dial plan to use.

 

 

Ah OK I think I understand the confusion. There is no call charging involved.

 

I am looking at just a Dial plan and the hierarchical choices. In this configuration all calls are routed through one dial plan and there is basically at the moment two choices one with Emergency numbers to force them through a trunk with a correctly associated address as the first choice and another that is * with no replacement for all other calls.

 

I have similar installations with other clients where there is a trunk that represents a geographical location for emergency calls and they all have the same pattern, save that the emergency number is routed through a trunk registered to that address. This is used when there is more than one geographical location for a system (ie home working, multiple offices etc).

 

We are also using trunks to ensure that a call is made from a local code. So when a call is made to a 01202 number a trunk with 01202 code is used

 

In all cases we are finding that the +44 or +[anything] is failing and not connecting. I was hoping there was a method of properly substituting it and if possible routing it through a specific trunk

 

I was envisaging some regular expression that produced this sort of result:

 

Pref~trunk~Pattern~Replacement

20~a~+44~0

21~b~+48~0048

 

But I can not work out the syntax of the regular expression to get this to work.

 

Thanks

 

Don

Link to comment
Share on other sites

There is a lot of confusion about the term "dial plan". In the snom ONE world, it has a limited scope and it deals with the question on which trunk an outbound call that will not terminate internally will be routed. Inbound calls are not routed through a dial plan (at least as of now). There is the simple settings "send call to extension" on the trunk that determines where the call will be sent.

 

Normally, trunks send calls always to internal resources. Trunk-to-trunk calls are the exception, and when you want this you must tell the PBX which dial plan to use and which extensions will be charged (even if there is no real money in the game). For that there is the setting "Assume that call comes from user", which implies that the extension's dial plan will be used to route the call to the outside world. The ERE from above must be put into the trunk setting "Send call to extension" (where extension can actually be anything, e.g. also the external number).

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...