Hi I am trying to run new kamailio 1.4 but have this errors:
*Aug 11 12:56:44 [20808] ERROR:uri_db:mod_init: Invalid table version of the subscriber table Aug 11 12:56:44 [20808] ERROR:core:init_mod: failed to initialize module uri_db Aug 11 12:56:44 [20808] ERROR:core:main: error while initializing modules*
I have created new database 'kamailio' using kamdbctl and 'version' table has this values:
table_name: subscriber table_version: 6
any idea?
rafael
PS: same problem with opensips 1.4...
On Mon, August 11, 2008 8:07 pm, Rafael Risco Gonzales-Vigil wrote:
I am trying to run new kamailio 1.4 but have this errors:
I have created new database 'kamailio' using kamdbctl and 'version' table has this values:
table_name: subscriber table_version: 6
Hi Rafael,
thanks for the report, there was an error in the uri_db version for this table in the code. I fixed it in trunk, 1.4 and 1.3 branches.
Henning
Thanks Henning, I think it was my error because problem disapeer when I comment these lines in my config:
# modparam("uri_db", "db_table", "uri") # modparam("uri_db", "use_uri_table", 0)
so now kamailio use 'subscriber' table by default, btw I'm not sure but the parameter 'db_table' should not be activated since parameter 'use_uri_table' was '0'...
Now I am testing kamailio 1.4 to use a VIEW from mya2billing DB as a subscriber database, It works in 1.3.2 version of openser using this modparam:
modparam("uri_db", "subscriber_table", "subscriber_v2") , where 'subscriber_v2' its the VIEW shown below:
CREATE VIEW openser.subscriber_v2 AS SELECT id AS id, useralias AS username, '192.168.12.212' AS domain, userpass AS password, firstname AS first_name, lastname AS last_name, email AS email_address, '2008-07-24 12:48:03' AS datetime_created, md5(concat(useralias,' : ','192.168.12.212',' : ',userpass)) AS ha1, md5(concat(useralias,'@','192.168.12.212',' : ','192.168.12.212',' : ',userpass)) AS ha1b, '' AS timezone, useralias AS rpid from mya2billing.cc_card WHERE tariff=2;
Also Its necesary to insert a new value in 'version' table: INSERT INTO version (table_name,table_version) VALUES ('subscriber_V2','6')
Then you can authenticate users using if(!www_authorize("", "subscriber_v2")) or if(!proxy_authorize("", "subscriber_v2")) in register and invite request routes....
In Kamailio version 1.4 the modparam "subscriber_table" was removed from uri_db module, Is it enough to specify the new table in www_authorize and proxy_authorize functions?
thanks rafael
On Mon, Aug 11, 2008 at 4:19 PM, Henning Westerholt < henning.westerholt@1und1.de> wrote:
On Mon, August 11, 2008 8:07 pm, Rafael Risco Gonzales-Vigil wrote:
I am trying to run new kamailio 1.4 but have this errors:
I have created new database 'kamailio' using kamdbctl and 'version' table has this values:
table_name: subscriber table_version: 6
Hi Rafael,
thanks for the report, there was an error in the uri_db version for this table in the code. I fixed it in trunk, 1.4 and 1.3 branches.
Henning
On Tue, August 12, 2008 5:13 pm, Rafael Risco Gonzales-Vigil wrote:
Thanks Henning, I think it was my error because problem disapeer when I comment these lines in my config:
# modparam("uri_db", "db_table", "uri") # modparam("uri_db", "use_uri_table", 0)
so now kamailio use 'subscriber' table by default, btw I'm not sure but the parameter 'db_table' should not be activated since parameter 'use_uri_table' was '0'...
Hi Rafael,
do you refer with "should not activated" to the config file, or the module code? The default value is subscriber, this fits to the use_uri_table default in my opinion.
Now I am testing kamailio 1.4 to use a VIEW from mya2billing DB as a subscriber database, It works in 1.3.2 version of openser using this modparam:
modparam("uri_db", "subscriber_table", "subscriber_v2") , where 'subscriber_v2' its the VIEW shown below:
CREATE VIEW openser.subscriber_v2 AS [..]
Then you can authenticate users using if(!www_authorize("", "subscriber_v2")) or if(!proxy_authorize("", "subscriber_v2")) in register and invite request routes....
The function www_authorize and proxy_authorize are not in the uri_db module, there are in auth_db, but otherwise it should be fine i think.
In Kamailio version 1.4 the modparam "subscriber_table" was removed from uri_db module, Is it enough to specify the new table in www_authorize and proxy_authorize functions?
The uri_db module is not related to the auth_db module, so its not necessary to setup this module if you do not need function from it.
Cheers,
Henning
Hi Henning Thanks for your answers, you are right and I was confusing the module names, my brain it will break at any time :-)...
I am using check_to(), check_from() and does_uri_exist() functions from uri_db module so I have to define those parameters to specify the other subscriber table (mysql view 'subscriber_v2'):
modparam("uri_db", "db_table", "subscriber_v2") modparam("uri_db", "use_uri_table", 0) ;;; specify '1' just if the "uri" table should be used.
now it works, I will put kamailio 1.4 in production after doing and pass some tests, thank you very much.
rafael
On Tue, Aug 12, 2008 at 4:03 PM, Henning Westerholt < henning.westerholt@1und1.de> wrote:
On Tue, August 12, 2008 5:13 pm, Rafael Risco Gonzales-Vigil wrote:
Thanks Henning, I think it was my error because problem disapeer when I comment these lines in my config:
# modparam("uri_db", "db_table", "uri") # modparam("uri_db", "use_uri_table", 0)
so now kamailio use 'subscriber' table by default, btw I'm not sure but the parameter 'db_table' should not be activated since parameter 'use_uri_table' was '0'...
Hi Rafael,
do you refer with "should not activated" to the config file, or the module code? The default value is subscriber, this fits to the use_uri_table default in my opinion.
Now I am testing kamailio 1.4 to use a VIEW from mya2billing DB as a subscriber database, It works in 1.3.2 version of openser using this modparam:
modparam("uri_db", "subscriber_table", "subscriber_v2") , where 'subscriber_v2' its the VIEW shown below:
CREATE VIEW openser.subscriber_v2 AS [..]
Then you can authenticate users using if(!www_authorize("", "subscriber_v2")) or if(!proxy_authorize("", "subscriber_v2")) in register and invite request routes....
The function www_authorize and proxy_authorize are not in the uri_db module, there are in auth_db, but otherwise it should be fine i think.
In Kamailio version 1.4 the modparam "subscriber_table" was removed from uri_db module, Is it enough to specify the new table in www_authorize and proxy_authorize functions?
The uri_db module is not related to the auth_db module, so its not necessary to setup this module if you do not need function from it.
Cheers,
Henning