Inbound voice translation-rule for Inbound PSTN Calls


Voice translation-rule on Cisco Routers are sometimes very confusing. There is an old document on Cisco website (https://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/61083-voice-transla-rules.pdf) explaining all the options, so I will only resume on this post very common aplications of the voice translation-rules.

INBOUND CALLS FROM PSTN

When a call come from the PSTN Provider, depending of your Telco, they can send you the call with 4 digits, 7 digits, 8 digits, etc. Also, these numbers should match how your internal extensions are configured on Cisco Call Manager / Call Manager Express.

On this example, I will use:

PSTN ---> call to 2223333 --->  send 3333 as called ---> Cisco Router ---> CUCM ---> Internal extension 1503333

PSTN Number: 222-3333
PSTN Sending the call with 4 digits = extension 3333
Internal extension configured as: 150 + 4 digits

So we need to add the site code "150" to this call.

If your PSTN provider is a T1/E1, the best place to apply this configuration is the voice-port. But if your telco is a SIP Provider, you can apply it on the inbound dial-peer that match this call on the inbound direction (better to use an specific dial-peer for this with the command "incoming called-number"

APPLYING CONFIG TO VOICE-PORT 0/0/0:23 (T1)

voice translation-rule 1
 rule 1 /\(....$\)/ /150\1/
voice translation-profile INCOMING-FROM-PSTN
 translate called 1
voice-port 0/0/0:23
  translation-profile incoming INCOMING-FROM-PSTN


APPLYING CONFIG TO VOICE-PORT 0/0/0:15 (E1)

Same config, only changes where the config is applied:

voice translation-rule 1
 rule 1 /\(....$\)/ /150\1/
voice translation-profile INCOMING-FROM-PSTN
 translate called 1
voice-port 0/0/0:15
  translation-profile incoming INCOMING-FROM-PSTN


APPLYING CONFIG TO INBOUND DIAL-PEER (if PSTN is a SIP Provider)


voice translation-rule 1
 rule 1 /\(....$\)/ /150\1/
voice translation-profile INCOMING-FROM-PSTN
 translate called 1
dial-peer voice 3000 voip
 translation-profile incoming INCOMING-FROM-PSTN
 session protocol sipv2
 incoming called-number 3...$
 description Incoming call from SIP Provider
 rtp payload-type nte 102
 voice-class sip early-offer forced
 dtmf-relay rtp-nte
 codec g711alaw
 fax protocol t38 version 0 ls-redundancy 3 hs-redundancy 1 fallback pass-through g711ulaw
 no vad

Some commands are not really necessary, or can be different on your case, like:

  • no vad
  • dtmf-relay rtp-nte
  • rtp payload-type nte 102
  • voice-class sip early-offer forced 
  • codec g711alaw

Maybe you need to check with your provider these options, but this config can be used as an example.




Comments