07-07-2021 01:20 AM
We are sharing the Cube across many sites across Europe :
Would like to know how to strip 00 and country code from Telco incoming calls on SIP Trunk
Below is the translation rule in use
voice translation-rule 1
rule 1 /^\+\(.*\)/ /00\1/
rule 2 // //
voice translation-profile Prefix_Intl_Calling
translate calling 1
Solved! Go to Solution.
07-08-2021 12:50 AM - edited 07-08-2021 12:54 AM
This would not be an all that easy feat to achieve as the country code can be all from one to three digits long depending on what countries that you accept calls for in your SBC. If all of them have a two digit country code it’s easy, just change the rules to strip out 00 and then two more digits with this.
voice translation-rule 1
rule 1 /^00..\(.*\)/ /\1/
Your original rule 2 does nothing, so that can be removed all together.
However I would strongly advise you to rethink your approach here and change the calling number presentation to keep the country code and display the calling number to the called party in E.164 format. The benefit of this is that it’s a uniform and standard way of showing the number and it’s universal routable with the proper configuration in your CM. To do this you can use this translation.
voice translation-rule 1
rule 1 /^00\(.*\)/ /+\1/
07-08-2021 12:57 AM
This is a good read to learn more on how to use voice translation rules.
07-08-2021 01:00 AM
in that case, you need to add rules to match each county.. with just one rule you wont be able to achieve it. As @Roger Kallberg mentioned county code can one, two or three digits. For US its 1, for my region its 968, for uk 44 etc... With just single rule you wont be able to achieve it. make rules to match the countries which share your Trunk.
For example, if my sip trunk shared by oman, uae and uk. to remove the 00and country code.The below could be my rule. If in case isp send the calling information without 00, to strip the country code i will add rules from 4-6.
voice translation-rule 1
rule 1 /^\0044\(.*\)/ /\1/
rule 2 /^\00968\(.*\)/ /\1/
rule 3 /^\00971\(.*\)/ /\1/
rule 4 /^\44\(.*\)/ /\1/
rule 5 /^\968\(.*\)/ /\1/
rule 6 /^\971\(.*\)/ /\1/
07-08-2021 02:29 AM
Many thanks for you time Nithin Eluvathingal , great help and quick response, If we have to move fast and can not wait for the carrier to update in time will use the translation patterns. Best regards
07-07-2021 01:27 AM
You current rule is to add 00 in place of +.
voice translation-rule 1
rule 1 /^\+\(.*\)/ /00\1/
rule 2 // //
jlrvg#test voice translation-rule 1 +0012345
Matched with rule 1
Original number: +0012345 Translated number: 000012345
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
I modified your translation. See the new rule and the result below. Not sure if this is what your are trying to achieve.
voice translation-rule 1
rule 1 /^\+\(.*\)/ /\1/
rule 2 /^\00\(.*\)/ /\1/
jlrvg#test voice translation-rule 1 +12345
Matched with rule 1
Original number: +12345 Translated number: 12345
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
jlrvg#test voice translation-rule 1 +0012345
Matched with rule 1
Original number: +0012345 Translated number: 0012345
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
jlrvg#test voice translation-rule 1 0012345
Matched with rule 2
Original number: 0012345 Translated number: 12345
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
07-07-2021 02:25 AM
Sorry I was not clear, so after 00 we have country code
like 0044 or 00 34 and 0033,
so per country we like to display to use local number only with 00 and country code
07-07-2021 02:26 AM
with out 00 and country code I mean
07-08-2021 12:50 AM - edited 07-08-2021 12:54 AM
This would not be an all that easy feat to achieve as the country code can be all from one to three digits long depending on what countries that you accept calls for in your SBC. If all of them have a two digit country code it’s easy, just change the rules to strip out 00 and then two more digits with this.
voice translation-rule 1
rule 1 /^00..\(.*\)/ /\1/
Your original rule 2 does nothing, so that can be removed all together.
However I would strongly advise you to rethink your approach here and change the calling number presentation to keep the country code and display the calling number to the called party in E.164 format. The benefit of this is that it’s a uniform and standard way of showing the number and it’s universal routable with the proper configuration in your CM. To do this you can use this translation.
voice translation-rule 1
rule 1 /^00\(.*\)/ /+\1/
07-08-2021 02:24 AM
Many thanks Roger Kallberg, It would be handy to keep E.164 format for Jabber and Webex calling from outlook etc but user do not prefer international codes so we will work with carrier to apply a fix on their end.
07-08-2021 12:57 AM
This is a good read to learn more on how to use voice translation rules.
07-07-2021 03:12 AM
Not clear what you really need.
07-08-2021 01:00 AM
in that case, you need to add rules to match each county.. with just one rule you wont be able to achieve it. As @Roger Kallberg mentioned county code can one, two or three digits. For US its 1, for my region its 968, for uk 44 etc... With just single rule you wont be able to achieve it. make rules to match the countries which share your Trunk.
For example, if my sip trunk shared by oman, uae and uk. to remove the 00and country code.The below could be my rule. If in case isp send the calling information without 00, to strip the country code i will add rules from 4-6.
voice translation-rule 1
rule 1 /^\0044\(.*\)/ /\1/
rule 2 /^\00968\(.*\)/ /\1/
rule 3 /^\00971\(.*\)/ /\1/
rule 4 /^\44\(.*\)/ /\1/
rule 5 /^\968\(.*\)/ /\1/
rule 6 /^\971\(.*\)/ /\1/
07-08-2021 02:29 AM
Many thanks for you time Nithin Eluvathingal , great help and quick response, If we have to move fast and can not wait for the carrier to update in time will use the translation patterns. Best regards
07-08-2021 05:05 AM
Not sure if you will have a great success with having your service provider make changes for this on their end. In my experience they are pretty square and do not have much will to accommodate changes that their customer ask for. I would simplify accept the number format you get and make whatever changes you see fit on your gateway with voice translation rules.
Apart from this, why did you mark your own reply as an answer to your question?
07-08-2021 06:37 AM
Sorry for marking my reply as answer was trying to accept your reply to stop the email chain. thanks again for guidance.
07-08-2021 07:43 AM
FYI You can deselect your own answer as an answer.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide