Hi folks,
Getting ready to stage my 1.4.2 upgrade to 3.1.1 - but apparently I am missing something pretty basic here as I can't get a test subscriber registered. Turned up debug and viewed the "401 Unauthorized" repeating messages.
So I combed back through the INSTALL and the various references on kamailio.org. And for full disclosure, here are the relevant steps that I have took:
Did a make clean on the source and re-did the make, which looks like:
make FLAVOUR=kamailio group_include="standard mysql" include_modules="carrierroute acc mi_fifo kex tmx pv siputils mi_rpc" cfg all install
Added my domain into kamctlrc.
Created a fresh DB, started up kamailio and added a user:
[root@qa-voip-01 kamailio-3.1.1]# kamctl add testnumber testpass new user 'testnumber' added
Made the appropriate changes to the default kamailio.cfg by adding in the defines. Restarted kamailio - no errors and all looked good.
At this point, all indications would think that I can get the subscriber registered and get the location table updated ... But no such luck:
[root@qa-voip-01 kamailio]# kamctl ul show Domain:: location table=512 records=0 max_slot=0
Any thoughts on where to look? I have confirmed that the subscriber device is using the right credentials. Using plaintext and the password is in user's row in the subscriber table.
I am sure it's something pretty basic; this is my first stab at 3.1 from my 1.4 production machines.
Thanks, -graham
Hello,
On 12/14/10 6:31 AM, Graham Wooden wrote:
Hi folks,
Getting ready to stage my 1.4.2 upgrade to 3.1.1 - but apparently I am missing something pretty basic here as I can't get a test subscriber registered. Turned up debug and viewed the "401 Unauthorized" repeating messages.
So I combed back through the INSTALL and the various references on kamailio.org. And for full disclosure, here are the relevant steps that I have took:
Did a make clean on the source and re-did the make, which looks like:
make FLAVOUR=kamailio group_include="standard mysql" include_modules="carrierroute acc mi_fifo kex tmx pv siputils mi_rpc" cfg all install
Added my domain into kamctlrc.
Created a fresh DB, started up kamailio and added a user:
[root@qa-voip-01 kamailio-3.1.1]# kamctl add testnumber testpass new user 'testnumber' added
Made the appropriate changes to the default kamailio.cfg by adding in the defines. Restarted kamailio - no errors and all looked good.
At this point, all indications would think that I can get the subscriber registered and get the location table updated ... But no such luck:
[root@qa-voip-01 kamailio]# kamctl ul show Domain:: location table=512 records=0 max_slot=0
Any thoughts on where to look? I have confirmed that the subscriber device is using the right credentials. Using plaintext and the password is in user's row in the subscriber table.
I am sure it's something pretty basic; this is my first stab at 3.1 from my 1.4 production machines.
starting with 3.0, we introduced config define directives that allow to enable/disable easier features such as authentication. Practically, with default config you have to add #!define WITH_MYSQL and #!define WITH_AUTH
For a step-by-step installation from GIT stable branch, see: http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git
Cheers, Daniel
Thanks for the reply Daniel.
That was one of the docs that I was referred to, and those defines were added. I have this towards the top of the cfg file (above the if/elses):
#!define WITH_MYSQL #!define WITH_AUTH #!define WITH_USRLOCDB #!define WITH_DEBUG #!define WITH_ACCDB
I turned up mysql query logging, and I don't see kamailio attempting to query MySQL. All I get so far is this:
101214 6:53:25 1 Connect UNKNOWN_MYSQL_US@localhost as anonymous on 1 Quit
I can the phone trying every 10-15 seconds to register...
So, I am definitely missing a piece, somewhere, to tie in MySQL during runtime. Which is weird, since I was able to use the kamdbctl to create the DB and kamctl to add the user. Nothing else was really altered/removed from the cfg, it's pretty much default right now.
Thanks for any guidance.
-graham
On 12/14/10 4:02 AM, "Daniel-Constantin Mierla" miconda@gmail.com wrote:
Hello,
On 12/14/10 6:31 AM, Graham Wooden wrote:
Hi folks,
Getting ready to stage my 1.4.2 upgrade to 3.1.1 - but apparently I am missing something pretty basic here as I can't get a test subscriber registered. Turned up debug and viewed the "401 Unauthorized" repeating messages.
So I combed back through the INSTALL and the various references on kamailio.org. And for full disclosure, here are the relevant steps that I have took:
Did a make clean on the source and re-did the make, which looks like:
make FLAVOUR=kamailio group_include="standard mysql" include_modules="carrierroute acc mi_fifo kex tmx pv siputils mi_rpc" cfg all install
Added my domain into kamctlrc.
Created a fresh DB, started up kamailio and added a user:
[root@qa-voip-01 kamailio-3.1.1]# kamctl add testnumber testpass new user 'testnumber' added
Made the appropriate changes to the default kamailio.cfg by adding in the defines. Restarted kamailio - no errors and all looked good.
At this point, all indications would think that I can get the subscriber registered and get the location table updated ... But no such luck:
[root@qa-voip-01 kamailio]# kamctl ul show Domain:: location table=512 records=0 max_slot=0
Any thoughts on where to look? I have confirmed that the subscriber device is using the right credentials. Using plaintext and the password is in user's row in the subscriber table.
I am sure it's something pretty basic; this is my first stab at 3.1 from my 1.4 production machines.
starting with 3.0, we introduced config define directives that allow to enable/disable easier features such as authentication. Practically, with default config you have to add #!define WITH_MYSQL and #!define WITH_AUTH
For a step-by-step installation from GIT stable branch, see: http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git
Cheers, Daniel
Some more insight here. This time I did a distclean on the src, and followed the step-by-step from the GIT stable branch page (opposed to reference any other sources).
I restarted kamailio now I am seeing more MySQL connectivity - but no queries to check the subscriber table upon authenticating. That select against the location table I believe was a result from me doing a "kamctl ul show".
This is what MySQL is seeing. Any thoughts?
101214 13:44:10 37 Connect openser@localhost on openser 37 Query select table_version from version where table_name='location' 37 Query select username from location where username='dummy_user' 37 Quit 38 Connect openser@localhost on openser 38 Query select table_version from version where table_name='subscriber' 38 Quit 39 Connect openser@localhost on openser 39 Query select table_version from version where table_name='subscriber' 39 Quit 40 Connect openser@localhost on openser 40 Query select username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified from location 41 Connect openser@localhost on openser 42 Connect openser@localhost on openser 43 Connect openser@localhost on openser 44 Connect openser@localhost on openser 45 Connect openser@localhost on openser 46 Connect openser@localhost on openser 47 Connect openser@localhost on openser 48 Connect openser@localhost on openser 49 Connect openser@localhost on openser 50 Connect openser@localhost on openser 51 Connect openser@localhost on openser
Quoting Graham Wooden graham@g-rock.net:
Thanks for the reply Daniel.
That was one of the docs that I was referred to, and those defines were added. I have this towards the top of the cfg file (above the if/elses):
#!define WITH_MYSQL #!define WITH_AUTH #!define WITH_USRLOCDB #!define WITH_DEBUG #!define WITH_ACCDB
I turned up mysql query logging, and I don't see kamailio attempting to query MySQL. All I get so far is this:
101214 6:53:25 1 Connect UNKNOWN_MYSQL_US@localhost as anonymous on 1 Quit
I can the phone trying every 10-15 seconds to register...
So, I am definitely missing a piece, somewhere, to tie in MySQL during runtime. Which is weird, since I was able to use the kamdbctl to create the DB and kamctl to add the user. Nothing else was really altered/removed from the cfg, it's pretty much default right now.
Thanks for any guidance.
-graham
On 12/14/10 4:02 AM, "Daniel-Constantin Mierla" miconda@gmail.com wrote:
Hello,
On 12/14/10 6:31 AM, Graham Wooden wrote:
Hi folks,
Getting ready to stage my 1.4.2 upgrade to 3.1.1 - but apparently I am missing something pretty basic here as I can't get a test subscriber registered. Turned up debug and viewed the "401 Unauthorized" repeating messages.
So I combed back through the INSTALL and the various references on kamailio.org. And for full disclosure, here are the relevant steps that I have took:
Did a make clean on the source and re-did the make, which looks like:
make FLAVOUR=kamailio group_include="standard mysql" include_modules="carrierroute acc mi_fifo kex tmx pv siputils mi_rpc" cfg all install
Added my domain into kamctlrc.
Created a fresh DB, started up kamailio and added a user:
[root@qa-voip-01 kamailio-3.1.1]# kamctl add testnumber testpass new user 'testnumber' added
Made the appropriate changes to the default kamailio.cfg by adding in the defines. Restarted kamailio - no errors and all looked good.
At this point, all indications would think that I can get the subscriber registered and get the location table updated ... But no such luck:
[root@qa-voip-01 kamailio]# kamctl ul show Domain:: location table=512 records=0 max_slot=0
Any thoughts on where to look? I have confirmed that the subscriber device is using the right credentials. Using plaintext and the password is in user's row in the subscriber table.
I am sure it's something pretty basic; this is my first stab at 3.1 from my 1.4 production machines.
starting with 3.0, we introduced config define directives that allow to enable/disable easier features such as authentication. Practically, with default config you have to add #!define WITH_MYSQL and #!define WITH_AUTH
For a step-by-step installation from GIT stable branch, see: http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git
Cheers, Daniel
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
run kamailio from console with -E -ddd command line parameters and read the printed log messages. You should be able to figure out whether is reaching authentication part of configuration file. Also, adding xlog(...) calls in config file might be useful for you to troubleshoot.
From the logs you sent, looks like auth db is enabled. Maybe the from/r-uri don't match myself condition, are you using hostnames or IP addresses?
Cheers, Daniel
On 12/14/10 9:06 PM, Graham Wooden wrote:
Some more insight here. This time I did a distclean on the src, and followed the step-by-step from the GIT stable branch page (opposed to reference any other sources).
I restarted kamailio now I am seeing more MySQL connectivity - but no queries to check the subscriber table upon authenticating. That select against the location table I believe was a result from me doing a "kamctl ul show".
This is what MySQL is seeing. Any thoughts?
101214 13:44:10 37 Connect openser@localhost on openser 37 Query select table_version from version where table_name='location' 37 Query select username from location where username='dummy_user' 37 Quit 38 Connect openser@localhost on openser 38 Query select table_version from version where table_name='subscriber' 38 Quit 39 Connect openser@localhost on openser 39 Query select table_version from version where table_name='subscriber' 39 Quit 40 Connect openser@localhost on openser 40 Query select username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified from location 41 Connect openser@localhost on openser 42 Connect openser@localhost on openser 43 Connect openser@localhost on openser 44 Connect openser@localhost on openser 45 Connect openser@localhost on openser 46 Connect openser@localhost on openser 47 Connect openser@localhost on openser 48 Connect openser@localhost on openser 49 Connect openser@localhost on openser 50 Connect openser@localhost on openser 51 Connect openser@localhost on openser
Quoting Graham Wooden graham@g-rock.net:
Thanks for the reply Daniel.
That was one of the docs that I was referred to, and those defines were added. I have this towards the top of the cfg file (above the if/elses):
#!define WITH_MYSQL #!define WITH_AUTH #!define WITH_USRLOCDB #!define WITH_DEBUG #!define WITH_ACCDB
I turned up mysql query logging, and I don't see kamailio attempting to query MySQL. All I get so far is this:
101214 6:53:25 1 Connect UNKNOWN_MYSQL_US@localhost as anonymous on 1 Quit
I can the phone trying every 10-15 seconds to register...
So, I am definitely missing a piece, somewhere, to tie in MySQL during runtime. Which is weird, since I was able to use the kamdbctl to create the DB and kamctl to add the user. Nothing else was really altered/removed from the cfg, it's pretty much default right now.
Thanks for any guidance.
-graham
On 12/14/10 4:02 AM, "Daniel-Constantin Mierla" miconda@gmail.com wrote:
Hello,
On 12/14/10 6:31 AM, Graham Wooden wrote:
Hi folks,
Getting ready to stage my 1.4.2 upgrade to 3.1.1 - but apparently I am missing something pretty basic here as I can't get a test subscriber registered. Turned up debug and viewed the "401 Unauthorized" repeating messages.
So I combed back through the INSTALL and the various references on kamailio.org. And for full disclosure, here are the relevant steps that I have took:
Did a make clean on the source and re-did the make, which looks like:
make FLAVOUR=kamailio group_include="standard mysql" include_modules="carrierroute acc mi_fifo kex tmx pv siputils mi_rpc" cfg all install
Added my domain into kamctlrc.
Created a fresh DB, started up kamailio and added a user:
[root@qa-voip-01 kamailio-3.1.1]# kamctl add testnumber testpass new user 'testnumber' added
Made the appropriate changes to the default kamailio.cfg by adding in the defines. Restarted kamailio - no errors and all looked good.
At this point, all indications would think that I can get the subscriber registered and get the location table updated ... But no such luck:
[root@qa-voip-01 kamailio]# kamctl ul show Domain:: location table=512 records=0 max_slot=0
Any thoughts on where to look? I have confirmed that the subscriber device is using the right credentials. Using plaintext and the password is in user's row in the subscriber table.
I am sure it's something pretty basic; this is my first stab at 3.1 from my 1.4 production machines.
starting with 3.0, we introduced config define directives that allow to enable/disable easier features such as authentication. Practically, with default config you have to add #!define WITH_MYSQL and #!define WITH_AUTH
For a step-by-step installation from GIT stable branch, see: http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git
Cheers, Daniel
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@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@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
run kamailio from console with -E -ddd command line parameters and read the printed log messages. You should be able to figure out whether is reaching authentication part of configuration file. Also, adding xlog(...) calls in config file might be useful for you to troubleshoot.
From the logs you sent, looks like auth db is enabled. Maybe the from/r-uri don't match myself condition, are you using hostnames or IP addresses?
Cheers, Daniel
Thanks for sharing the debugging parameters; I believe it helpped shed some light. But my xlog placements so far hasn't produced much of anything.
I am doing everything by IPs at the moment. From the below, kamailio thinks that my IP, 1.1.1.1, is not part of the realm. I even went through and changed the entry in the domain table and the domain for the subscriber to reflect this IP. Still the same results.
What is the best/proper way for kamailio to think that it's IP is part of the realm? Or am I chasing the wrong rabbit here? I going to add some more xlogs tonight to see what is going wrong here. It's such plain install, surely something has gotten out of whack here ...
5(10312) DEBUG: tm [t_lookup.c:1150]: DEBUG: t_check_msg: msg id=5 global id=5 T end=(nil) 5(10312) DEBUG: <core> [socket_info.c:501]: grep_sock_info - checking if host==us: 13==9 && [1.1.1.1] == [127.0.0.1] 5(10312) DEBUG: <core> [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060 5(10312) DEBUG: <core> [socket_info.c:501]: grep_sock_info - checking if host==us: 13==13 && [1.1.1.1] == [1.1.1.1] 5(10312) DEBUG: <core> [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060 5(10312) DEBUG: auth_db [authorize.c:239]: realm value [1.1.1.1] 5(10312) DEBUG: auth [api.c:85]: auth:pre_auth: Credentials with realm '1.1.1.1' not found 5(10312) DEBUG: auth_db [authorize.c:257]: not authenticated 5(10312) DEBUG: auth [challenge.c:102]: build_challenge_hf: realm='1.1.1.1' 5(10312) DEBUG: auth [challenge.c:236]: auth: 'Proxy-Authenticate: Digest realm="1.1.1.1", nonce="TQfqfk0H6VJOTqVJEddjXqo4/PysNAPn" '
This has been resolved. Apparently my broad-band NAT router was screwing up and wasn't getting the www digest back to the Q/A phone.
Thanks,
-graham
On 12/14/10 4:18 PM, "Graham Wooden" graham@g-rock.net wrote:
Hello,
run kamailio from console with -E -ddd command line parameters and read the printed log messages. You should be able to figure out whether is reaching authentication part of configuration file. Also, adding xlog(...) calls in config file might be useful for you to troubleshoot.
From the logs you sent, looks like auth db is enabled. Maybe the from/r-uri don't match myself condition, are you using hostnames or IP addresses?
Cheers, Daniel
Thanks for sharing the debugging parameters; I believe it helpped shed some light. But my xlog placements so far hasn't produced much of anything.
I am doing everything by IPs at the moment. From the below, kamailio thinks that my IP, 1.1.1.1, is not part of the realm. I even went through and changed the entry in the domain table and the domain for the subscriber to reflect this IP. Still the same results.
What is the best/proper way for kamailio to think that it's IP is part of the realm? Or am I chasing the wrong rabbit here? I going to add some more xlogs tonight to see what is going wrong here. It's such plain install, surely something has gotten out of whack here ...
5(10312) DEBUG: tm [t_lookup.c:1150]: DEBUG: t_check_msg: msg id=5 global id=5 T end=(nil) 5(10312) DEBUG: <core> [socket_info.c:501]: grep_sock_info - checking if host==us: 13==9 && [1.1.1.1] == [127.0.0.1] 5(10312) DEBUG: <core> [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060 5(10312) DEBUG: <core> [socket_info.c:501]: grep_sock_info - checking if host==us: 13==13 && [1.1.1.1] == [1.1.1.1] 5(10312) DEBUG: <core> [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060 5(10312) DEBUG: auth_db [authorize.c:239]: realm value [1.1.1.1] 5(10312) DEBUG: auth [api.c:85]: auth:pre_auth: Credentials with realm '1.1.1.1' not found 5(10312) DEBUG: auth_db [authorize.c:257]: not authenticated 5(10312) DEBUG: auth [challenge.c:102]: build_challenge_hf: realm='1.1.1.1' 5(10312) DEBUG: auth [challenge.c:236]: auth: 'Proxy-Authenticate: Digest realm="1.1.1.1", nonce="TQfqfk0H6VJOTqVJEddjXqo4/PysNAPn" '
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 12/14/2010 10:29 PM, Graham Wooden wrote:
This has been resolved. Apparently my broad-band NAT router was screwing up and wasn't getting the www digest back to the Q/A phone.
We had that problem ourselves earlier today. :-)
On 12/15/10 4:29 AM, Graham Wooden wrote:
This has been resolved. Apparently my broad-band NAT router was screwing up and wasn't getting the www digest back to the Q/A phone.
ALG are always a pain. This tool written by Inaki may help in such cases: http://dev.sipdoc.net/projects/sip-stuff/wiki/SIP-ALG-Detector
Cheers, Daniel
Thanks,
-graham
On 12/14/10 4:18 PM, "Graham Wooden"graham@g-rock.net wrote:
Hello,
run kamailio from console with -E -ddd command line parameters and read the printed log messages. You should be able to figure out whether is reaching authentication part of configuration file. Also, adding xlog(...) calls in config file might be useful for you to troubleshoot.
From the logs you sent, looks like auth db is enabled. Maybe the from/r-uri don't match myself condition, are you using hostnames or IP addresses?
Cheers, Daniel
Thanks for sharing the debugging parameters; I believe it helpped shed some light. But my xlog placements so far hasn't produced much of anything.
I am doing everything by IPs at the moment. From the below, kamailio thinks that my IP, 1.1.1.1, is not part of the realm. I even went through and changed the entry in the domain table and the domain for the subscriber to reflect this IP. Still the same results.
What is the best/proper way for kamailio to think that it's IP is part of the realm? Or am I chasing the wrong rabbit here? I going to add some more xlogs tonight to see what is going wrong here. It's such plain install, surely something has gotten out of whack here ...
5(10312) DEBUG: tm [t_lookup.c:1150]: DEBUG: t_check_msg: msg id=5 global id=5 T end=(nil) 5(10312) DEBUG:<core> [socket_info.c:501]: grep_sock_info - checking if host==us: 13==9&& [1.1.1.1] == [127.0.0.1] 5(10312) DEBUG:<core> [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060 5(10312) DEBUG:<core> [socket_info.c:501]: grep_sock_info - checking if host==us: 13==13&& [1.1.1.1] == [1.1.1.1] 5(10312) DEBUG:<core> [socket_info.c:504]: grep_sock_info - checking if port 5060 matches port 5060 5(10312) DEBUG: auth_db [authorize.c:239]: realm value [1.1.1.1] 5(10312) DEBUG: auth [api.c:85]: auth:pre_auth: Credentials with realm '1.1.1.1' not found 5(10312) DEBUG: auth_db [authorize.c:257]: not authenticated 5(10312) DEBUG: auth [challenge.c:102]: build_challenge_hf: realm='1.1.1.1' 5(10312) DEBUG: auth [challenge.c:236]: auth: 'Proxy-Authenticate: Digest realm="1.1.1.1", nonce="TQfqfk0H6VJOTqVJEddjXqo4/PysNAPn" '
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@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@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users