Outbound codec preference based on region

Hi all,

We have a CUCM cluster, connected to a CUBE connected to the provider. All trunks are SIP:

CUCM --- SIP --- CUBE --- SIP ----PSTN.

The connection to the PSTN is centralized, but there are multiple offices. Through Region settings, all local traffic is set to G.711, but all WAN traffic is G.729, except for faxes. The provider also supports both G.711 and G.729. On incoming calls, the region settings apply, and most calls enter as G.729, except for those in the Device Pool Faxes, which is connected to the Faxes Region. The connection to the PSTN is also adapted to the phone region setting, so no transcoding occurs.

Outgoing however, we see that the connection to the PSTN is whatever we put first in the codec class, and if nessecary, transcoding is done on the gateway. Is it possible negotiate the outgoing codec based on the region settings of the phone?

We currently solved it by adding a prefix to the dialed number and matching a different dial-peer for faxes, but I was wondering if it is possible some other way.

The region setting will take effect regardless of what you have configured on the voice-class codec for your inbound dial-peer. This is because when 200 ok is sent CUCM will send the codec defined between the endpoint and the CUBE as the codec. CUBE then passes this on to ITSP.

+++OUTBOUND LEG++++

on the outbound direction...

The advertised codec to ITSP will be used, beacuse ITSP is the one making decision which codec to use based on advertised codec.So here with voice class codec, the preffered codec in the list will be selected by the ITSP and this will be used for the call regardless of what the region setting is on the phone to the cube gateway.

if the codec is hardcoded..if its set to g711, then g711 response will be obtained from the ITSP and that codec will be used for the call.

if its g729 then it will be g729...

So the outbound leg is independent of the region settings beacuse it is the far end that is choosing

what codec to use for the call.

So in both cases the codec selected by the far end will determine what codec is used for the call

Inbound leg, far end is CUCM..region takes effectoutbound leg, far end is ITSP, prefered codec in advertised codec will take effect..Simples!

So if you want to choose a codec for your outbound leg, you have to either set it as preferred in your voice class list or hardcode it such that it is the codec been advertised as the prefferd to your ITSP

NB: on the faxes, on the inbound call we are using voice class codec and region settings (g711 is used for fax). As explained above fax will use G711 because of its region settings to the cube gateway

On the outbound leg, we have done similar config as yours. Prefix digits to the called number and then configure dial-peer to use G711.

Please rate useful posts

"I am complete in God, God completes me"

Please rate all useful posts
"The essence of christianity is not the enthronement but the obliteration of self --William Barclay"

Re: Outbound codec preference based on region

Tom,

NB: I set region between phone and Cube to use G711. I have voice-class codec with g729 preffered..So I was hoping the call will be forced to use G711..but the traces showed it used G729...

I did a test yesterday on this for outbound calls and to my surprise the codec used was not based on the region setting between the phone and the cube. What I saw was that when the invite was received on cube from CUCM, cube sends invite to ITSP with all codecs in its voice-class fconfig...

When the ITSP responded in session progress with SDP, it sent only G729. Hence cube sent 183 to CUCM with only g729 and the call used g729. Even though the region between the phone and cube was set to g711...

The region setting will take effect regardless of what you have configured on the voice-class codec for your inbound dial-peer. This is because when 200 ok is sent CUCM will send the codec defined between the endpoint and the CUBE as the codec. CUBE then passes this on to ITSP.

+++OUTBOUND LEG++++

on the outbound direction...

The advertised codec to ITSP will be used, beacuse ITSP is the one making decision which codec to use based on advertised codec.So here with voice class codec, the preffered codec in the list will be selected by the ITSP and this will be used for the call regardless of what the region setting is on the phone to the cube gateway.

if the codec is hardcoded..if its set to g711, then g711 response will be obtained from the ITSP and that codec will be used for the call.

if its g729 then it will be g729...

So the outbound leg is independent of the region settings beacuse it is the far end that is choosing

what codec to use for the call.

So in both cases the codec selected by the far end will determine what codec is used for the call

Inbound leg, far end is CUCM..region takes effectoutbound leg, far end is ITSP, prefered codec in advertised codec will take effect..Simples!

So if you want to choose a codec for your outbound leg, you have to either set it as preferred in your voice class list or hardcode it such that it is the codec been advertised as the prefferd to your ITSP

NB: on the faxes, on the inbound call we are using voice class codec and region settings (g711 is used for fax). As explained above fax will use G711 because of its region settings to the cube gateway

On the outbound leg, we have done similar config as yours. Prefix digits to the called number and then configure dial-peer to use G711.

Please rate useful posts

"I am complete in God, God completes me"

Please rate all useful posts
"The essence of christianity is not the enthronement but the obliteration of self --William Barclay"

Re: Outbound codec preference based on region

Thanks a lot! That explains it as far as I'm concerned, and now I know I didn't do an unnecesary workaround for the faxes. It would be nice though, if there would be a feature that could adapt the codec preference depending on the region settings.

• Box to Box redundancy is important for many large scale deployment of SIP Trunks. This feature provides a important tool to improve resiliency of Cisco SIP Trunk solution Mid call codec renegotiation enabled new deployment scenarios that allow for calls to be transferred between regions that support different codecs.

Hi All,
Are you getting this error “Installer User Interface Mode Not Supported. The installer cannot run in this UI mode. To specify the interface mode, use the -i command-line option, followed by the UI mode identifier. The value UI mode identifiers...
view more

The below trick might come handy when you have to add a new node to a cluster but you don't have or is unsure of the security password for the publisher. This procedure has been around for ages.
1) Login into the CLI of the Publisher.
...
view more