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

CUBE - CUCM codec mismatch with SIP trunk?? Reason: Q.850;cause=65

Liv_Liv
Level 1
Level 1

Hi, I have the following environment where outgoing calls to external SIP telekom provider are failing. 
Incoming calls from the ITSP are working perfectly. 

CUCM => SIP trunk => CUBE => ITSP
The ITSP supports: G711A, G711U, G729a, G722.

My config is as follows: 

voice class codec 1 
 codec preference 1 g711alaw
 codec preference 2 g711ulaw
 codec preference 3 g729r8
 codec preference 4 g722-64

voice class codec 2 
 codec preference 1 g729r8
 codec preference 2 g729br8
 codec preference 3 g711alaw
 codec preference 4 g711ulaw

voice class codec 3
 codec preference 1 g711ulaw
 codec preference 2 g722-64
 codec preference 3 g711alaw
 codec preference 4 g729r8

voice class codec 4
 codec preference 1 g711ulaw
 codec preference 2 g711alaw
 codec preference 3 g729r8
 codec preference 4 g729br8

dspfarm profile 1 transcode
codec g729abr8
codec g729ar8
codec g711alaw
codec g711ulaw
codec g722-64
codec g729br8
codec g729r8
maximum sessions 16
associate application SCCP

dial-peer voice 100 voip
 description *Incoming from ITSP*
 translation-profile incoming INCOMING_FROM_ITSP
 session protocol sipv2
 session transport udp
 incoming called-number 3........$
 incoming uri via ITSP
 voice-class codec 1
 voice-class sip profiles 1000
 dtmf-relay sip-notify rtp-nte

dial-peer voice 200 voip
 description *Outgoing to CUCMs*
 destination-pattern 4...$
 session protocol sipv2
 session server-group 10000
 voice-class codec 2
 voice-class sip options-keepalive
 voice-class sip bind control source-interface GigabitEthernet0/0/0.7
 voice-class sip bind media source-interface GigabitEthernet0/0/0.7
 dtmf-relay rtp-nte

dial-peer voice 300 voip
 description *Outbound to ITSP*
 translation-profile outgoing OUTGOING_TO_ITSP
 session protocol sipv2
 session target sip-server
 session transport udp
 destination e164-pattern-map 2222
 voice-class sip profiles 2000
 dtmf-relay sip-notify rtp-nte
 codec g711alaw
 no vad

dial-peer voice 400 voip
 description *Incoming from CUCM*
 session protocol sipv2
 incoming uri via CUCMs
 voice-class sip bind control source-interface GigabitEthernet0/0/0.7
 voice-class sip bind media source-interface GigabitEthernet0/0/0.7
 dtmf-relay rtp-nte
 no vad

And when I try an outgoing test call from one of the IP phones registered in the CUCM this is the debug I get (I´ve replaced the sensitive data with meaningful terms):

*Feb 19 12:45:16.109: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:Number2@CUBEs_Gi_IP:5060 SIP/2.0
Via: SIP/2.0/UDP CUCM_IP:5060;branch=z9hG4bK213b7562525ed
From: <sip:Number1@CUCM_IP>;tag=56087855~6a4d89ba-15e8-47e9-91bc-eed45860d755-63529998
To: <sip:Number2@CUBEs_Gi_IP>
Date: Wed, 19 Feb 2020 12:40:03 GMT
Call-ID: f1cf1900-e4d12ca3-1959c7-f904240a@CUCM_IP
Supported: timer,resource-priority,replaces
Min-SE: 1800
User-Agent: Cisco-CUCM10.5
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence, kpml
Supported: X-cisco-srtp-fallback
Supported: Geolocation
Call-Info: <sip:CUCM_IP:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
Call-Info: <urn:x-cisco-remotecc:callinfo>;x-cisco-video-traffic-class=MIXED
Cisco-Guid: 4056881408-0000065536-0000006392-4177798154
Session-Expires: 1800
P-Asserted-Identity: <sip:Number1@CUCM_IP>
Remote-Party-ID: <sip:Number1@CUCM_IP>;party=calling;screen=yes;privacy=off
Contact: <sip:Number1@CUCM_IP:5060>
Max-Forwards: 68
Content-Type: application/sdp
Content-Length: 297

v=0
o=CiscoSystemsCCM-SIP 56087855 1 IN IP4 CUCM_IP
s=SIP Call
c=IN IP4 CUBEs_Gi_IP
b=TIAS:64000
b=AS:64
t=0 0
m=audio 8000 RTP/AVP 0 18 9 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

*Feb 19 12:45:16.113: //4/F1CF19000000/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 488 Not Acceptable Media
Via: SIP/2.0/UDP CUCM_IP:5060;branch=z9hG4bK213b7562525ed
From: <sip:Number1@CUCM_IP>;tag=56087855~6a4d89ba-15e8-47e9-91bc-eed45860d755-63529998
To: <sip:Number2@CUBEs_Gi_IP>;tag=42F18-195C
Date: Wed, 19 Feb 2020 12:45:16 GMT
Call-ID: f1cf1900-e4d12ca3-1959c7-f904240a@CUCM_IP
CSeq: 101 INVITE
Allow-Events: telephone-event
Reason: Q.850;cause=65
Server: Cisco-SIPGateway/IOS-16.9.4
Session-ID: 1527fc57a8f45c5d9cf7f0fabf069885;remote=ac1dac794fdb5bb8a00b6e1236ade447
Content-Length: 0


*Feb 19 12:45:16.170: //4/F1CF19000000/SIP/Msg/ccsipDisplayMsg:
Received:
ACK sip:Number2@CUBEs_Gi_IP:5060 SIP/2.0
Via: SIP/2.0/UDP CUCM_IP:5060;branch=z9hG4bK213b7562525ed
From: <sip:Number1@CUCM_IP>;tag=56087855~6a4d89ba-15e8-47e9-91bc-eed45860d755-63529998
To: <sip:Number2@CUBEs_Gi_IP>;tag=42F18-195C
Date: Wed, 19 Feb 2020 12:40:03 GMT
Call-ID: f1cf1900-e4d12ca3-1959c7-f904240a@CUCM_IP
User-Agent: Cisco-CUCM10.5
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: presence, kpml
Content-Length: 0


As I understand the phone is offering those codecs to the CUBE: 

a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000

But CUCM and CUBE are having a codec mismatch somewhere, the call is not even sent to the ITSP yet.

Additional data:
- my trunk in CUCM is configured for early-offer;
- my trunk in CUCM does not rely on an MTP; already tried that with same result; 
- my trunk in CUCM does rely on a transcoder configured in CUBE; 
- g711a is hardcoded on the outgoing dial-peer facing ITSP, I tried changing that with no luck;
- I tried putting all different four codec profiles I´ve got in the incoming dial-peer facing CUCMs with no luck. Also tried changing codec order, tried forcing everything to work with g711a, no luck.
- I checked phone region with trunk region relationship and its set to talk with g711 and g722.

Can someone see what I´m missing?

thank you, 

4 Replies 4

Anthony Holloway
Cisco Employee
Cisco Employee
If I had to guess, based on what information you've presented so far, I'd say it's a codec mismatch due to misconfiguration. You have hard-coded g711alaw on the ITSP leg, but are showing us a g729r8 configuration on the CUCM leg (by way of default codec setting), and all though you pasted a transcoder config snippet, it's not a local transcoder (LTI) for CUBE to even use, since it's registered to CUCM. When you mentioned you tried applying all 4 of your codec profiles to the CUCM leg, this would still fail, because CUCM is listing g711ulaw as priority 1, which CUBE would/should honor, and you're right back in the same LTI issue as you were with g729r8.

As a quick fix, put codec class 1 on your CUCM peer, then create a new Audio Codec preference list in CUCM, where g711alaw is first in the list, and apply it to your SIP Trunk region to everywhere else (or just the phone region for testing). This way, CUCM will list alaw as priority 1, and CUBE will has the same codec on both legs, thus no transcoder needed.

As a long term fix, I think you should define, in writing, the capabilities you want to negotiate between CUCM in CUBE, and then CUBE and the ITSP. And you should define it, such that you don't need media resources like MTP or transcoders, if possible. If not, define the role the resource will play (e.g., dtmf interworking or codec translating) and which leg it pertains to.

Then, I think you should configure your dial-peers (your inbound CUCM peer should have one or more codecs on it, and both OOB and inband DTMF), CUCM trunk (dtmf no preference, and likely not NOTIFY) and if necessary the media resource to support the design (which leg does it apply to, and where is it registered).

Lastly, if you are still having problems after doing the above, then I think you should first confirm the dial-peers being used in the call flow, since one of the most common errors I see people run into, is they start troubleshooting the configuration, all the while looking in the wrong spot for the problem.

Some useful debugs/commands in addition to your ccsip messages:
debug voip ccapi inout
voice iec syslog
debug ccsip error

I hope that helped out some. I look forward to your response.

Just as an aside I think G711a vs G711u may be a red herring. We have lots of installs where the ITSP prefers or only supports G711a, and we haven't needed to tweak CUCM preference lists. As long as G711a is somewhere in the SDP that appears to be all that is needed.
I think all that may be needed may be to apply voice-class codec 2 to the inbound CUCM dial peer. Note your CUCM is offering G729b which is why I suggest class 2 rather than 1.

Did you see the part where OP claimed to have tried voice class codec 2 already?  If that's true, then I wonder why it didn't work for them.

 

"I tried putting all different four codec profiles I´ve got in the incoming dial-peer facing CUCMs with no luck."

I did see that but maybe not really took it in.  I still think that should have worked, but would like to see the debug.  Maybe it worked at the CUBE but got knocked back by the ITSP.  

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: