Hi,
I'm trying to understand intricacies of SIP protocol.
I'm installed a stock kamailio from git repo.
kamcmd> core.version kamailio 4.0.2 (x86_64/linux) f87866
Now i'm trying to send OPTION request by "sipsak".
I've added two users :
arif@khost:~$ kamctl db show user ........... +----+----------+---------------+------------+---------------+----------------------------------+----------------------------------+------+ | id | username | domain | password | email_address | ha1 | ha1b | rpid | +----+----------+---------------+------------+---------------+----------------------------------+----------------------------------+------+ | 1 | test | 192.168.7.143 | testpasswd | | ad87b307789553f95799738d87246ca0 | e211f539e22a1ad2cc0f3c07056c3517 | NULL | | 2 | test2 | localhost | testpasswd | | 46d8618f5b652e4aeff3ffe52f373028 | bb8564b436dcfa183a8228244d8527ea | NULL | +----+----------+---------------+------------+---------------+----------------------------------+----------------------------------+------+
Now The OPTION message i'm trying :
OPTIONS sip:test_local@localhost SIP/2.0 Via: SIP/2.0/UDP 127.0.1.1:60518;branch=z9hG4bK.374c1583;rport;alias From: sip:sipsak@127.0.1.1:60518;tag=74766f41 To: sip:test_local@localhost Call-ID: 1953918785@127.0.1.1 CSeq: 1 OPTIONS Contact: sip:sipsak@127.0.1.1:60518 Content-Length: 0 Max-Forwards: 70 User-Agent: sipsak 0.9.6 Accept: text/plain
kamailio is respoding with : SIP/2.0 404 Not Found
After digging in kamailio log :
2(17356) DEBUG: registrar [lookup.c:158]: lookup(): 'test_local' Not found in usrloc --
The code reads :
155 ul.lock_udomain(_d, &aor); 156 res = ul.get_urecord(_d, &aor, &r); 157 if (res > 0) { 158 LM_DBG("'%.*s' Not found in usrloc\n", aor.len, ZSW( aor.s));
So it seems i'm doing something very wrong.
Although in my config :
106 #!define WITH_MYSQL 107 #!define WITH_AUTH 108 #!define WITH_USERLOCDB
After going through the RFC3261's section 11.2, It seems this OPTION message should work and generate a 200(OK).
What it is i'm doing wrong?
-- -Cheers -Arif