10-22-2019 10:23 PM
Hi,
I have a voip dial peer won't strip called digits. For example, I want to keep the last 4 digits and strip any digits in front. Lets say the incoming number is 12345678 as a example, and I want the voip dial peer 12 to strip 1234 and only keep 5678. Here is the configuration:
voice translation-rule 1
rule 1 /^.*\(....\)$/ /\1/
voice translation-profile sip-incoming
translate called 1
dial-peer voice 12 voip
translation-profile outgoing sip-incoming
destination-pattern 12345678
session target call-manager-ip
voice-class codec 1
And then I make a test call on 12345678 from outside, I can see the call hits the my CUBE router and voip dial peer 12, but the called number after matching the dial peer becomes empty. Here is the debug voip dialpeer inout:
Oct 23 05:14:44.581: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Calling Number=12345678, Called Number=12345678, Peer Info Type=DIALPEER_INFO_SPEECH
Oct 23 05:14:44.581: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=12345678
Oct 23 05:14:44.581: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Result=Success(0) after DP_MATCH_DEST
Oct 23 05:14:44.581: //-1/xxxxxxxxxxxx/DPM/dpMatchSafModulePlugin:
dialstring=12345678, saf_enabled=1, saf_dndb_lookup=1, dp_result=0
Oct 23 05:14:44.581: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:
Result=SUCCESS(0)
List of Matched Outgoing Dial-peer(s):
1: Dial-peer Tag=12
2: Dial-peer Tag=10
Oct 23 05:14:44.581: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Calling Number=XXXXXXXX, Called Number=, Voice-Interface=0x0,
Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Any idea why?
Thank you
10-23-2019 07:52 AM
If you're sending the call to CUCM, why not just set the significant digits to 4?
10-23-2019 01:38 PM
10-23-2019 09:00 AM
I think you want the dollar sign inside the brackets, to make it clear the variable is the last four digits. For example, taken from a working installation ..
rule 100 /.*\(....$\)/ /\1/
Are you aware of the "test voice translation-rule" command?
10-23-2019 12:00 PM
No, having the dollar sign outside of the grouping is appropriate.
VGW#show run | s voice translation-rule 1 voice translation-rule 1 rule 1 /^.*\(....\)$/ /\1/ ! VGW#test voice translation-rule 1 6125551212 Matched with rule 1 Original number: 6125551212 Translated number: 1212 Original number type: none Translated number type: none Original number plan: none Translated number plan: none
10-23-2019 01:52 PM
Yeah I have test it by using the test translation command.
I don't even think it is the translation profile problem now since even I removed the "translation-profile outgoing sip-incoming" from the dial peer config, the Called Number in the output still showing empty...
10-23-2019 11:32 PM
10-24-2019 06:36 AM
Please post "debug voice translation".
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