[SR-Users] Kamailio + Asterisk 1.6.2 Realtime - REGFWD : 401 not authorized - [SOLVED]

Skyler skchopperguy at gmail.com
Sun May 22 20:37:59 CEST 2011


Skyler wrote:
>  After 3 hours stuck on this I have to ask the group. I am setting up
> Kam 3.1.3 +Ast 1.6.2.18 + realtime following Daniel's guide on the
> Asipto site. The problem I see is 401 not authorized when uac tries to
> register.

Hey, kamailio is addictive - there are quite some of us doing it on
Sundays ;-)

I've just checked the manual, it says kamailio, not asterisk should do
authentication of REGISTERs. Could you check you have created sipusers
table and configured asterisk as per manual:

sipusers is the standard table required by Asterisk to store SIP user
profile, with one extra column sippasswd where will be stored the
password for SIP authentication. By default, Asterisk uses the column
secret for SIP user password, but if that is filled in, Asterisk will
ask for authentication again, resulting in double-authentication which
we want to avoid.
?

--
Sincerely,
Andrew Pogrebennyk

---------------------------------------------------------------------

OMG.right under my nose the whole time. I love this stuff! ;)

I must have read and re-read the asipto guide a thousand times and googled
until my fingers seized up, but I completely missed that . lol

So, in case anyone else comes across this same problem and you've followed
the guide 100% you are undoubtedly looking for the "trick" to "configure
Asterisk to not authenticate SIP requests coming from Kamailio". Well,
there's no trick. Just slow down and read again. If that doesn't work . do
this:

For each Asterisk extension - set host=dynamic, secret=<blank> and
permit=<kamailioip> then put the device password into sippasswd field in db.
Kamailio will authenticate the device with sippasswd in db and route[REGFWD]
will pass the registration to Asterisk. Since there is no password for
secret, Asterisk will register the extension to kamailio.ip:port
automatically. Because permit =< kamailioip > Asterisk will ONLY accept
registration from Kamailio for the extension. You may want to set permit =<
kamailioip > in sip.conf general section to set ACL for all extensions to
make life easier.

My particular problem was that I did not delete the secret. This apparently
causes Asterisk to request authentication from Kamailio on registration FWD.

Thanks Andrew, sometimes it just takes another person to 'say it out loud'
lol

Skyler 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110522/d573af1e/attachment.htm>


More information about the sr-users mailing list