Hello,
I need help.
I try to select a DOUBLE(10,4).
Kamailio report <null>.
Example:
avp_db_query("select CREDIT from subscriber where client='$avp(s:679)'", "$avp(i:513)");
$avp(i:513) is null!
But in my database, it is 15.0000
Know you how to do ?
Cordialement,
BERGANZ François
cid:image001.gif@01C8F7CD.6BC1D2C0
http://www.acropolistelecom.net/ http://www.acropolistelecom.net
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
Hello,
CAST the result as a CHAR/VARCHAR. Also what version of kamailio are you running?
On Tue, Sep 15, 2009 at 6:53 AM, BERGANZ François < francois@acropolistelecom.net> wrote:
Hello,
I need help.
I try to select a DOUBLE(10,4).
Kamailio report <null>.
Example:
avp_db_query("select CREDIT from subscriber where client='$avp(s:679)'", "$avp(i:513)");
$avp(i:513) is null!
But in my database, it is 15.0000
Know you how to do ?
Cordialement,
BERGANZ François
[image: cid:image001.gif@01C8F7CD.6BC1D2C0]
http://www.acropolistelecom.net
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
I am using kamailio 1.4.3-notls
Cordialement,
BERGANZ François
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
De : Brandon Armstead [mailto:brandon@cryy.com] Envoyé : mardi 15 septembre 2009 19:07 À : BERGANZ François Cc : users@lists.kamailio.org Objet : Re: [Kamailio-Users] avp_db_query to SELECT a DOUBLE colomn
Hello,
CAST the result as a CHAR/VARCHAR. Also what version of kamailio are you running?
On Tue, Sep 15, 2009 at 6:53 AM, BERGANZ François francois@acropolistelecom.net wrote:
Hello,
I need help.
I try to select a DOUBLE(10,4).
Kamailio report <null>.
Example:
avp_db_query("select CREDIT from subscriber where client='$avp(s:679)'", "$avp(i:513)");
$avp(i:513) is null!
But in my database, it is 15.0000
Know you how to do ?
Cordialement,
BERGANZ François
cid:image001.gif@01C8F7CD.6BC1D2C0
http://www.acropolistelecom.net/ http://www.acropolistelecom.net
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
_______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Bear in mind that neither the avpops module nor the newer sqlops module (in 1.5.x releases) can handle many idiosyncratic datatypes. They pretty much deal with INTEGERs and VARCHARs. Everything else is a tossup. For example, a PostgreSQL BIGINT is unintelligible to sqlops, I found out.
BERGANZ François wrote:
I am using kamailio 1.4.3-notls
Cordialement,
BERGANZ François
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
*De :* Brandon Armstead [mailto:brandon@cryy.com] *Envoyé :* mardi 15 septembre 2009 19:07 *À :* BERGANZ François *Cc :* users@lists.kamailio.org *Objet :* Re: [Kamailio-Users] avp_db_query to SELECT a DOUBLE colomn
Hello,
CAST the result as a CHAR/VARCHAR. Also what version of kamailio
are you running?
On Tue, Sep 15, 2009 at 6:53 AM, BERGANZ François <francois@acropolistelecom.net mailto:francois@acropolistelecom.net> wrote:
Hello,
I need help.
I try to select a DOUBLE(10,4).
Kamailio report <null>.
Example:
avp_db_query("select CREDIT from subscriber where client='$avp(s:679)'", "$avp(i:513)");
$avp(i:513) is null!
But in my database, it is 15.0000
Know you how to do ?
Cordialement,
BERGANZ François
cid:image001.gif@01C8F7CD.6BC1D2C0
http://www.acropolistelecom.net http://www.acropolistelecom.net/
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org mailto:Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
I tried to select (for example) 2 Double to test IF FIRST > SECOND.
The solution for me is:
SELECT IF(FIRST > SECOND,'yes','no') WHERE CLIENT='$avp(s:12)'; If ($avp(s:12) == "yes") { ... }
Cordialement, BERGANZ François
http://www.acropolistelecom.net Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
-----Message d'origine----- De : Alex Balashov [mailto:abalashov@evaristesys.com] Envoyé : mercredi 16 septembre 2009 09:07 À : BERGANZ François Cc : 'Brandon Armstead'; users@lists.kamailio.org Objet : Re: [Kamailio-Users] avp_db_query to SELECT a DOUBLE colomn
Bear in mind that neither the avpops module nor the newer sqlops module (in 1.5.x releases) can handle many idiosyncratic datatypes. They pretty much deal with INTEGERs and VARCHARs. Everything else is a tossup. For example, a PostgreSQL BIGINT is unintelligible to sqlops, I found out.
BERGANZ François wrote:
I am using kamailio 1.4.3-notls
Cordialement,
BERGANZ François
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
*De :* Brandon Armstead [mailto:brandon@cryy.com] *Envoyé :* mardi 15 septembre 2009 19:07 *À :* BERGANZ François *Cc :* users@lists.kamailio.org *Objet :* Re: [Kamailio-Users] avp_db_query to SELECT a DOUBLE colomn
Hello,
CAST the result as a CHAR/VARCHAR. Also what version of kamailio
are you running?
On Tue, Sep 15, 2009 at 6:53 AM, BERGANZ François <francois@acropolistelecom.net mailto:francois@acropolistelecom.net> wrote:
Hello,
I need help.
I try to select a DOUBLE(10,4).
Kamailio report <null>.
Example:
avp_db_query("select CREDIT from subscriber where client='$avp(s:679)'", "$avp(i:513)");
$avp(i:513) is null!
But in my database, it is 15.0000
Know you how to do ?
Cordialement,
BERGANZ François
cid:image001.gif@01C8F7CD.6BC1D2C0
http://www.acropolistelecom.net http://www.acropolistelecom.net/
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org mailto:Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
For example a PostgreSQL BIGINT is unintelligible to sqlops, I found out.
What do you mean exactly?
Iñaki Baz Castillo wrote:
For example a PostgreSQL BIGINT is unintelligible to sqlops, I found out.
What do you mean exactly?
CREATE TABLE stuff ( id bigint PRIMARY KEY NOT NULL );
INSERT INTO stuff VALUES (1);
...
sql_query("ca", "SELECT id FROM stuff", "ra");
$dbr(ra=>[0,0]) will be NULL.
2009/9/16 Alex Balashov abalashov@evaristesys.com:
Iñaki Baz Castillo wrote:
For example a PostgreSQL BIGINT is unintelligible to sqlops, I found out.
What do you mean exactly?
CREATE TABLE stuff ( id bigint PRIMARY KEY NOT NULL );
INSERT INTO stuff VALUES (1);
...
sql_query("ca", "SELECT id FROM stuff", "ra");
$dbr(ra=>[0,0]) will be NULL.
sql_...ops!
A bug?
Iñaki Baz Castillo wrote:
2009/9/16 Alex Balashov abalashov@evaristesys.com:
Iñaki Baz Castillo wrote:
For example a PostgreSQL BIGINT is unintelligible to sqlops, I found out.
What do you mean exactly?
CREATE TABLE stuff ( id bigint PRIMARY KEY NOT NULL );
INSERT INTO stuff VALUES (1);
...
sql_query("ca", "SELECT id FROM stuff", "ra");
$dbr(ra=>[0,0]) will be NULL.
sql_...ops!
A bug?
Maybe. There was mailing list traffic about it when I first reported it around 1 April 2009.
I do not think it is a bug, but rather the understandable unwillingness of the implementors to handle every database-specific data type that might come their way, like 'timestamp', 'inet', etc.
I do think 'bigint' is an important one to handle because there are some values Kamailio may need to retrieve from time to time that are simply larger than 32-bit width. But it's hard to say where the line should be drawn on special RDBM types, especially since the values that are represented by user variables, AVPs, hash table, etc. are ultimately just scalar quantities or strings.
On 16.09.2009 11:01 Uhr, Alex Balashov wrote:
Iñaki Baz Castillo wrote:
2009/9/16 Alex Balashov abalashov@evaristesys.com:
Iñaki Baz Castillo wrote:
For example a PostgreSQL BIGINT is unintelligible to sqlops, I found out.
What do you mean exactly?
CREATE TABLE stuff ( id bigint PRIMARY KEY NOT NULL );
INSERT INTO stuff VALUES (1);
...
sql_query("ca", "SELECT id FROM stuff", "ra");
$dbr(ra=>[0,0]) will be NULL.
sql_...ops!
A bug?
Maybe. There was mailing list traffic about it when I first reported it around 1 April 2009.
I do not think it is a bug, but rather the understandable unwillingness of the implementors to handle every database-specific data type that might come their way, like 'timestamp', 'inet', etc.
the problem so far is the lack of support in config file interpreter for such types -- right now, operations in config file can deal with integer and string types only.
There are steps to overcome this limitation in the future. The devel version has a new PV class called xavp where the value can be of many more types: http://sip-router.org/wiki/devel/xavp
One reason behind was this specific need of other value types. Next step will be to extend the cfg interpreter.
Cheers, Daniel
I do think 'bigint' is an important one to handle because there are some values Kamailio may need to retrieve from time to time that are simply larger than 32-bit width. But it's hard to say where the line should be drawn on special RDBM types, especially since the values that are represented by user variables, AVPs, hash table, etc. are ultimately just scalar quantities or strings.
Hello to all I have been using Kamailio for a long time, but now some of my clients aren't registering... I see the REGISTER packets coming in the server (with ngrep), but Kamailio doesn't answer.
I'm not using persistent storage, so all registrations are in memory. But when Kamailio reaches 30 or more registrations... it just stops answering and looses all registered clients:
[root@server ~]# kamctl ul show | grep records Domain:: location table=512 records=4 max_slot1
I have disk space, could this be lack of memory?
[root@server ~]# free -m total used free shared buffers cached Mem: 748 630 118 0 148 391 -/+ buffers/cache: 90 658 Swap: 1503 0 1503
There are no errors in /var/log/kamailio How can I be sure of whats the problem?
Thanks Regards Joao Pereira
In one second everybody is registered... and in the next... everybody is offline:
[root@server ~]# kamctl ul show | grep records Domain:: location table=512 records=19 max_slot=1 [root@server ~]# kamctl ul show | grep records Domain:: location table=512 records=3 max_slot=1 [root@server ~]#
If I put debug > 3 it creates lots and lots of debug.... and its impossible to see anything. How can I debug this problem?
Thanks Regards Joao Pereira
Joao Gomes Pereira wrote:
Hello to all I have been using Kamailio for a long time, but now some of my clients aren't registering... I see the REGISTER packets coming in the server (with ngrep), but Kamailio doesn't answer.
I'm not using persistent storage, so all registrations are in memory. But when Kamailio reaches 30 or more registrations... it just stops answering and looses all registered clients:
[root@server ~]# kamctl ul show | grep records Domain:: location table=512 records=4 max_slot1
I have disk space, could this be lack of memory?
[root@server ~]# free -m total used free shared buffers cached Mem: 748 630 118 0 148 391 -/+ buffers/cache: 90 658 Swap: 1503 0 1503
There are no errors in /var/log/kamailio How can I be sure of whats the problem?
Thanks Regards Joao Pereira
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Hello,
do you have some tools that restarts kamailio? Check if such event happened.
Also, put in your config file a line with xlog("") before save("location") and see if you get the xlog message in the logs. In this way you are sure the sip message reached the config file.
Cheers, Daniel
On 16.09.2009 13:12 Uhr, Joao Gomes Pereira wrote:
In one second everybody is registered... and in the next... everybody is offline:
[root@server ~]# kamctl ul show | grep records Domain:: location table=512 records=19 max_slot=1 [root@server ~]# kamctl ul show | grep records Domain:: location table=512 records=3 max_slot=1 [root@server ~]#
If I put debug > 3 it creates lots and lots of debug.... and its impossible to see anything. How can I debug this problem?
Thanks Regards Joao Pereira
Joao Gomes Pereira wrote:
Hello to all I have been using Kamailio for a long time, but now some of my clients aren't registering... I see the REGISTER packets coming in the server (with ngrep), but Kamailio doesn't answer.
I'm not using persistent storage, so all registrations are in memory. But when Kamailio reaches 30 or more registrations... it just stops answering and looses all registered clients:
[root@server ~]# kamctl ul show | grep records Domain:: location table=512 records=4 max_slot1
I have disk space, could this be lack of memory?
[root@server ~]# free -m total used free shared buffers cached Mem: 748 630 118 0 148 391 -/+ buffers/cache: 90 658 Swap: 1503 0 1503
There are no errors in /var/log/kamailio How can I be sure of whats the problem?
Thanks Regards Joao Pereira
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users