Difference between revisions of "Number Manipulation Examples"

From Kolmisoft Wiki
Jump to navigationJump to search
(New page: = Example with Localization and Provider Rules for CallerID(Source) and Destination = Lets say 868555666 calling to 868777888, the first number is source (CallerID) and another ...)
 
 
(17 intermediate revisions by 6 users not shown)
Line 1: Line 1:
= Example with [[Localization]] and [[Provider Rules]] for CallerID(Source) and Destination =
Lets say 868555666 is calling to 868777888. The first number is the source (CallerID), and the other number is the destination. [[Localization]] source rules are used to modify the CallerID which comes to MOR, and provider source rules are used to modify the CallerID that will be sent to the provider. They aren't used all the time, only when owner of system wants them to be.
Take, for example, a provider that only accepts calls  that are nine numbers in length and that begin with 8. MOR works only with E.164 standard callerID's if you want to run billing on them.


First of all, we need to make a [[Localization]] '''source''' rule for our situation:


= Example with [[Localization]] and [[Provider Rules]] for CallerID(Source) and Destination =
Cut 8, add 370, Min/Max 9/9.
 
So now the caller's number is 37068555666, not 868555666. MOR identifies the caller as being from Lithuania (by country code 370), which means he can bill him.
 
Now we need to send a call to 868777888, but our number must be in the old format (868555666), so we need to apply a suitable provider source rule:
 
Cut 370, add 8, Min/Max 11/11.


Lets say 868555666 calling to 868777888, the first number is source (CallerID) and another one is destination. [[Localization]] source rules is used to modify CallerID which comes to MOR and provider source rules is used to modify CallerID which will be sent to provider. They aren't used all the time, only when owner of system wants.
That's it - the caller's final number will once again be 868555666.


So for example provider accepting calls only in 9 number length and which begins with 8. MOR works only with E.164 startard callerID's if you want to run billing on them.
<br><br>


So first of all we'll need to make such [[Localization]] '''source''' rule for our situation:
= Examples =


Cut: 8 , Add: 370 , Min/Max 9/9.
<br><br>
== Add + to all numbers before sending to the Provider ==


So now callers number is 3708555666, not 868555666. MOR identifies caller from Lithuania (by country code 370), that means he can bill him.
For Destination (Provider rules Destination):


Now we need to send a call to 868777888 , but our number must be in old format (868555666), so we need to apply such provider source rule:
Cut: empty  Add: +


Cut: 370, Add: 8 , Min/Max 11/11
For CallerID (Provider rules Source):


Thats it, final caller's number will be 868555666 again.
Cut: +  Add: +
Cut: empty  Add: +


this will add + in front of the CallerID/Destination before sending it to the Provider.




= Examples =
<br><br>


== Example 1 - [[Image:ita.jpg]]Italy ==
== Example 1 - [[Image:ita.jpg]]Italy ==


Client has such situation:
The client has the following situation:


  My customers are mainly in Italy. To call to Italy they are not gonna put 0039 country code,  
  My customers are mainly in Italy. To call Italy, they are not going to add the 0039 country code,  
  while they do put 00 and country code when the want to call other countries.  
  while they do put 00 and the country code when they want to call other countries.  


  Then, on the other side, my provider aspect numbers to Italy without 0039 country code,  
  Then, on the other side, my provider expects numbers to Italy to be without the 0039 country code,  
  while to other countries they do aspect it before the called number.
  while to other countries it does expect the called number to have a country code.


'''NOTES:'''
'''NOTES:'''


* Numbers clients dial are 10 digits in length. More info about Italian number format: http://en.wikipedia.org/wiki/%2B39
* The numbers that clients dial are 10 digits in length. For more info about the Italian number format, see: http://en.wikipedia.org/wiki/%2B39
* '+' is not used, it should be changed to '00'
* '+' is not used. It should be changed to '00'.


To handle such situation such actions should be taken:
To handle such a situation, the following actions should be taken:


* Location 'Italy' should be created
* Location 'Italy' should be created.
* All devices from Italy should be assigned to this Location
* All devices from Italy should be assigned to this Location.
* Rules in Location Italy:
* Rules in Location Italy:
** Name: 'Local Italy', Cut: (empty), Add: 39, Min: 6, Max: 10
** Name: 'Local Italy', Cut: (empty), Add: 39, Min: 6, Max: 10.
** Name: 'International', Cut: 00, Add: (empty), Min: 11, Max: 16
** Name: 'International', Cut: 00, Add: (empty), Min: 11, Max: 16.
* [[Provider Rules]] for Provider through which call will be terminated:
* [[Provider Rules]] for Provider through which call will be terminated:
** Name: 'International', Cut: (empty), Add: 00, Min: 10, Max: 100
** Name: 'International', Cut: (empty), Add: 00, Min: 10, Max: 100.
 
<br><br>


== Example 2 - [[Image:usa.jpg]]USA/[[Image:can.jpg]]Canada ==
== Example 2 - [[Image:usa.jpg]]USA/[[Image:can.jpg]]Canada ==


Client has such situation:
The client has the following situation:


* Local number is dialed in following formats: 1-XXX-XXX-XXXX or XXX-XXX-XXXX
* A local number is dialed in following formats: 1-XXX-XXX-XXXX or XXX-XXX-XXXX.
* International numbers: 011 - country code - area code - number
* International numbers: 011 - country code - area code - number.


'''[[Localization]] rules''':
'''[[Localization]] rules''':
Line 60: Line 77:




Now call should be sent to Provider which accepts number in following format:
Now the call should be sent to the provider which accepts numbers in following format:


* USA/Canada calls should start with 1
* USA/Canada calls should start with 1.
* International calls should start with 011
* International calls should start with 011.


[[Provider Rules]] for this Provider should look like:
[[Provider Rules]] for this Provider should look like:
Line 69: Line 86:
[[Image:provider_rules_usa.png]]
[[Image:provider_rules_usa.png]]


<br><br>
== Example 3 - [[Image:bra.jpg]]Brasil ==
== Example 3 - [[Image:bra.jpg]]Brasil ==


* Local number dialed in format 0XXXXXXXXXX
* Local number dialed in format 0XXXXXXXXXX.
* International: 00 + country code + area code + number
* International: 00 + country code + area code + number.


[[Image:localization_brasil.png]]
[[Image:localization_brasil.png]]
<br><br>
== Example 4 - [[Image:es.png]]Spain ==
* Local number is dialed in format 9x[x]xx[x]xxxx (within Spain) (includes area code + number).
* International: country code (34) + area code + number.
* ! NOTE: MIN/MAX should be 8/10, since you want to change only the Spain local numbers. If MAX > 10, you will have wrong routing, for example: the Israel E.164 numbers (with prefixes 972), which are minimum 11 digits long, will be changed to Spain numbers.
[[Image:spain_localization.png]]
http://en.wikipedia.org/wiki/Telephone_numbers_in_Spain
<br><br>
== Example 5 - [[Image:nzl.jpg]]New Zealand ==
* Local number dialed in format 0XXXXXXXX (includes area code + number) or XXXXXXXX (area code + number).
* International: country code + area code + number.
[[Image:newzealand_localization.png]]
== Example 6 - DID provider sends DID number in different format than it is added in MOR ==
* DID number 37012312345 added in E.164 format in MOR
* DID provider sends 037012312345 to MOR
[[Image:DID_provider_Localization.png]]
This Location should be selected in '''DID Provider Settings'''. It will transform destination number 037012312345 to 37012312345 and then it will match DID number added in MOR.
== Example 7 - Add + in front only if it is not already present ==
* Callerid comes with or without +
* We need to add + in case it is missing, but not add additional + if it is already present
[[Image:location_add_plius.png]]
<br><br>
=See also=
* [[Number Manipulation]]
** [[Localization]]
** [[Provider Rules]]
** [[DID handling by Localization]]

Latest revision as of 10:43, 20 February 2023

Example with Localization and Provider Rules for CallerID(Source) and Destination

Lets say 868555666 is calling to 868777888. The first number is the source (CallerID), and the other number is the destination. Localization source rules are used to modify the CallerID which comes to MOR, and provider source rules are used to modify the CallerID that will be sent to the provider. They aren't used all the time, only when owner of system wants them to be.

Take, for example, a provider that only accepts calls that are nine numbers in length and that begin with 8. MOR works only with E.164 standard callerID's if you want to run billing on them.

First of all, we need to make a Localization source rule for our situation:

Cut 8, add 370, Min/Max 9/9.

So now the caller's number is 37068555666, not 868555666. MOR identifies the caller as being from Lithuania (by country code 370), which means he can bill him.

Now we need to send a call to 868777888, but our number must be in the old format (868555666), so we need to apply a suitable provider source rule:

Cut 370, add 8, Min/Max 11/11.

That's it - the caller's final number will once again be 868555666.



Examples



Add + to all numbers before sending to the Provider

For Destination (Provider rules Destination):

Cut: empty  Add: +

For CallerID (Provider rules Source):

Cut: +  Add: +
Cut: empty  Add: +

this will add + in front of the CallerID/Destination before sending it to the Provider.




Example 1 - Ita.jpgItaly

The client has the following situation:

My customers are mainly in Italy. To call Italy, they are not going to add the 0039 country code, 
while they do put 00 and the country code when they want to call other countries. 
Then, on the other side, my provider expects numbers to Italy to be without the 0039 country code, 
while to other countries it does expect the called number to have a country code.

NOTES:

  • The numbers that clients dial are 10 digits in length. For more info about the Italian number format, see: http://en.wikipedia.org/wiki/%2B39
  • '+' is not used. It should be changed to '00'.

To handle such a situation, the following actions should be taken:

  • Location 'Italy' should be created.
  • All devices from Italy should be assigned to this Location.
  • Rules in Location Italy:
    • Name: 'Local Italy', Cut: (empty), Add: 39, Min: 6, Max: 10.
    • Name: 'International', Cut: 00, Add: (empty), Min: 11, Max: 16.
  • Provider Rules for Provider through which call will be terminated:
    • Name: 'International', Cut: (empty), Add: 00, Min: 10, Max: 100.



Example 2 - Usa.jpgUSA/Can.jpgCanada

The client has the following situation:

  • A local number is dialed in following formats: 1-XXX-XXX-XXXX or XXX-XXX-XXXX.
  • International numbers: 011 - country code - area code - number.

Localization rules:

Localization usa canada example.png


Now the call should be sent to the provider which accepts numbers in following format:

  • USA/Canada calls should start with 1.
  • International calls should start with 011.

Provider Rules for this Provider should look like:

Provider rules usa.png



Example 3 - Bra.jpgBrasil

  • Local number dialed in format 0XXXXXXXXXX.
  • International: 00 + country code + area code + number.

Localization brasil.png




Example 4 - Es.pngSpain

  • Local number is dialed in format 9x[x]xx[x]xxxx (within Spain) (includes area code + number).
  • International: country code (34) + area code + number.
  • ! NOTE: MIN/MAX should be 8/10, since you want to change only the Spain local numbers. If MAX > 10, you will have wrong routing, for example: the Israel E.164 numbers (with prefixes 972), which are minimum 11 digits long, will be changed to Spain numbers.

Spain localization.png

http://en.wikipedia.org/wiki/Telephone_numbers_in_Spain



Example 5 - Nzl.jpgNew Zealand

  • Local number dialed in format 0XXXXXXXX (includes area code + number) or XXXXXXXX (area code + number).
  • International: country code + area code + number.

Newzealand localization.png

Example 6 - DID provider sends DID number in different format than it is added in MOR

  • DID number 37012312345 added in E.164 format in MOR
  • DID provider sends 037012312345 to MOR

DID provider Localization.png

This Location should be selected in DID Provider Settings. It will transform destination number 037012312345 to 37012312345 and then it will match DID number added in MOR.

Example 7 - Add + in front only if it is not already present

  • Callerid comes with or without +
  • We need to add + in case it is missing, but not add additional + if it is already present

Location add plius.png



See also