cancel
Showing results for
Did you mean:
cancel
Announcements

164
Views
15
5
Replies
Highlighted
Beginner

Voice translation rules

Hi All,

I am trying to understand the voice translation rules and have got confused with complex usage of it. Below are some patterns :

/.*\(...\)\$/ /8\1/ ---- My understanding -  This means any number being dialed is prefixed by 8 followed by the 3 digits that form set 1

/^8\(...\)\$/ /0290838\1/ --- My understanding - This means any number starting with 8 and followed by any 3 digits gets replaced by 0290838 followed by the 3 digits that form set 1

/.+/ /00011\0/ type international international ---- In this i am unable to understand the variable "TYPE" - how is the number identified as international here for the rule match to happen ?

5 REPLIES 5
Contributor

Re: Voice translation rules

The 2 following links may be useful for you:

https://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/61083-voice-transla-rules.html

https://ucpros.net/cisco-voice-translation-rules-guide/

G

Please Rate Posts (by clicking on Star) and/or Mark Solutions as Accepted, when applies
Enthusiast

Re: Voice translation rules

"/.+/ /00011\0/ type international international ---- In this i am unable to understand the variable "TYPE" - how is the number identified as international here for the rule match to happen ? "

Number type is a specific property in ISDN and H.323 signalling, maybe others.  For example in ISDN ..

```Nov 26 08:06:55.724: ISDN Se0/0/0:15 Q931: RX <- SETUP pd = 8  callref = 0x7C9E
Sending Complete
Bearer Capability i = 0x8090A3
Standard = CCITT
Transfer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0xA98381
Exclusive, Channel 1
Progress Ind i = 0x8A81 - Call not end-to-end ISDN, may have in-band info
Calling Party Number i = 0x1181, 'xxxxxxxxxxxx'
Plan:ISDN, Type:International
Called Party Number i = 0x81, '3499'
Plan:ISDN, Type:Unknown```

Note that SIP doesn't have this field, so as far as I know you can't match based on explicit type, you have to deduce it from the number actually presented.

Re: Voice translation rules

/.*\(...\)\$/ /8\1/ ---- My understanding -  This means any number being dialed is prefixed by 8 followed by the 3 digits that form set 1

Your understanding is correct.  Another way to say it: Strip off all but the last three digits of the number, and then prefix those 3 digits with an 8.  E.g., 6125551212 becomes 8212

/^8\(...\)\$/ /0290838\1/ --- My understanding - This means any number starting with 8 and followed by any 3 digits gets replaced by 0290838 followed by the 3 digits that form set 1

Your understanding is correct.  There's not better way to say it!  :)

/.+/ /00011\0/ type international international ---- In this i am unable to understand the variable "TYPE" - how is the number identified as international here for the rule match to happen ?

So the type keyword is going to look at the signaling messages, to determine if the Type of Number (aka TON) can be determined.  If so, then it would have to be equal to International for a match to be made, regardless of what the pattern before is trying to match on.  Think of it like an AND operator.  The pattern must match .+ (which means at least 1 digit, but could be more) AND the TON must match international.

Tony already pointed out where the TON comes from, and that it's not used in SIP.  +5 for him.

Now, the word in international is in their twice, because just like pattern matching it is doing a find and replace.  Find international and replace with international.  This effectively changes nothing about the TON, but makes sure the match only happens on TON international and not TON National or TON Subscriber or TON Unknown.  The \0 which we haven't seen in your other two examples, does the same thing as \1, but contains all of the digits matched by .+ (so, literally all of the digits).  Whereas a \1 only contains the digits matched between the parenthesis.  Two ways to achieve the same thing really.  Because you could have used /\(.+\)/ /00011\1/ instead.

Chris George already linked you to some resources, one of which shows you how to test your rules on the router, so +5 for him too.

Anthony Holloway

And for a limited time, by marking helpful posts, you're also helping Doctors Without Borders
Contributor

Re: Voice translation rules

And 5 Stars to Anthony who always finds ways to explain everything so well, that everything sounds so easy.

George

Please Rate Posts (by clicking on Star) and/or Mark Solutions as Accepted, when applies