Failed to authenticate on INVITE

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Failed to authenticate on INVITE

Postby gatorback » Sun Oct 30, 2011 10:42 pm

I am attempting to standup Callcentric VOIP service. Inbound calls are working, however, outbound calls result in this message:
[Oct 31 00:05:30] NOTICE[11764]: chan_sip.c:19294 handle_response_invite: Failed to authenticate on INVITE to '"SPA2102 L2" <sip:101@192.168.8.1>;tag=as226d3630'


I am hoping that a fresh set of expert eyes will pickout an obvious error \ missing element. If I can provide additional information or answer any question, I will be happy to do so. Thank you.

dialplan excerpt:
Code: Select all
[to-callcentric]
exten => _711,1,Dial(SIP/1777XXXYYY@callcentric,60)      ; hard coded to call living room.



sip.conf:
[general]
;Sept 6 2011
; [RMC] http://www.callcentric.com/support/device/asterisk/1_6
dtmfmode = rfc2833
context=from-callcentric
srvlookup=yes
register => 1777XXXYYYY:MyPassword@callcentric.com/1777XXXYYYY
session-timers=refuse
session-expires=180
session-minse=90
session-refresher=uas
; http://www.callcentric.com/support/device/asterisk/1_6

[callcentric]
type=peer
context=from-callcentric ;how incoming calls are handle: defined in: extensions.conf
host=callcentric.com
defaultuser=1777XXXYYYY
secret=MyPassword
fromuser=1777XXXYYYY
fromdomain=callcentric.com
;insecure=very ; deprecated
insecure=invite ;9/6/11
;insecure=port,invite 9/6/11

; [RMC] http://supermario-world.blogspot.com/20 ... voice.html
[101]
type=friend
host=dynamic
nat=yes
qualify=yes
context=mario-default
defaultuser=101
secret=MyPassword
callerid="SPA2102 L2" <101>
mailbox=101
Free Asterisk Book| Asterisk 1.8.18 on Optware ASUS RT-N16 | Linksys SPA2102 | G729a codec bandwidth
gatorback
Oldsterisk
 
Posts: 79
Joined: Fri May 20, 2011 1:48 pm

Re: Failed to authenticate on INVITE

Postby valer77 » Tue Nov 01, 2011 8:20 am

Maybe this is a "secret" mismatch. Which IP Phone are you using ? Please verify the setting there. Also, just for testing please try the following:
1. In sip.conf, 101 section put "insecure=invite"
2. If this does not give you a clue, enable SipDebug in sip.conf and send the SIP messages.
valer77
Oldsterisk
 
Posts: 83
Joined: Wed Sep 10, 2008 5:23 am

Re: Failed to authenticate on INVITE

Postby gatorback » Tue Nov 01, 2011 2:08 pm

@valer77: thanks for the suggestions.

I have ruled out a 'secret' mismatch because I am successfully using the SIP peer '101' with GTalk \ GV. My ATA verifies that it is connected with Asterisk. This is a good troubleshooting step: isolating the problem. I appreciate that actionable suggestions:

I added the snippet: insecure=invite (not really sure what that does)
and tried calling another callcentric #. Received the busy tone.

Sip debug was turned on and the results are here: http://pastebin.com/vbQ0MSLW

More of extensions.conf

[to-callcentric]
; Free Calling Services:
; ======================
exten => _711,1,Dial(SIP/177722XXXX@callcentric,60) ;Test point Verified 7-Sept 2011
exten => _79685,1,Dial(SIP/1777261XXX@callcentric,60) ; call Hardware Store
exten => _1777ZXXXXXX,1,Dial(SIP/${EXTEN}@callcentric) ;Verified 7-Sept 2011
exten => _71777ZXXXXXX,1,Dial(SIP/${EXTEN:1}@callcentric) ;Verified 7-Sept 2011
;
; Callcentric Paid Calling services
; ===================================
; Append area code *** if necessary
exten => _7NXXXXXX,1,Set(CALLERID(dnid)=1***${CALLERID(dnid)})
; {EXTEN:1} is NXXXXXX (everything after the first dialed number, in this case 7)
exten => _7NXXXXXX,n,Goto(81***${EXTEN:1},1)
;append a 1 if necessary
exten => _7NXXNXXXXXX,1,Set(CALLERID(dnid)=1${CALLERID(dnid)})
; {EXTEN:1} is NXXNXXXXXX(everything after the first dialed number, in this case 8) ;NOT VERIFIED
exten => _7NXXNXXXXXX,n,Goto(71${EXTEN:1},1)
;do our real dialing
exten => _71NXXNXXXXXX,1,Dial(SIP/${EXTEN:1}@callcentric) ;NOT VERIFIED
Free Asterisk Book| Asterisk 1.8.18 on Optware ASUS RT-N16 | Linksys SPA2102 | G729a codec bandwidth
gatorback
Oldsterisk
 
Posts: 79
Joined: Fri May 20, 2011 1:48 pm

Re: Failed to authenticate on INVITE

Postby david55 » Tue Nov 01, 2011 4:41 pm

insecure=invite only affects incoming calls. It causes Asterisk not to challenge the caller for authentication on invites, but still to do so for registrations.
Last edited by david55 on Wed Nov 02, 2011 6:11 am, edited 1 time in total.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: Failed to authenticate on INVITE

Postby stereye » Wed Nov 02, 2011 5:36 am

I guess the scenario is like SIP phone----->Local Asterisk-------->CallCentric.

But the Outbound and Inbound direction is not clear.

You mentioned Inbound calls are working, that should be the CC--->*--->SIP phone direction, right?

If this is the case, then outbound should be a call from SIP phone to a number like 711xxxx so that it can match dial plan:
[to-callcentric]
exten => _711,1,Dial(SIP/1777XXXYYY@callcentric,60) ; hard coded to call living room.

But the invite in the sip trace shows something different:
INVITE sip:17772022880@192.168.8.1 SIP/2.0

Also the context for sip phone should be to_callcentric, right? But the definition says mario-default.

[101]
type=friend
host=dynamic
nat=yes
qualify=yes
context=mario-default
defaultuser=101
secret=MyPassword
callerid="SPA2102 L2" <101>
mailbox=101

It really is a simple sip to sip case, please clarify the scenario, it can be resolved.
stereye
Newsterisk
 
Posts: 7
Joined: Tue Nov 01, 2011 9:08 am


Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 22 guests