04-11-2014 02:36 PM - edited 03-16-2019 10:27 PM
I have a 2821 running IOS c2800nm-adventerprisek9-mz.151-4.M7 in a lab environment. I have it configured with SIP trunks to both CUCM and a termination provider. I am using static (source ip based) authentication with the provider. When I place calls from an analog phone on an FXS port, the call connects to the PSTN just fine. When placing calls from CUCM, I get a Temporarily Unavailable error, which after much research I've found means 401 Unauthorized from this provider (annoying, I know).
So, I know the problem has something to do with a configuration change I need to make in order to the calls originating from CUCM, but I'm at a loss as to what. I've tried working with the provider, but they seem to be incapable of really looking deep into things. I'll continue to work with them, but I'm asking here as well, hoping one of you has seen this before.
Here is the INVITE sent from my gateway when dialed from an analog phone (successful):
INVITE sip:16518158320@67.205.159.100:5060 SIP/2.0
Via: SIP/2.0/TCP 10.xx.xx.xx:5060;branch=z9hG4bK48F192D
Remote-Party-ID: "Cordless 0" <sip:6125556666@10.xx.xx.xx>;party=calling;screen=no;privacy=off
From: "Cordless 0" <sip:6125556666@sip.didlogic.net>;tag=B9FD280-25D0
To: <sip:16518158320@67.205.159.100>
Date: Fri, 11 Apr 2014 19:47:30 GMT
Call-ID: F3B23EB0-C0E811E3-830AE452-E7A949D0@10.0.0.50
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 4044704048-3236434403-2198201426-3886631376
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Max-Forwards: 70
Timestamp: 1397245650
Contact: <sip:6125556666@10.0.0.50:5060;transport=tcp>
Call-Info: <sip:10.xx.xx.xx:5060>;method="NOTIFY;Event=telephone-event;Duration=2000"
Expires: 180
Allow-Events: telephone-event
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 297
v=0
o=CiscoSystemsSIP-GW-UserAgent 8252 7196 IN IP4 10.xx.xx.xx
s=SIP Call
c=IN IP4 10.xx.xx.xx
t=0 0
m=audio 17690 RTP/AVP 0 101 19
c=IN IP4 10.xx.xx.xx
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:19 CN/8000
a=ptime:20
And here is the SIP INVITE from the CUCM Call, note that nothing is sent after this in either case before receiving the respective Replies.
INVITE sip:16518158320@67.205.159.100:5060 SIP/2.0
Via: SIP/2.0/TCP 10.xx.xx.xx:5060;branch=z9hG4bK48D6F4
Remote-Party-ID: "Zach Bullough" <sip:651815xxxx@10.xx.xx.xx>;party=calling;screen=yes;privacy=off
From: "Zach Bullough" <sip:651815xxxx@sip.didlogic.net>;tag=B9E9608-19EA
To: <sip:1651815xxxx@67.205.159.100>
Date: Fri, 11 Apr 2014 19:46:09 GMT
Call-ID: C3674D14-C0E811E3-82FCE452-E7A949D0@10.xx.xx.xx
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 3964935168-0000065536-0000000029-0051685568
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1397245569
Contact: <sip:6518158320@10.xx.xx.xx:5060;transport=tcp>
Call-Info: <sip:10.xx.xx.xx:5060>;method="NOTIFY;Event=telephone-event;Duration=2000"
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 285
v=0
o=CiscoSystemsSIP-GW-UserAgent 5407 1747 IN IP4 10.xx.xx.xx
s=SIP Call
c=IN IP4 10.xx.xx.xx
t=0 0
m=audio 17212 RTP/AVP 0 101 19
c=IN IP4 10.xx.xx.xx
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20
As far as I can tell, they are about as identical as they can be. Note that IPs I censored are all identical in their respective uses.
Here is what I think the relevant configuration:
sip
bind control source-interface Vlan1
bind media source-interface Vlan1
session transport tcp
header-passing
no call service stop
registration passthrough static
sip-ua
permit hostname dns:east-softswitch-01.circuitid.com
Any tips or complete solutions are welcome. If you need more information, please let me know.
04-11-2014 05:28 PM
401 unauthorized to me means something that you send, the provider doesnt like. Did provider give you a specific DID for your trunk. I would modify your external phone number mask to be that caller ID and try again. If possible, please post full SIP debug from the gateway.
04-13-2014 02:59 PM
Hey, thanks for the reply. I managed to fix the SIP-to-SIP problem. I was missing a sip privacy setting in my voice class voip config. I found the recommended configuration for another Trunk provider, and that solved the problem.
For people who come across this later, what I added was
asserted-id ppi
to voice service voip
sip
After that, my static authenticated calls started working. Now I'm dealing with what I think is a NAT issue with dynamic (digest) authentication. Using quite a few sip-profile MODIFY commands I've managed to manually NAT my inside private network in the messages, but somehow, things are still not working right. I show as registered to my outside public IP, like I should, but once I authenticate calls through the proxy, I never receive a reply... Not sure what's happening there.
The biggest problem lies in that I have this lab behind non-cisco equipment for the moment, pending my dedicated lab connection going in, and the consumer-grade router is not translating everything like it should... at least that's my suspicion.
If anyone feels like helping out, here's the full config:
sip
bind control source-interface Vlan1
bind media source-interface Vlan1
session transport tcp
header-passing
error-passthru
asserted-id ppi
localhost dns:domain.com
midcall-signaling passthru
sip-profiles 1
no call service stop
voice class sip-profiles 1
request INVITE sip-header From modify "@.+>" "@domain.com>"
request REGISTER sip-header From modify "@.*>" "@domain.com>"
request REGISTER sip-header Contact modify "@.*>" "@domain.com>"
request INVITE sip-header Contact modify "@.*>" "@domain.com>"
request INVITE sip-header Call-Info remove
request INVITE sdp-header Connection-Info modify "10\.0\.0\.50" "domain.com"
request INVITE sdp-header Audio-Connection-Info modify "10\.0\.0\.50" "domain.com"
request INVITE sdp-header Session-Owner modify "10\.0\.0\.50" "domain.com"
request INVITE sdp-header Session-Info modify "10\.0\.0\.50" "domain.com"
sip-ua
credentials username 170705 password 7 011535570F0E145C75 realm chicago.voip.ms
credentials username 32046 password 7 110F2A564317195F50 realm sip.didlogic.net
authentication username 170705 password 7 08277F1D5D1C174446 realm chicago.voip.ms
authentication username 170705 password 7 050D355C75495C5A4D realm chicago2.voip.ms
authentication username 32046 password 7 050D355C75495C5A4D realm sip.didlogic.net
registrar 1 dns:chicago.voip.ms expires 3600
registrar 2 dns:chicago2.voip.ms expires 3600
registrar 3 dns:sip.didlogic.net expires 3600
dial-peer voice 30 voip
description SHARED OUTGOING SIP PSTN 11
translation-profile outgoing CUBE-CLEAN
destination-pattern 01[2-9]..[2-9]......
session protocol sipv2
session target dns:chicago2.voip.ms
session transport udp
no voice-class sip block 180
no voice-class sip block 183
no voice-class sip block 181
dtmf-relay sip-notify rtp-nte
codec g711ulaw
And here's a sample conversation where I suddenly stop getting messages:
Apr 13 21:41:34.762: //1586/60C6C0800000/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:1XXXXXXXXXX@sip.didlogic.net:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.50:5060;branch=z9hG4bK59E1187
From: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>;tag=1654EA40-97B
To: <sip:1XXXXXXXXXX@sip.didlogic.net>
Date: Sun, 13 Apr 2014 21:41:34 GMT
Call-ID: 3800BC64-C28B11E3-8835E452-E7A949D0@domain.com
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 1623638144-0000065536-0000000080-0051685568
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1397425294
Contact: <sip:XXXXXXXXXX@domain.com>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Cisco-Gcid: 37FEE753-C28B-11E3-8832-E452E7A949D0
P-Preferred-Identity: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 274
v=0
o=CiscoSystemsSIP-GW-UserAgent 8376 7466 IN IP4 domain.com
s=SIP Call
c=IN IP4 domain.com
t=0 0
m=audio 18902 RTP/AVP 0 101 19
c=IN IP4 domain.com
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20
Apr 13 21:41:34.934: //1586/60C6C0800000/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.0.0.50:5060;branch=z9hG4bK59E1187;rport=15245;received=65.128.160.150
From: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>;tag=1654EA40-97B
To: <sip:1XXXXXXXXXX@sip.didlogic.net>;tag=b27e1a1d33761e85846fc98f5f3a7e58.eef9
Call-ID: 3800BC64-C28B11E3-8835E452-E7A949D0@domain.com
CSeq: 101 INVITE
Proxy-Authenticate: Digest realm="sip.didlogic.net", nonce="U0sFulNLBI487NoK3aQj+bLy5mdhpj2ZsnxLxYA=", qop="auth"
Server: kamailio (4.0.3 (x86_64/linux))
Content-Length: 0
Apr 13 21:41:34.938: //1586/60C6C0800000/SIP/Msg/ccsipDisplayMsg:
Sent:
ACK sip:1XXXXXXXXXX@sip.didlogic.net:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.50:5060;branch=z9hG4bK59E1187
From: "Zach Bullough" <sip:XXXXXXXXXX@10.0.0.50>;tag=1654EA40-97B
To: <sip:1XXXXXXXXXX@sip.didlogic.net>;tag=b27e1a1d33761e85846fc98f5f3a7e58.eef9
Date: Sun, 13 Apr 2014 21:41:34 GMT
Call-ID: 3800BC64-C28B11E3-8835E452-E7A949D0@domain.com
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: telephone-event
Content-Length: 0
Apr 13 21:41:34.942: //1586/60C6C0800000/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:1XXXXXXXXXX@sip.didlogic.net:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.50:5060;branch=z9hG4bK59FB7C
From: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>;tag=1654EA40-97B
To: <sip:1XXXXXXXXXX@sip.didlogic.net>
Date: Sun, 13 Apr 2014 21:41:34 GMT
Call-ID: 3800BC64-C28B11E3-8835E452-E7A949D0@domain.com
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 1623638144-0000065536-0000000080-0051685568
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 102 INVITE
Timestamp: 1397425294
Contact: <sip:XXXXXXXXXX@domain.com>
Expires: 180
Allow-Events: telephone-event
Proxy-Authorization: Digest username="32046",realm="sip.didlogic.net",uri="sip:1XXXXXXXXXX@sip.didlogic.net:5060",response="cb4e17ed3708ffe3958ea4d3f2e0cba1",nonce="U0sFulNLBI487NoK3aQj+bLy5mdhpj2ZsnxLxYA=",cnonce="D5251403",qop=auth,algorithm=md5,nc=00000001
Max-Forwards: 69
Cisco-Gcid: 37FEE753-C28B-11E3-8832-E452E7A949D0
P-Preferred-Identity: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 274
v=0
o=CiscoSystemsSIP-GW-UserAgent 8376 7466 IN IP4 domain.com
s=SIP Call
c=IN IP4 domain.com
t=0 0
m=audio 18902 RTP/AVP 0 101 19
c=IN IP4 domain.com
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20
Apr 13 21:41:35.438: //1586/60C6C0800000/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:1XXXXXXXXXX@sip.didlogic.net:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.50:5060;branch=z9hG4bK59FB7C
From: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>;tag=1654EA40-97B
To: <sip:1XXXXXXXXXX@sip.didlogic.net>
Date: Sun, 13 Apr 2014 21:41:35 GMT
Call-ID: 3800BC64-C28B11E3-8835E452-E7A949D0@domain.com
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 1623638144-0000065536-0000000080-0051685568
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 102 INVITE
Timestamp: 1397425295
Contact: <sip:XXXXXXXXXX@domain.com>
Expires: 180
Allow-Events: telephone-event
Proxy-Authorization: Digest username="32046",realm="sip.didlogic.net",uri="sip:1XXXXXXXXXX@sip.didlogic.net:5060",response="cb4e17ed3708ffe3958ea4d3f2e0cba1",nonce="U0sFulNLBI487NoK3aQj+bLy5mdhpj2ZsnxLxYA=",cnonce="D5251403",qop=auth,algorithm=md5,nc=00000001
Max-Forwards: 69
Cisco-Gcid: 37FEE753-C28B-11E3-8832-E452E7A949D0
P-Preferred-Identity: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 274
v=0
o=CiscoSystemsSIP-GW-UserAgent 8376 7466 IN IP4 domain.com
s=SIP Call
c=IN IP4 domain.com
t=0 0
m=audio 18902 RTP/AVP 0 101 19
c=IN IP4 domain.com
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20
Apr 13 21:41:36.438: //1586/60C6C0800000/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:1XXXXXXXXXX@sip.didlogic.net:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.50:5060;branch=z9hG4bK59FB7C
From: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>;tag=1654EA40-97B
To: <sip:1XXXXXXXXXX@sip.didlogic.net>
Date: Sun, 13 Apr 2014 21:41:36 GMT
Call-ID: 3800BC64-C28B11E3-8835E452-E7A949D0@domain.com
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 1623638144-0000065536-0000000080-0051685568
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 102 INVITE
Timestamp: 1397425296
Contact: <sip:XXXXXXXXXX@domain.com>
Expires: 180
Allow-Events: telephone-event
Proxy-Authorization: Digest username="32046",realm="sip.didlogic.net",uri="sip:1XXXXXXXXXX@sip.didlogic.net:5060",response="cb4e17ed3708ffe3958ea4d3f2e0cba1",nonce="U0sFulNLBI487NoK3aQj+bLy5mdhpj2ZsnxLxYA=",cnonce="D5251403",qop=auth,algorithm=md5,nc=00000001
Max-Forwards: 69
Cisco-Gcid: 37FEE753-C28B-11E3-8832-E452E7A949D0
P-Preferred-Identity: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 274
v=0
o=CiscoSystemsSIP-GW-UserAgent 8376 7466 IN IP4 domain.com
s=SIP Call
c=IN IP4 domain.com
t=0 0
m=audio 18902 RTP/AVP 0 101 19
c=IN IP4 domain.com
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20
Apr 13 21:41:38.438: //1586/60C6C0800000/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:1XXXXXXXXXX@sip.didlogic.net:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.50:5060;branch=z9hG4bK59FB7C
From: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>;tag=1654EA40-97B
To: <sip:1XXXXXXXXXX@sip.didlogic.net>
Date: Sun, 13 Apr 2014 21:41:38 GMT
Call-ID: 3800BC64-C28B11E3-8835E452-E7A949D0@domain.com
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 1623638144-0000065536-0000000080-0051685568
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 102 INVITE
Timestamp: 1397425298
Contact: <sip:XXXXXXXXXX@domain.com>
Expires: 180
Allow-Events: telephone-event
Proxy-Authorization: Digest username="32046",realm="sip.didlogic.net",uri="sip:1XXXXXXXXXX@sip.didlogic.net:5060",response="cb4e17ed3708ffe3958ea4d3f2e0cba1",nonce="U0sFulNLBI487NoK3aQj+bLy5mdhpj2ZsnxLxYA=",cnonce="D5251403",qop=auth,algorithm=md5,nc=00000001
Max-Forwards: 69
Cisco-Gcid: 37FEE753-C28B-11E3-8832-E452E7A949D0
P-Preferred-Identity: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 274
v=0
o=CiscoSystemsSIP-GW-UserAgent 8376 7466 IN IP4 domain.com
s=SIP Call
c=IN IP4 domain.com
t=0 0
m=audio 18902 RTP/AVP 0 101 19
c=IN IP4 domain.com
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20
Apr 13 21:41:42.438: //1586/60C6C0800000/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:1XXXXXXXXXX@sip.didlogic.net:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.50:5060;branch=z9hG4bK59FB7C
From: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>;tag=1654EA40-97B
To: <sip:1XXXXXXXXXX@sip.didlogic.net>
Date: Sun, 13 Apr 2014 21:41:42 GMT
Call-ID: 3800BC64-C28B11E3-8835E452-E7A949D0@domain.com
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 1623638144-0000065536-0000000080-0051685568
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 102 INVITE
Timestamp: 1397425302
Contact: <sip:XXXXXXXXXX@domain.com>
Expires: 180
Allow-Events: telephone-event
Proxy-Authorization: Digest username="32046",realm="sip.didlogic.net",uri="sip:1XXXXXXXXXX@sip.didlogic.net:5060",response="cb4e17ed3708ffe3958ea4d3f2e0cba1",nonce="U0sFulNLBI487NoK3aQj+bLy5mdhpj2ZsnxLxYA=",cnonce="D5251403",qop=auth,algorithm=md5,nc=00000001
Max-Forwards: 69
Cisco-Gcid: 37FEE753-C28B-11E3-8832-E452E7A949D0
P-Preferred-Identity: "Zach Bullough" <sip:XXXXXXXXXX@domain.com>
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 274
v=0
o=CiscoSystemsSIP-GW-UserAgent 8376 7466 IN IP4 domain.com
s=SIP Call
c=IN IP4 domain.com
t=0 0
m=audio 18902 RTP/AVP 0 101 19
c=IN IP4 domain.com
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20
04-14-2014 12:21 AM
Are you sure its matching the correct outgoing dial-peer ?
Because the session target configured under dial-peer 30 is chicago2.voip.ms and the call is going to sip.didlogic.net.
Thanks
Manish
04-12-2014 03:22 AM
We need a full picture. Please post the full debugs.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide