1

As a minimum requirement, I need Kamailio to accept any login with an empty password.

Ideally, I need to perform some simple validation of the login in a script (Lua/Python), and save the given login into a database.

I tried comprehending the documentation and kamailio.cfg, but looks like the docs go into details of specific functions and don't approach the whole picture. Probably the configuration needs understanding of SIP internals.

Victor Sergienko
  • 487
  • 6
  • 15

1 Answers1

1

Just remove authorization sequence and it will allow any user or password.

If you need validation via database, use avp/db_auth.

 if (is_method("REGISTER"))
        {
                sl_send_reply("100", "Trying");
                # authenticate the REGISTER requests (uncomment to enable auth)

                  if (!www_authorize("$td","cc_sip_buddies")) {
                          www_challenge("$td","0");
                          return 0;
                };
                consume_credentials();
                # handle registrations
                if ($au!=$tU)
                {
                        sl_send_reply("403","Forbidden auth ID");
                        return 0;
                }
                 route(REGISTRAR);
        } 

If you expect do something with lua, consult lua docs.

Anyway you can't do anything without understanding how sip works.

arheops
  • 708
  • 1
  • 5
  • 13
  • Thanks a lot, undefining `WITH_AUTH` in `kamailio.cfg` worked. Somehow I recall this didn't help me before, but probably I just didn't test it properly. – Victor Sergienko Jan 04 '14 at 20:01