cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
606
Views
0
Helpful
4
Replies

Help with create translation rule

wilsonsant
Level 6
Level 6

Hi Guys,

 

I am trying identify why the translation rule is not working. Today I have the follow need:

 

I will call to number:

1xx

10xx

10xxx

 

But, As we have two department I need put the Tech Prefix before this number to can to diferentiate this sites (The Carrier wait receive Tech Prefix, after It remove the Tech Prefix)

.

The Tech prefix are: 917 and 922. The rules created were:

 

 rule 20 /^\0\(.*\)$/ /\1/

 rule 51 /^\(9[12][27]\)0\(1..\)$/ /\1\2/
 rule 52 /^\(9[12][27]\)0\(10..\)$/ /\1\2/
 rule 53/^\(9[12][27]\)0\(10...\)$/ /\1\2/

 

In this condition when I try call for number 1xx, 10xx and 10xxx, I received the message that not is possible complete the call to number dialed

 

If configure for example:  rule 3 /^0\(1..\)$/ /922\1/, worked, but, only 922 and not 917. 

 

-GW-VOZ-01#test voice translation-rule 40 01052
Matched with rule 20
Original number: 01052  Translated number: 1052
Original number type: none      Translated number type: none
Original number plan: none      Translated number plan: none

GW-VOZ-01#

 

This rule not solve my problem, because, I need put tech prefix before

 

Any have idea as solved this?

 

Thanks,

 

Regards,

 

Wilson

4 Replies 4

Slavik Bialik
Level 7
Level 7
I'm not sure that I get it. You probably have 2 incoming dial-peers, that each dial-peer is incoming from a different CUCM or based or what are you trying to differentiate the calls?
If all the departments are on the same CUCM, I think the only solution is to create a different SIP trunk from CUCM to the same gateway, and of course a different dial plan to every department. That way, you will be able to add the Tech Prefix, as you call it, already on the CUCM. And on the gateway itself you can just "accept" all the numbers in the incoming dial-peer, and in the outgoing dial-peer you can strip the Tech Prefix and send the number to the PSTN.

Hi Slavik Bialik,

 

Thanks a lot for Your contact. Answering Your questions:

 

We need diaferentiate the calls. the Users are in the same environmen physical, but, are of different area and

the all departmens are in the same CUCM. The direct call, mobile phone, long distance, international calls alread worked with tech prefix (with only SIP Trunk), only not working to emergency calls, utility public phones and carrier services.

 

I don´t know if clear You doubts.

 

Thanks,

 

Regards,

 

Wilson

I see.
Can you please share all the configurations including the dial-peers? I must see and understand how the regular calls are working for you.
Might be an issue that the call is being matched on the un-desired translation rule (according to your test command, it was matched on rule 20), and you must understand that the matching is not being matched by best match but with the first match, so maybe that's whats stopping it from working. But seeing the whole configurations might help.

Hi Slavik,

 

Follow the translation rule out and dial-peers

 

voice translation-rule 40
 rule 12 /^\0\([2-9].......\)$/ /\1/
 rule 13 /^\0\([79]........\)$/ /\1/
 rule 14 /^\0\(19.\)$/ /\1/
 rule 15 /^\0\(181\)$/ /\1/
 rule 16 /^\0\(911\)$/ /\1/
 rule 17 /^\0\(112\)$/ /\1/
 rule 18 /^\00\([1-9][1-9][2-9].......\)$/ /024\1/
 rule 19 /^\00\([1-37-9][1-9][79]........\)$/ /024\1/
 rule 20 /^\00\([4-6][1-9]9[6-9].......\)$/ /024\1/
 rule 21 /^\00\([38]00.......\)$/ /0\1/
 rule 22 /^\000\([1-9].*\)$/ /0024\1/
 rule 23 /^\0\(13.\)$/ /\1/
 rule 40 /^\(9[12][27]\)0\([2-9].......\)$/ /\1\2/                          >>> This rule worked  (Fixed Local calls)
 rule 41 /^\(9[12][27]\)0\([79]........\)$/ /\1\2/                           >>> This rule worked (Mobile local calls)
 rule 42 /^\(9[12][27]\)00\([1-9][1-9][2-9].......\)$/ /\1024\2/          >>> This rule worked  (Fixed long distance calls)
 rule 43 /^\(9[12][27]\)00\([1-37-9][1-9][79]........\)$/ /\1024\2/     >>> This rule worked (mobile long distance calls)
 rule 44 /^\(9[12][27]\)00\([4-6][1-9]9[6-9].......\)$/ /\1024\2/        >>> This rule worked (mobile long distance calls)
 rule 45 /^\(9[12][27]\)0\([38]00.......\)$/ /\10\2/                             >>< This rule worked (0300 and 0800 calls)
 rule 46 /^\(9[12][27]\)000\([1-9].*\)$/ /\10024\2/                          >>> This rule worked (International calls)
 rule 51 /^\(9[12][27]\)0\(1..\)$/ /\1\2/                                            >>> This rule not worked (emergency and utility public calls)
 rule 52 /^\(9[12][27]\)0\(10...\)$/ /\1\2/                                         >>> This rule not worked (Carrier services 5 digits)
 rule 53 /^\(9[12][27]\)0\(10..\)$/ /\1\2/                                          >>> This rule not worked (Carrier services 4 digits)

!

 

dial-peer voice 110 voip
 description Outbound calls to PSTN
 translation-profile outgoing PSTN-OUT
 destination-pattern 0T
 session protocol sipv2
 session target ipv4:10.24.0.24  (CARRIER)
 voice-class codec 1 
 voice-class sip dtmf-relay force rtp-nte
 voice-class sip early-offer forced
 voice-class sip profiles 1
 voice-class sip bind control source-interface GigabitEthernet0/2
 voice-class sip bind media source-interface GigabitEthernet0/2
 dtmf-relay rtp-nte sip-kpml
 no vad
!
dial-peer voice 150 voip
 preference 1
 modem passthrough nse codec g711ulaw
 session protocol sipv2
 session target ipv4:10.96.104.2  (CUCM SUBSCRIBER)
 destination e164-pattern-map 5
 voice-class codec 1 
 voice-class sip profiles 2
 voice-class sip bind control source-interface GigabitEthernet0/1
 voice-class sip bind media source-interface GigabitEthernet0/1
 dtmf-relay rtp-nte sip-kpml
 fax rate 14400
 fax protocol pass-through g711ulaw
 no vad
!
dial-peer voice 250 voip
 preference 2
 modem passthrough nse codec g711ulaw
 session protocol sipv2
 session target ipv4:10.96.104.1 (CUCM PUBLISHER)
 destination e164-pattern-map 5
 voice-class codec 1 
 voice-class sip profiles 2
 voice-class sip bind control source-interface GigabitEthernet0/1
 voice-class sip bind media source-interface GigabitEthernet0/1
 dtmf-relay rtp-nte
 fax rate 14400
 fax protocol pass-through g711ulaw
 no vad
!
dial-peer voice 1000 voip
 description Outbound calls from UCM
 translation-profile incoming xpto-IN
 session protocol sipv2
 incoming calling e164-pattern-map 1
 voice-class codec 1 
 voice-class sip profiles 1
 voice-class sip bind control source-interface GigabitEthernet0/1
 voice-class sip bind media source-interface GigabitEthernet0/1
 dtmf-relay rtp-nte sip-kpml
 no vad
!
dial-peer voice 1001 voip
 description Inbound calls from CARRIER
 translation-profile incoming PSTN-IN
 session protocol sipv2
 incoming called e164-pattern-map 2
 incoming calling e164-pattern-map 2
 voice-class codec 1 
 voice-class sip profiles 2
 voice-class sip bind control source-interface GigabitEthernet0/2
 voice-class sip bind media source-interface GigabitEthernet0/2
 dtmf-relay rtp-nte
 no vad
!
dial-peer voice 1100 voip
 description Outbound calls from UCM - Consulting
 translation-profile incoming NOPLUS-IN-DEPT_A
 session protocol sipv2
 incoming calling e164-pattern-map 3
 voice-class codec 1 
 voice-class sip profiles 1
 voice-class sip bind control source-interface GigabitEthernet0/1
 voice-class sip bind media source-interface GigabitEthernet0/1
 dtmf-relay rtp-nte sip-kpml
 no vad
!
dial-peer voice 1101 voip
 description Outbound calls from UCM - Consulting
 translation-profile incoming NOPLUS-IN-Servicos
 session protocol sipv2
 incoming calling e164-pattern-map 4
 voice-class codec 1 
 voice-class sip profiles 1
 voice-class sip bind control source-interface GigabitEthernet0/1
 voice-class sip bind media source-interface GigabitEthernet0/1
 dtmf-relay rtp-nte sip-kpml
 no vad
!
dial-peer voice 111 voip
 description Outbound calls to PSTN
 translation-profile outgoing PSTN-OUT
 destination-pattern 9[12][27]T
 session protocol sipv2
 session target ipv4:10.24.0.24 (CARRIER)
 session transport udp
 voice-class codec 1 
 voice-class sip dtmf-relay force rtp-nte
 voice-class sip early-offer forced
 voice-class sip profiles 1
 voice-class sip bind control source-interface GigabitEthernet0/2
 voice-class sip bind media source-interface GigabitEthernet0/2
 dtmf-relay rtp-nte sip-kpml
 no vad

 

Thanks,

 

Regards,

 

Wilson