Failed to authenticate on INVITE


#1

I am attempting to standup Callcentric VOIP service. Inbound calls are working, however, outbound calls result in this message:

[quote]
[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’[/quote]

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:

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

sip.conf:

[quote][general]
;Sept 6 2011
; [RMC] 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
; 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] 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 [/quote]


#2

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.

#3

@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

[quote][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[/quote]


#4

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.


#5

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.