cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2543
Views
10
Helpful
7
Replies

translation rule for SIP dial-peer

techguy
Level 4
Level 4

Hi Guys,

I have outgoing Voip dialpeer where i cannot remove prefix. But we can make translation rule to omit prefix like 9 and then add outbound DID for outgoing calls. Any idea/suggestion?

 

dial-peer voice 2 voip
 description OUTGOING CALLS
 translation-profile outgoing outbound-DID
 destination-pattern 9T
 session protocol sipv2
 session target sip-server
 voice-class codec 1
 voice-class sip dtmf-relay force rtp-nte
 dtmf-relay rtp-nte
 no vad

!

voice translation-rule 2
 rule 1 /.*/ /35366850/
!
!
voice translation-profile outbound-DID
 translate calling 2

 

 

Thanks.

1 Accepted Solution

Accepted Solutions

Just add it as below

 

Try as below

 

voice translation-rule 2
 rule 1 /.*/ /35366850/

 

 

voice translation-rule 3
rule 1 /^9\ (........\)/ /\1/

!
voice translation-profile outbound-DID
 translate calling 2

 translate called 3

View solution in original post

7 Replies 7

Didn't get exactly what you are looking for?

I want dial outside with prefix 9 but ITSP accepts calls with specific DID without any prefix. How can we achieve it thru translation rule which can used in Voip dialpeer
In POTS dialpeer we can alter the destination pattern like prefix, forward digits etc..

R0g22
Cisco Employee
Cisco Employee
If all you are looking to do is drop the 9, use this -

voice translation-rule 2
rule 1 /9/ //

voice translation-profile outbound-DID
translate calling 2

Thanks for the reply.

 

Im looking for to not only drop 9 but send outgoing calls with one specific number as DID.

Just add it as below

 

Try as below

 

voice translation-rule 2
 rule 1 /.*/ /35366850/

 

 

voice translation-rule 3
rule 1 /^9\ (........\)/ /\1/

!
voice translation-profile outbound-DID
 translate calling 2

 translate called 3

Can we use below
/^9\(.*\)/ instead of using /^9\ (........\)/ /\1/ becasue there could be other digits numbers too

R0g22
Cisco Employee
Cisco Employee
Ok, so you are confusing things. You need to strip 9 from your dnis i.e called number and you want the calls to go out as a specific DID number i.e ANI or calling. Is that what you are looking for ?
If yes, then the one that I mentioned was for called number. For calling you need a different rule. You the one that you pointed out in your last post. My rule will be “translate called” while yours will be “translate calling”. You can apply it to a single profile.

And yes to your translation query. You can use that. Add a ^ before the 9 in the match pattern and you should be set.