[SR-Users] Authentication on Kamailio with MySQL

Nicolas Pace nico at libre.ws
Mon Apr 10 23:38:54 CEST 2017


On Mon, 2017-04-10 at 17:15 -0400, SamyGo wrote:
> Maybe a restart on kamailio service wasn't done. Or maybe you're
> editing a different config file while kamailio is using something
> else !
> Otherwise I dont see anything missing.

Well... did my first rookie mistake.
The issue was that I mistakenly added a space between the exclamation
mark and the define word.
Instead of

#! define WITH_MYSQL

It should be

#!define WITH_MYSQL

Now it works.

Thanks!

> --
> Sammy
> 
> 
> On Mon, Apr 10, 2017 at 4:08 PM, Nicolas Pace <nico at libre.ws> wrote:
> > Hi everyone,
> > 
> > I'm having some trouble setting up a simple Kamailio installation
> > with
> > user authentication.
> > I've installed a kamailio (4.3.4) base install on an ubuntu server
> > 16.04 (x86/64) on virtualbox, and added this lines at the beginning
> > of
> > the file:
> > 
> > ```
> > #!KAMAILIO
> > 
> > #! define WITH_MYSQL
> > #! define WITH_AUTH
> > #! define WITH_USRLOCDB
> > ```
> > 
> > Also configured the db name, host, user and pass for RO and RW and
> > run
> > `kamdbctl create`.
> > 
> > Everything I do was following this tutorial:
> > http://www.kamailio.org/wiki/tutorials/getting-started/main
> > 
> > 
> > Based on what the tutorial says, I should have a server that only
> > allows users that have been authenticated against the DB.
> > 
> > The thing is that now Kamailio allows me to access, no matter what
> > credentials I gave him (replies 200 OK to my REGISTER requests, and
> > whows the user on the `kamctl monitor` view).
> > 
> > I've added to this gist:
> > * My current kamailio config
> > * the kamailio grepped syslog
> > * the pjsua output from when I register with an unexistent user
> > https://gist.github.com/nicopace/9d44bf813fe309df69ff4cd0affe8324
> > 
> > I've already checked out some of the wiki documentation, namely:
> > * http://www.kamailio.org/wiki/tutorials/auth/auth_db
> > * http://www.kamailio.org/wiki/tutorials/getting-started/main
> > 
> > Am I missing something?
> > 
> > Thanks
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
> > list
> > sr-users at lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> > 
> 
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
> list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170410/e739e3d7/attachment.sig>


More information about the sr-users mailing list