Asterisk CUCM 8.6 SIP Trunk

Hi, i´m trying to create a SIP Trunk between Asterisk and a CUCM 8.6, in the sip.conf this is the configuration for the call manager:

[callmanageroth] type=friend context=Fromtrunk host=10.109.5.10 disallow=all allow=ulaw allow=alaw canreinvite=yes qualify=yes

In the CUCM i have created the SIP Trunk following the instructions on this page: voip-info.org/wiki/view/Aste … ntegration

In extensions.conf i have the followign contexts:

[code][trunk]
exten => _2XXX,1,Dial(SIP/${EXTEN}@callmanageroth)
exten => _7XXX,1,Dial(SIP/${EXTEN}@callmanageroth)

[Fromtrunk]
exten => #87,1,Dial(SIP/softphone1) ;softphone installed on PC[/code]

Now, when i try to make a call to an extesion of the Callmanager, for example 2953 i get the following error:

== Using SIP RTP CoS mark 5 -- Executing [2953@LocalSets:1] Dial("SIP/softphone1-00000017", "SIP/2953@callmanageroth") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/2953@callmanageroth -- Got SIP response 503 "Service Unavailable" back from 10.109.5.10:5060 -- SIP/callmanageroth-00000018 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Auto fallthrough, channel 'SIP/softphone1-00000017' status is 'CONGESTION'

When i enable SIP Debug this is what i get:

<------------>
Audio is at 17578
Adding codec 100003 (ulaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 10.109.5.10:5060:
INVITE sip:2953@10.109.5.10 SIP/2.0
Via: SIP/2.0/UDP 10.109.20.62:5060;branch=z9hG4bK3c15ea50
Max-Forwards: 70
From: "Carlos Garcia" <sip:8211@10.109.20.62>;tag=as7f84f26b
To: <sip:2953@10.109.5.10>
Contact: <sip:8211@10.109.20.62:5060>
Call-ID: 06a36d7d2045e68b5c53c0f76a6e25ff@10.109.20.62:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX SVN-branch-11-r406722
Date: Thu, 13 Feb 2014 23:28:30 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 299

v=0
o=root 123368445 123368445 IN IP4 10.109.20.62
s=Asterisk PBX SVN-branch-11-r406722
c=IN IP4 10.109.20.62
t=0 0
m=audio 17578 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---

<--- SIP read from UDP:10.109.5.10:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.109.20.62:5060;branch=z9hG4bK3c15ea50
From: "Carlos Garcia" <sip:8211@10.109.20.62>;tag=as7f84f26b
To: <sip:2953@10.109.5.10>
Date: Thu, 13 Feb 2014 23:28:25 GMT
Call-ID: 06a36d7d2045e68b5c53c0f76a6e25ff@10.109.20.62:5060
CSeq: 102 INVITE
Allow-Events: presence
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---

<--- SIP read from UDP:10.109.5.10:5060 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.109.20.62:5060;branch=z9hG4bK3c15ea50
From: "Carlos Garcia" <sip:8211@10.109.20.62>;tag=as7f84f26b
To: <sip:2953@10.109.5.10>;tag=1921275670
Date: Thu, 13 Feb 2014 23:28:25 GMT
Call-ID: 06a36d7d2045e68b5c53c0f76a6e25ff@10.109.20.62:5060
CSeq: 102 INVITE
Allow-Events: presence
Warning: 399 CM-GVTA-P "Unable to find a device handler for the request received on port 5060 from 10.109.20.62"
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
Transmitting (no NAT) to 10.109.5.10:5060:
ACK sip:2953@10.109.5.10 SIP/2.0
Via: SIP/2.0/UDP 10.109.20.62:5060;branch=z9hG4bK3c15ea50
Max-Forwards: 70
From: "Carlos Garcia" <sip:8211@10.109.20.62>;tag=as7f84f26b
To: <sip:2953@10.109.5.10>;tag=1921275670
Contact: <sip:8211@10.109.20.62:5060>
Call-ID: 06a36d7d2045e68b5c53c0f76a6e25ff@10.109.20.62:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX SVN-branch-11-r406722
Content-Length: 0


---

<--- Reliably Transmitting (NAT) to 10.109.20.25:17078 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.109.20.25:17078;branch=z9hG4bK-d8754z-39ad1100c43a5c5d-1---d8754z-;received=10.109.20.25;rport=17078
From: "Carlos Garcia"<sip:softphone1@10.109.20.62>;tag=c8dd6f35
To: <sip:2953@10.109.20.62>;tag=as7ada35c9
Call-ID: YTk1MGU4NDJiNzY2MDJhZmY3OGU0MjIyMWM4N2M1YWE
CSeq: 2 INVITE
Server: Asterisk PBX SVN-branch-11-r406722
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
X-Asterisk-HangupCause: Circuit/channel congestion
X-Asterisk-HangupCauseCode: 34
Content-Length: 0

I suspect the problem is related to the configuration on the CUCM, but i haven´t been able to find an accurate configuration guide for the SIP Trunk.
Any help would be apreciated.

It is definitely a CUCM side problem:

Warning: 399 CM-GVTA-P “Unable to find a device handler for the request received on port 5060 from 10.109.20.62”

(However peer is better than friend and canreinvite is deprecated in that version.)

I have around ~20 SIP trunks between Asterisk and CUCM 8.6 in production at work.

–If it isn’t working for CUCM inbound, but working for CUCM outbound:
Check the Incoming Calling Search Space on the trunk. Make sure that is set and that the extension you are looking for is in a partition that is then in that CSS assigned to the trunk. (The only exception to this is if the extension is not assigned a partition, but I don’t really do DNs outside of partitions anywhere and there may be other considerations if you do it that way.)

–If it doesn’t work either direction:
I have found that CUCM SIP trunks are finicky in practice. As a rule, I always to a reset and restart on the CUCM trunk after any significant change. Give it 15 seconds or so to come back after you do that.

Also, check the SIP security profile assigned to the trunk. It looks like it defaults to TCP on CUCM, and maybe you are trying to send the call using UDP.

Good luck!

-Brian

Thanks for the tips, i have managed to get it working!
I think the only change i made was to uncheck the “Requere Media Termination Point” option on CUCM SIP Trunk Profile.
Now, i used

qualify = yes

in sip.conf
And i see a lot of messages like these:

Peer callmanageroth is now Reachable (xxms/xxms)
Perr callmanageroth is now Unreachable (xxms/xxms)

Is this normal?

Qualify failures are not normal. They indicate a network overloaded to the point of collapse.

Cisco only requires MTPs with Asterisk if there is a codec mismatch.

Ok, the last problem was a Network issue, it was a duplicated IP address problem. Thank you all people for your help.