02-23-2014 09:34 AM - edited 03-16-2019 09:52 PM
Im trying to establish a SIP trunk between a lab CUBE and a SIP provider.
Incoming calls works from ITSP PSTN to the CUBE.
From the CUBE to ITSP call doesnt work
I spoke to the ITSP and i know the reason but dont know how to implement it on the CUBE
Im sending my INVITE to the ITSP and my authentication credentials
ITSP respond with a 401 message asking for authentication.
CUBE should then resend my authentication credentials but it doesnt
Instead CUBE sends a 503 Message.
This ITSP explain to me that this is how they do the authentication:
Initial INVITE
They respond with 401 challenge
I should resend authentication
Attached is my running config and full debug
Below is partial debug ccsip events messages error for a quick look.
Any help would be great, thanks
***********************************************************
o: <sip:95142221234@X.X.X.36>
Date: Fri, 21 Feb 2014 15:14:13 GMT
Call-ID: d0fe5600-30716d45-31-86b1fac@X.X.X.8
Supported: timer,resource-priority,replaces
Min-SE: 1800
User-Agent: Cisco-CUCM8.6
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,X-cisco-original-called
Cisco-Guid: 3506329088-0000065536-0000000017-0141238188
Session-Expires: 1800
P-Asserted-Identity: <sip:5142546011@X.X.X.8>
Contact: <sip:5142546011@X.X.X.8:1234;transport=tcp>
Max-Forwards: 69
Content-Type: application/sdp
Content-Length: 213
v=0
o=CiscoSystemsCCM-SIP 1977 1 IN IP4 X.X.X.8
s=SIP Call
c=IN IP4 X.28.158.11
t=0 0
m=audio 25192 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
*****************************************************************
Sent:
INVITE sip:5142221234@siptrunking.bell.ca:1234 SIP/2.0
Via: SIP/2.0/UDP X.X.X.36:1234;branch=z9hG4bK93489C
From: <sip:5142546011@cube.jondoe.com;user=phone>;tag=2EBB4A6A-2656
To: <sip:5142221234@X.X.X.52>
Date: Fri, 21 Feb 2014 15:09:12 GMT
Call-ID: F495F43D-9A4011E3-B620A51A-DECFBE48@cube.jondoe.com
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 3506329088-0000065536-0000000017-0141238188
User-Agent: Cisco-SIPGateway/IOS-15.2.4.M4
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1392995352
Contact: <sip:5142546011;tgrp=mtl_01_5142546011;trunk-context=siptrunking.bell.ca@X.X.X.36:1234>
Expires: 60
Allow-Events: telephone-event
Max-Forwards: 68
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 250
v=0
o=CiscoSystemsSIP-GW-UserAgent 6383 8345 IN IP4 X.X.X.36
s=SIP Call
c=IN IP4 X.X.X.36
t=0 0
m=audio 16580 RTP/AVP 0 101
c=IN IP4 X.X.X.36
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
*Feb 21 15:09:12.329: //46391/D0FE56000000/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 100 Trying
Via: SIP/2.0/TCP X.X.X.8:1234;branch=z9hG4bK5647ab195a
From: <sip:5142546011@X.X.X.8>;tag=1977~20a67589-494c-4e2a-8283-ce7e70ffe562-85534657
To: <sip:95142221234@X.X.X.36>
Date: Fri, 21 Feb 2014 15:09:12 GMT
Call-ID: d0fe5600-30716d45-31-86b1fac@X.X.X.8
CSeq: 101 INVITE
Allow-Events: telephone-event
Server: Cisco-SIPGateway/IOS-15.2.4.M4
Content-Length: 0
*Feb 21 15:09:12.333: //-1/xxxxxxxxxxxx/SIP/Error/get_content_length:
Could not get Content-length
*Feb 21 15:09:12.333: //46392/D0FE56000000/SIP/Msg/ccsipDisplayMsg:
*************************************************************
Received:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP X.X.X.36:1234;branch=z9hG4bK93489C
From: <sip:5142546011@cube.jondoe.com;user=phone>;tag=2EBB4A6A-2656
To: <sip:5142221234@X.X.X.52>
Call-ID: F495F43D-9A4011E3-B620A51A-DECFBE48@cube.jondoe.com
CSeq: 101 INVITE
Timestamp: 1392995352
*Feb 21 15:09:12.355: //46392/D0FE56000000/SIP/Msg/ccsipDisplayMsg:
*********************************************************
Received:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP X.X.X.36:1234;branch=z9hG4bK93489C
From: <sip:5142546011@cube.jondoe.com;user=phone>;tag=2EBB4A6A-2656
To: <sip:5142221234@X.X.X.52>;tag=SD2roa599-144107040-1392995653791
Call-ID: F495F43D-9A4011E3-B620A51A-DECFBE48@cube.jondoe.com
CSeq: 101 INVITE
Timestamp: 1392995352
WWW-Authenticate: DIGEST qop="auth",nonce="BroadWorksXhrxln9gfT1gm0nuBW",realm="siptrunking.bell.ca",algorithm=MD5
Content-Length: 0
*Feb 21 15:09:12.355: //46392/D0FE56000000/SIP/Error/sipSPIHandleAuthChallenge:
Error getting credentials
*Feb 21 15:09:12.355: //46392/D0FE56000000/SIP/Error/act_recdproc_new_message_response:
Error handling AuthenticationChallenge
*Feb 21 15:09:12.355: //-1/xxxxxxxxxxxx/SIP/Event/sipSPIEventInfo: Queued event from SIP SPI : SIPSPI_EV_CC_CALL_DISCONNECT
*Feb 21 15:09:12.355: //46392/D0FE56000000/SIP/Event/Session-Timer/sipSTSLMain: Event: E_STSL_SPI_EVENT
*Feb 21 15:09:12.355: //-1/xxxxxxxxxxxx/SIP/Event/sipSPIEventInfo: Queued event from SIP SPI : SIPSPI_EV_CC_CALL_DISCONNECT
*Feb 21 15:09:12.355: //46391/D0FE56000000/SIP/Event/Session-Timer/sipSTSLMain: Event: E_STSL_SESSION_REFRESH_RESP
*Feb 21 15:09:12.355: //46391/D0FE56000000/SIP/Event/Session-Timer/sipSTSLMain: dir:1, method:102, resp_code:503, container:24FC4090
*Feb 21 15:09:12.355: //46391/D0FE56000000/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/TCP X.X.X.8:1234;branch=z9hG4bK5647ab195a
From: <sip:5142546011@X.X.X.8>;tag=1977~20a67589-494c-4e2a-8283-ce7e70ffe562-85534657
To: <sip:95142221234@X.X.X.36>;tag=2EBB4A84-C56
Date: Fri, 21 Feb 2014 15:09:12 GMT
Call-ID: d0fe5600-30716d45-31-86b1fac@X.X.X.8
CSeq: 101 INVITE
Allow-Events: telephone-event
Server: Cisco-SIPGateway/IOS-15.2.4.M4
Reason: Q.850;cause=47
Content-Length: 0
*Feb 21 15:09:12.355: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
ACK sip:5142221234@X.X.X.52:1234 SIP/2.0
Via: SIP/2.0/UDP X.X.X.36:1234;branch=z9hG4bK93489C
From: <sip:5142546011@cube.jondoe.com>;tag=2EBB4A6A-2656
To: <sip:5142221234@X.X.X.52>;tag=SD2roa599-144107040-1392995653791
Date: Fri, 21 Feb 2014 15:09:12 GMT
Call-ID: F495F43D-9A4011E3-B620A51A-DECFBE48@cube.jondoe.com
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: telephone-event
Content-Length: 0
*Feb 21 15:09:12.357: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
ACK sip:95142221234@X.X.X.36:1234 SIP/2.0
Via: SIP/2.0/TCP X.X.X.8:1234;branch=z9hG4bK5647ab195a
From: <sip:5142546011@X.X.X.8>;tag=1977~20a67589-494c-4e2a-8283-ce7e70ffe562-85534657
To: <sip:95142221234@X.X.X.36>;tag=2EBB4A84-C56
Date: Fri, 21 Feb 2014 15:14:13 GMT
Call-ID: d0fe5600-30716d45-31-86b1fac@X.X.X.8
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: presence, kpml
Content-Length: 0
*Feb 21 15:09:24.211: //46393/000000000000/SIP/Error/sipSPIAddPrivacyHeader:
Orig Container is NULL...should have value except in case of sending OOD Options ping.
*Feb 21 15:09:24.211: //46393/000000000000/SIP/Error/sipSPIAddAssertedIDHeader:
Orig Container is NULL...should have value except in case of sending OOD Options ping.
*Feb 21 15:09:24.211: //46393/000000000000/SIP/Error/sipSPIAddPreferredIDHeader:
Orig Container is NULL...should have value except in case of sending OOD Options ping.
*Feb 21 15:09:24.211: //46393/000000000000/SIP/Msg/ccsipDisplayMsg:
Sent:
OPTIONS sip:X.X.X.8:1234 SIP/2.0
Via: SIP/2.0/UDP X.X.X.36:1234;branch=z9hG4bK93491142
From: <sip:cube.jondoe.com>;tag=2EBB78D4-4E6
To: <sip:X.X.X.8>
Date: Fri, 21 Feb 2014 15:09:24 GMT
Call-ID: FBAB0140-9A4011E3-B621A51A-DECFBE48@cube.jondoe.com
User-Agent: Cisco-SIPGateway/IOS-15.2.4.M4
Max-Forwards: 70
CSeq: 101 OPTIONS
Solved! Go to Solution.
02-23-2014 09:54 AM
Jean,
ITSP is correct, CUBE should send a re-INVITE with the authentication credentials, however you have not configured any..
You need to conigure this changing the number/credentials to what the ITSP has provided for you for authentication
conf t
sip-ua
credentials number 123456 username 123456 password XXXXX realm siptrunking.bell.ca
change 123456 to values provided by ITSP..
If you were giving a username/password..use the ff:
sip-ua
credentials username 123456 password 7 123456 realm siptrunking.bell.ca
authentication username 123456 password 7 123456 siptrunking.bell.ca
Please rate all useful posts
"The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
02-23-2014 09:54 AM
Jean,
ITSP is correct, CUBE should send a re-INVITE with the authentication credentials, however you have not configured any..
You need to conigure this changing the number/credentials to what the ITSP has provided for you for authentication
conf t
sip-ua
credentials number 123456 username 123456 password XXXXX realm siptrunking.bell.ca
change 123456 to values provided by ITSP..
If you were giving a username/password..use the ff:
sip-ua
credentials username 123456 password 7 123456 realm siptrunking.bell.ca
authentication username 123456 password 7 123456 siptrunking.bell.ca
Please rate all useful posts
"The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
02-23-2014 10:14 AM
You are right, i should have though of it, i will implement it Monday and let you know how that goes, thank you for the fast response
02-24-2014 11:30 AM
Worked like a charm, thank you.
07-04-2020 01:07 PM
So how do you do this with Sipxxxx.cf.xml
07-04-2020 03:22 PM
Your question is off topic of the OP. Please create your own question instead of posting your question on an old market as answered post.
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