[Kamailio-Users] ERROR:uri_db:mod_init: Invalid table version of the subscriber table (Kamailio ver. 1.4)

Rafael Risco Gonzales-Vigil rafael.risco at gmail.com
Tue Aug 12 17:13:24 CEST 2008


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 at 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20080812/e47ebfac/attachment.htm 


More information about the Users mailing list