This is and old issue that I still have around here ...
-Kamailio 1.5.1 (svn) -PostgreSQL database -Database created with "kamdbctl create", so just clean - in kamailio.cfg: [...] loadmodule "uri_db.so" modparam("uri_db", "db_url", "postgres://openser:XXXXX@localhost:5435/voip3") modparam("uri_db", "db_table", "uri") modparam("uri_db", "user_column", "username") modparam("uri_db", "domain_column", "domain") modparam("uri_db", "uriuser_column", "uri_user") modparam("uri_db", "use_uri_table", 0) modparam("uri_db", "use_domain", 0) [...]
May 24 10:22:27 [23631] INFO:core:init_mod: initializing module auth_db May 24 10:22:27 [23631] INFO:core:init_mod: initializing module uri_db May 24 10:22:27 [23631] ERROR:uri_db:mod_init: Invalid table version of the subscriber table May 24 10:22:27 [23631] ERROR:core:init_mod: failed to initialize module uri_db May 24 10:22:27 [23631] ERROR:core:main: error while initializing modules
And I don't undestand why ... because subscriber table it's on version 6, that is what uri_db checks ...
[uri_db_mod.c] /* Check table version */ ver = uridb_db_ver(&db_url, &db_table); if (ver < 0) { LM_ERR("Error while querying table version\n"); return -1; } else { if (use_uri_table) { if (ver != URI_TABLE_VERSION) { LM_ERR("Invalid table version of the uri table\n"); return -1; } } else { if (ver != SUBSCRIBER_TABLE_VERSION) { LM_ERR("Invalid table version of the subscriber table\n"); return -1; } } } [uri_db_mod.c]
and SUBSCRIBER_TABLE_VERSION has value 6
is there something I'm doing wrong?, last time I compile myself this I was forced to comment that block of code on the uri_db sources.
Hello,
On 05/24/2009 12:45 PM, Raúl Alexis Betancor Santana wrote:
This is and old issue that I still have around here ...
-Kamailio 1.5.1 (svn) -PostgreSQL database -Database created with "kamdbctl create", so just clean
- in kamailio.cfg:
[...] loadmodule "uri_db.so" modparam("uri_db", "db_url", "postgres://openser:XXXXX@localhost:5435/voip3") modparam("uri_db", "db_table", "uri") modparam("uri_db", "user_column", "username") modparam("uri_db", "domain_column", "domain") modparam("uri_db", "uriuser_column", "uri_user") modparam("uri_db", "use_uri_table", 0) modparam("uri_db", "use_domain", 0) [...]
May 24 10:22:27 [23631] INFO:core:init_mod: initializing module auth_db May 24 10:22:27 [23631] INFO:core:init_mod: initializing module uri_db May 24 10:22:27 [23631] ERROR:uri_db:mod_init: Invalid table version of the subscriber table May 24 10:22:27 [23631] ERROR:core:init_mod: failed to initialize module uri_db May 24 10:22:27 [23631] ERROR:core:main: error while initializing modules
And I don't undestand why ... because subscriber table it's on version 6, that is what uri_db checks ...
[uri_db_mod.c] /* Check table version */ ver = uridb_db_ver(&db_url, &db_table); if (ver < 0) { LM_ERR("Error while querying table version\n"); return -1; } else { if (use_uri_table) { if (ver != URI_TABLE_VERSION) { LM_ERR("Invalid table version of the uri table\n"); return -1; } } else { if (ver != SUBSCRIBER_TABLE_VERSION) { LM_ERR("Invalid table version of the subscriber table\n"); return -1; } } } [uri_db_mod.c]
and SUBSCRIBER_TABLE_VERSION has value 6
is there something I'm doing wrong?, last time I compile myself this I was forced to comment that block of code on the uri_db sources.
paste the output of "select * from version" here and if you can get it in postgres, the equivalent in mysql of "describe version".
Cheers, Daniel
On Monday 25 May 2009 08:48:42 you wrote:
Hello,
On 05/24/2009 12:45 PM, Raúl Alexis Betancor Santana wrote:
This is and old issue that I still have around here ...
-Kamailio 1.5.1 (svn) -PostgreSQL database -Database created with "kamdbctl create", so just clean
- in kamailio.cfg:
[...] loadmodule "uri_db.so" modparam("uri_db", "db_url", "postgres://openser:XXXXX@localhost:5435/voip3") modparam("uri_db", "db_table", "uri") modparam("uri_db", "user_column", "username") modparam("uri_db", "domain_column", "domain") modparam("uri_db", "uriuser_column", "uri_user") modparam("uri_db", "use_uri_table", 0) modparam("uri_db", "use_domain", 0) [...]
May 24 10:22:27 [23631] INFO:core:init_mod: initializing module auth_db May 24 10:22:27 [23631] INFO:core:init_mod: initializing module uri_db May 24 10:22:27 [23631] ERROR:uri_db:mod_init: Invalid table version of the subscriber table May 24 10:22:27 [23631] ERROR:core:init_mod: failed to initialize module uri_db May 24 10:22:27 [23631] ERROR:core:main: error while initializing modules
And I don't undestand why ... because subscriber table it's on version 6, that is what uri_db checks ...
[uri_db_mod.c] /* Check table version */ ver = uridb_db_ver(&db_url, &db_table); if (ver < 0) { LM_ERR("Error while querying table version\n"); return -1; } else { if (use_uri_table) { if (ver != URI_TABLE_VERSION) { LM_ERR("Invalid table version of the uri table\n"); return -1; } } else { if (ver != SUBSCRIBER_TABLE_VERSION) { LM_ERR("Invalid table version of the subscriber table\n"); return -1; } } } [uri_db_mod.c]
and SUBSCRIBER_TABLE_VERSION has value 6
is there something I'm doing wrong?, last time I compile myself this I was forced to comment that block of code on the uri_db sources.
paste the output of "select * from version" here and if you can get it in postgres, the equivalent in mysql of "describe version".
Hi Daniel, the "real problem" is this line ..
[...] ver = uridb_db_ver(&db_url, &db_table); [...]
Because with it you allways get the version of uri table, but then on the if block you check it against URI_TABLE_VERSION or SUBSCRIBER_TABLE_VERSION. The solution was "UPDATE version SET table_version=6 WHERE table_name ='uri';" so it get's the correct version of SUBSCRIBER_TABLE_VERSION
The check code should be fixed to get the table version of the table you are using (uri or subscriber) and not allways get the version of uri.
Best regards
On Montag, 25. Mai 2009, Raúl Alexis Betancor Santana wrote:
[..]
[uri_db_mod.c]
and SUBSCRIBER_TABLE_VERSION has value 6
is there something I'm doing wrong?, last time I compile myself this I was forced to comment that block of code on the uri_db sources.
paste the output of "select * from version" here and if you can get it in postgres, the equivalent in mysql of "describe version".
Hi Daniel, the "real problem" is this line ..
[...] ver = uridb_db_ver(&db_url, &db_table); [...]
Because with it you allways get the version of uri table, but then on the if block you check it against URI_TABLE_VERSION or SUBSCRIBER_TABLE_VERSION. The solution was "UPDATE version SET table_version=6 WHERE table_name ='uri';" so it get's the correct version of SUBSCRIBER_TABLE_VERSION
The check code should be fixed to get the table version of the table you are using (uri or subscriber) and not allways get the version of uri.
Hi Raúl,
i think the real problem is in your configuration:
modparam("uri_db", "db_table", "uri") modparam("uri_db", "use_uri_table", 0)
You specify "uri" as table for the module to use, but then you say it should not use the uri table for checks. This should be the reason that it report the version error in startup. If you set the latter parameter to 1, it will check against the subscriber table as usual.
Cheers,
Henning
On Monday 25 May 2009 09:11:06 Henning Westerholt wrote:
On Montag, 25. Mai 2009, Raúl Alexis Betancor Santana wrote:
[..]
[uri_db_mod.c]
and SUBSCRIBER_TABLE_VERSION has value 6
is there something I'm doing wrong?, last time I compile myself this I was forced to comment that block of code on the uri_db sources.
paste the output of "select * from version" here and if you can get it in postgres, the equivalent in mysql of "describe version".
Hi Daniel, the "real problem" is this line ..
[...] ver = uridb_db_ver(&db_url, &db_table); [...]
Because with it you allways get the version of uri table, but then on the if block you check it against URI_TABLE_VERSION or SUBSCRIBER_TABLE_VERSION. The solution was "UPDATE version SET table_version=6 WHERE table_name ='uri';" so it get's the correct version of SUBSCRIBER_TABLE_VERSION
The check code should be fixed to get the table version of the table you are using (uri or subscriber) and not allways get the version of uri.
Hi Raúl,
i think the real problem is in your configuration:
modparam("uri_db", "db_table", "uri") modparam("uri_db", "use_uri_table", 0)
You specify "uri" as table for the module to use, but then you say it should not use the uri table for checks. This should be the reason that it report the version error in startup. If you set the latter parameter to 1, it will check against the subscriber table as usual.
Cheers,
Henning
You are right Henning, it was my mistake, I don't undestood the docs when I read them. I was trying to use the subscriber table, but put uri as the param ... :-P
Thx