~alpine/devel

5 3

[alpine-devel] kamailio kamctl script fixed for dbtext support

Details
Message ID
<d912327e0911190501j6433269dnfceaa623b843e19e@mail.gmail.com>
Sender timestamp
1258635715
DKIM signature
missing
Download raw message
Added patch and modified APKBUILD. Increased $pkgrel=$pkgrel+1 :)

Look and review, thanks.

:: Francesco Colista ::
Details
Message ID
<150596.63398.qm@web50212.mail.re2.yahoo.com>
In-Reply-To
<d912327e0911190501j6433269dnfceaa623b843e19e@mail.gmail.com> (view parent)
Sender timestamp
1258659505
DKIM signature
missing
Download raw message
After looking a little deeper at the problem, I think I found a better solution.

You need to remove "email_address(string)" from the file /usr/share/kamailio/dbtext/kamailio/subscriber so the dbtext database subscriber table no longer has the email_address field.

Ted Trask





----- Original Message ----
From: Francesco <francesco.colista@gmail.com>
To: alpine-devel@lists.alpinelinux.org
Sent: Thu, November 19, 2009 8:01:55 AM
Subject: [alpine-devel] kamailio kamctl script fixed for dbtext support

Added patch and modified APKBUILD. Increased $pkgrel=$pkgrel+1 :)

Look and review, thanks.

:: Francesco Colista ::



      


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<997906.61701.qm@web50203.mail.re2.yahoo.com>
In-Reply-To
<150596.63398.qm@web50212.mail.re2.yahoo.com> (view parent)
Sender timestamp
1258667198
DKIM signature
missing
Download raw message
Ok, I've downloaded the code for 1.5.3 and looked even deeper. The
problem is in the database definition, but not quite what I said before.

Here is the 'subscriber' definition for the various DB types:
scripts/db_berkeley/kamailio/subscriber:id(int)
username(str) domain(str) password(str) email_address(str) ha1(str)
ha1b(str) rpid(str)
scripts/postgres/auth_db-create.sql:    email_address VARCHAR(64) DEFAULT '' NOT NULL,
scripts/mysql/auth_db-create.sql:    email_address VARCHAR(64) DEFAULT '' NOT NULL,
scripts/oracle/auth_db-create.sql:    email_address VARCHAR2(64) DEFAULT '',
scripts/dbtext/kamailio/subscriber:id(int,auto)
username(string) domain(string) password(string) email_address(string)
ha1(string) ha1b(string) rpid(string,null) 

Ok, all of the
databases have the email_address column, most saying non-null and
default to "". The problem comes because kamctl doesn't take a
parameter for email_address and tries to set it to null. For postgres
it works just fine, because there's a default defined. Not true for
dbtext. It says non-null, but doesn't define a default. Further, it
appears the dbtext does not differentiate between "" and null. So, if
we remove the non-null restriction, it will allow it to be set to null,
which is actually "", which is what the default should be!

So,
to make this as clear as mud, the one line in
scripts/dbtext/kamailio/subscriber
(/usr/share/kamailio/dbtext/kamailio/subscriber on the device) should
be changed from:

id(int,auto) username(string) domain(string) password(string) email_address(string) ha1(string) ha1b(string) rpid(string,null) 

to (adding the word 'null' in the email_address column definition):

id(int,auto)
username(string) domain(string) password(string)
email_address(string,null) ha1(string) ha1b(string) rpid(string,null) 

And that should fix the problem.

Ted Trask



----- Original Message ----
From: Ted Trask <ttrask01@yahoo.com>
To: Francesco <francesco.colista@gmail.com>; alpine-devel@lists.alpinelinux.org
Sent: Thu, November 19, 2009 2:38:25 PM
Subject: Re: [alpine-devel] kamailio kamctl script fixed for dbtext support

After looking a little deeper at the problem, I think I found a better solution.

You need to remove "email_address(string)" from the file /usr/share/kamailio/dbtext/kamailio/subscriber so the dbtext database subscriber table no longer has the email_address field.

Ted Trask





----- Original Message ----
From: Francesco <francesco.colista@gmail.com>
To: alpine-devel@lists.alpinelinux.org
Sent: Thu, November 19, 2009 8:01:55 AM
Subject: [alpine-devel] kamailio kamctl script fixed for dbtext support

Added patch and modified APKBUILD. Increased $pkgrel=$pkgrel+1 :)

Look and review, thanks.

:: Francesco Colista ::



      


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---


      


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<1258701002.32209.937.camel@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<997906.61701.qm@web50203.mail.re2.yahoo.com> (view parent)
Sender timestamp
1258701002
DKIM signature
missing
Download raw message
On Thu, 2009-11-19 at 13:46 -0800, Ted Trask wrote:
...
> 
> So,
> to make this as clear as mud, the one line in
> scripts/dbtext/kamailio/subscriber
> (/usr/share/kamailio/dbtext/kamailio/subscriber on the device) should
> be changed from:
> 
> id(int,auto) username(string) domain(string) password(string) email_address(string) ha1(string) ha1b(string) rpid(string,null) 
> 
> to (adding the word 'null' in the email_address column definition):
> 
> id(int,auto)
> username(string) domain(string) password(string)
> email_address(string,null) ha1(string) ha1b(string) rpid(string,null) 
> 
> And that should fix the problem.

Francesco, care to make a new patch? Or do you want me to apply your
original?

-nc



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<d912327e0911192313g1d708aaq837b8e44dcd94b87@mail.gmail.com>
In-Reply-To
<1258701002.32209.937.camel@ncopa-desktop.nor.wtbts.net> (view parent)
Sender timestamp
1258701199
DKIM signature
missing
Download raw message
I'll make new patch.
Thanks.

:: Francesco Colista ::





2009/11/20 Natanael Copa <natanael.copa@gmail.com>:
> On Thu, 2009-11-19 at 13:46 -0800, Ted Trask wrote:
> ...
>>
>> So,
>> to make this as clear as mud, the one line in
>> scripts/dbtext/kamailio/subscriber
>> (/usr/share/kamailio/dbtext/kamailio/subscriber on the device) should
>> be changed from:
>>
>> id(int,auto) username(string) domain(string) password(string) email_address(string) ha1(string) ha1b(string) rpid(string,null)
>>
>> to (adding the word 'null' in the email_address column definition):
>>
>> id(int,auto)
>> username(string) domain(string) password(string)
>> email_address(string,null) ha1(string) ha1b(string) rpid(string,null)
>>
>> And that should fix the problem.
>
> Francesco, care to make a new patch? Or do you want me to apply your
> original?
>
> -nc
>
>


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<d912327e0911230143q1157df2ao825ce05a0f7c8226@mail.gmail.com>
In-Reply-To
<d912327e0911192313g1d708aaq837b8e44dcd94b87@mail.gmail.com> (view parent)
Sender timestamp
1258969421
DKIM signature
missing
Download raw message
New APKBUILD for kamailio, contains fix for email_address field not null.


:: Francesco Colista ::





2009/11/20 Francesco <francesco.colista@gmail.com>:
> I'll make new patch.
> Thanks.
>
> :: Francesco Colista ::
>
>
>
>
>
> 2009/11/20 Natanael Copa <natanael.copa@gmail.com>:
>> On Thu, 2009-11-19 at 13:46 -0800, Ted Trask wrote:
>> ...
>>>
>>> So,
>>> to make this as clear as mud, the one line in
>>> scripts/dbtext/kamailio/subscriber
>>> (/usr/share/kamailio/dbtext/kamailio/subscriber on the device) should
>>> be changed from:
>>>
>>> id(int,auto) username(string) domain(string) password(string) email_address(string) ha1(string) ha1b(string) rpid(string,null)
>>>
>>> to (adding the word 'null' in the email_address column definition):
>>>
>>> id(int,auto)
>>> username(string) domain(string) password(string)
>>> email_address(string,null) ha1(string) ha1b(string) rpid(string,null)
>>>
>>> And that should fix the problem.
>>
>> Francesco, care to make a new patch? Or do you want me to apply your
>> original?
>>
>> -nc
>>
>>
>
Reply to thread Export thread (mbox)