X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from web50203.mail.re2.yahoo.com (web50203.mail.re2.yahoo.com [206.190.38.44]) by lists.alpinelinux.org (Postfix) with SMTP id BF348360F714 for ; Thu, 19 Nov 2009 21:46:39 +0000 (UTC) Received: (qmail 62569 invoked by uid 60001); 19 Nov 2009 21:46:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1258667198; bh=WfAP0oc9zfwJatYBGvoS88TR8hK0+qWYEe92NRlH/Ww=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=mSqAtfbyWFqqymX0P+/Lx2HxwVeaN8BOSAf2GP9ChGuba4RJBn8xAZQPxUGlP7R4TXSGvtZfbQpX08q/pYjV4PYSEjhk6zjSSOw2L+l/qrHhK/Bf1xY7X/QjxHaRcEx3UdikLUJijsLeuaTD3QwfYtSQiGrzUIgAEECQ+sYDDNs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=NtYH2LMleF/VIpGAY1zWfO6gxvgnuFlhcNzdBBHU5EqlQpjlUMStbDEIup/nlxW/yhyJzEQeRDtQJcmDIZvctaGnwNfLryYRay0hMXbn8FZfNXLwKfr8ujVsZaY2G7mUeOmINLCYLvu9AQ3XETbEPxvwsJN8pSFLZuFTyJrcqX0=; Message-ID: <997906.61701.qm@web50203.mail.re2.yahoo.com> X-YMail-OSG: 3XywDrwVM1k1_IH89fi2FTd25oHwVVUvneYCbncEf_vQ49m129OQMpbmz89S0qvbYNOfE7_TVMEuEKMNJZbr_EkTwdKBkGujz0oNrQQoYQo5nb5.JFK.tHLschNtxyDRhqIprO.Izc8_205IjQzqzeKgidASrL8orXKilyunKtEg6hJENedYrG5yEg1S.3j7qA_GMRO1Kb2u8OweSMy3pDUWofDxp3v0spKbXdb6ZhFtZSqltjiGK2k.2o7ER.u2lx4pmx1uE8xxkMxzosu7p.KorKYwX5R5i3P3x9ZYle6uS2B7koC2u1rFpYA4Rciz5A9SK9Oky9mQ Received: from [208.74.141.254] by web50203.mail.re2.yahoo.com via HTTP; Thu, 19 Nov 2009 13:46:38 PST X-Mailer: YahooMailRC/211.6 YahooMailWebService/0.8.100.260964 References: <150596.63398.qm@web50212.mail.re2.yahoo.com> Date: Thu, 19 Nov 2009 13:46:38 -0800 (PST) From: Ted Trask Subject: Re: [alpine-devel] kamailio kamctl script fixed for dbtext support To: Ted Trask , Francesco , alpine-devel@lists.alpinelinux.org In-Reply-To: <150596.63398.qm@web50212.mail.re2.yahoo.com> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 To: Francesco ; 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 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 ---