Re: [SR-Users] Dialog Module - how???

2010-10-15 Thread Nicolas Rüger
Hi Nathan, thanks for your help, but I was actually looking for a possibility to enable a tracing machanism on per call basis. I need something like... caller | callee | start_time | end_time | ... | as a table in the kamailio database because I want to evaluate these CDRs. I thought dialog m

Re: [SR-Users] Integrate xmpp module with kamailio 3.0.1

2010-10-15 Thread Daniel-Constantin Mierla
Hello, it is the same domain you use for both xmpp and sip server? You have to use different ones, otherwise each server considers it is a local user and try to look it up in own location database. Cheers, Daniel On 10/15/10 7:27 AM, Huy Nguyen wrote: Hi, Thanks for your quickly support,

Re: [SR-Users] Integrate xmpp module with kamailio 3.0.1

2010-10-15 Thread Huy Nguyen
Hi Daniel and list, If i use the different domain for kamailio and xmpp (e.g kamailio1.com and xmpp1.com, i'm testing in my local network). If from my xmpp client, e.g 1...@xmpp1.com, i chat to sip client, e.g 101*kamailio1@xmpp1.com. I think it'll get the previous problem, because th

[SR-Users] Kamailio as IPv6 to IPv4 Gateway

2010-10-15 Thread Joe Uelk
Hello all, I'm looking to implement the following scenario: Step 1 SIP Server A sends INVITE to port 5060 over IPv6 to Kamailio: 2001::1 --udp/tcp--> 2001::2:5060 Step 2 Kamailio SIP NATs the INVITE and sends it out IPv4 to SIP Server B on port 6000 1.1.1.1 --udp/tcp--> 1.1.1.2:6000 Step 3 All

[SR-Users] redirect on register

2010-10-15 Thread Nick Olkin
Hi all! I need to implement a kind of Location Server. The idea behind is to process the REGISTER messages and analyze the source IP address of the packet and reply with the "302 Moved Temporarily" message. What I want to achieve - provide the SIP client with the "nearest" point to use for regist

Re: [SR-Users] Regarding SER Listening on two ports

2010-10-15 Thread Saurabh Srivastava
Hello, We are facing a problem after doing the changes that you said to do in the configuration file. Now we are able to get the server listening on two ports such as 5060 & 5062 but now the problem is that the user agent which is registered from 5060 is able to communicate with the other user age

Re: [SR-Users] Integrate xmpp module with kamailio 3.0.1

2010-10-15 Thread Daniel-Constantin Mierla
... reply all didn't work first time ... On 10/15/10 10:52 AM, Huy Nguyen wrote: Hi Daniel and list, If i use the different domain for kamailio and xmpp (e.g kamailio1.com and xmpp1.com, i'm testing in my local network). If from my xmpp client, e.g 1...@xmpp1.com, i chat to sip client, e.g

Re: [SR-Users] Integrate xmpp module with kamailio 3.0.1

2010-10-15 Thread Huy Nguyen
Hello Daniel, > If i use the different domain for kamailio and xmpp (e.g kamailio1.com and xmpp1.com, i'm testing in my local network). If from my xmpp client, e.g 1...@xmpp1.com, i chat to sip client, e.g 101*kamailio1@xmpp1.com. >> you still have same d

[SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Juha Heinanen
i have stored in htable a key_value=0 with key_type=1, i.e., string. then i have this piece of test code: if (defined($sht(htable=>$var(carrier_key)::id))) { xlog("L_INFO", "$sht(htable=>$var(carrier_key)::id) is defined\n"); } else { xlog("L_INFO", "$sht(htable=>$var(carr

[SR-Users] Best of new in Kamailio 3.1

2010-10-15 Thread Daniel-Constantin Mierla
Hello, some time ago I started a blog post series to reveal in more details some of the cool new features in version 3.1.0. Not finished yet, but has quite some posts so far, you can see the ToC at: http://bit.ly/c5jjzu Hope is useful for some of you, Daniel -- Daniel-Constantin Mierla http

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Andrei Pelinescu-Onciul
On Oct 15, 2010 at 12:29, Juha Heinanen wrote: > i have stored in htable a key_value=0 with key_type=1, i.e., string. > > then i have this piece of test code: > > if (defined($sht(htable=>$var(carrier_key)::id))) { > xlog("L_INFO", "$sht(htable=>$var(carrier_key)::id) is defined\n");

Re: [SR-Users] getting unexpected values from htable

2010-10-15 Thread Elena-Ramona Modroiu
Hi, On 10/14/2010 04:26 PM, Javier Gallart wrote: Hi all I'm testing the htable module at Kamailio 3.1. Currently it's an extremely simple table with a single row loaded from a postgres DB. These are the relevant lines in the configuration file: modparam("htable", "db_url", "postgres://user

[SR-Users] call for assistance

2010-10-15 Thread Meftah Tayeb
hi folk, could you join irc irc.freenode.net #switchfin to start porting SR to BF? not exactly porting but integrating if you get there we will organise a conf call hosted by me i could provide SIP and evean PSTN access thank you -- Meftah Tayeb inum: +883510001288000 mobile: +213660347746

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Juha Heinanen
Andrei Pelinescu-Onciul writes: > Because "==" works only with arguments of the same type, 0 it's > autoconverted to "0". The alternative would be to log an error. andrei, please log an error, because it is hard to remember this uncommon comparison rule and seeing an error message would reveal t

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Daniel-Constantin Mierla
On 10/15/10 12:44 PM, Juha Heinanen wrote: Andrei Pelinescu-Onciul writes: Because "==" works only with arguments of the same type, 0 it's autoconverted to "0". The alternative would be to log an error. andrei, please log an error, because it is hard to remember this uncommon comparison rul

Re: [SR-Users] [sr-dev] call for assistance

2010-10-15 Thread Iñaki Baz Castillo
2010/10/16 Meftah Tayeb : > could you join irc irc.freenode.net #switchfin to start porting SR to BF? > not exactly porting but integrating Meftah, what is BF and why should SIP-Routers developers spent their time in integrating SIP-Router to "BF"? -- Iñaki Baz Castillo ___

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Iñaki Baz Castillo
2010/10/15 Andrei Pelinescu-Onciul : > Because "==" works only with arguments of the same type, 0 it's > autoconverted to "0". The alternative would be to log an error. > > Here are the rules for ==: > /* if left is string, eval left & right as string and  use string diff. >  * if left is int eval

Re: [SR-Users] [sr-dev] call for assistance

2010-10-15 Thread Meftah Tayeb
aki, BF===blackfin Le 15/10/2010 13:02, Iñaki Baz Castillo a écrit : 2010/10/16 Meftah Tayeb: could you join irc irc.freenode.net #switchfin to start porting SR to BF? not exactly porting but integrating Meftah, what is BF and why should SIP-Routers developers spent their time in int

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I don't think a strict type checking is suitable for configuration file > - e.g., if I want to check value in cseq, don't want to get lost in type > conversions. > > If there is going to be such error messages, they must be enclosed in a > config parameter.

[SR-Users] Error in syslog: BUG tm [t_msgbuilder.c:351]: unhandled reason cause -18344

2010-10-15 Thread Mikko Lehto
Hi I am testing certain UAC behavior on proxy initiated 408 response with SIP Router. Call canceling is working fine - UAC gets 408 and GW gets CANCEL. However this error message is seen in syslog after fr_inv_timeout fires: BUG: tm [t_msgbuilder.c:351]: unhandled reason cause -18344 In scri

Re: [SR-Users] rtp proxy - where to invoke?

2010-10-15 Thread Anders
I've been looking around for documentation to understand rtp proxy with Kamailio better, but with no luck (or I might be quite thick-headed!). Anyone know of example configurations with rtp proxy and Kamailio, so I can start seeing what is wrong with my config (below)? Thanks! //Anders On Wed,

Re: [SR-Users] rtp proxy - where to invoke?

2010-10-15 Thread Ovidiu Sas
Check out the examples provided in the code: http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob_plain;f=modules_k/rtpproxy/examples/4to6.cfg;hb=ad7f00d840082989132f335914aa0db223a0e46e http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob_plain;f=modules_k/rtpproxy/examples

Re: [SR-Users] Kamailio as IPv6 to IPv4 Gateway

2010-10-15 Thread Ovidiu Sas
Hello Joe, Check out the example provided in the source tree: http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob_plain;f=modules_k/rtpproxy/examples/4to6.cfg;hb=ad7f00d840082989132f335914aa0db223a0e46e Regards, Ovidiu Sas On Thu, Oct 14, 2010 at 8:59 PM, Joe Uelk wrote: > Hello al

Re: [SR-Users] Kamailio as IPv6 to IPv4 Gateway

2010-10-15 Thread Klaus Darilion
Am 15.10.2010 02:59, schrieb Joe Uelk: Hello all, I'm looking to implement the following scenario: Step 1 SIP Server A sends INVITE to port 5060 over IPv6 to Kamailio: 2001::1 --udp/tcp--> 2001::2:5060 Step 2 Kamailio SIP NATs the INVITE and sends it out IPv4 to SIP Server B on port 6000 1.1

Re: [SR-Users] Fwd: perl_exec() using parameter?

2010-10-15 Thread Nicolas Rüger
Hello, thanks for adding it to the list. The feature would help me a lot. In the meanwhile... I tried to use AVPs instead, but didn't work. I guess I use them in a wrong way...!? $avp(i:3) = $fu; perl_exec("mytest","$avp(i:3)"); Using these lines "$avp(i:3)" is passed as a static stri

Re: [SR-Users] Dialog Module - how???

2010-10-15 Thread Nicolas Rüger
Hi all, ok I figured out now, that dialog module is not the right choice for me, as it stores the data not after the dialog is closed. I could see the traces during the dialog in datbase finally. Thanks for your help... I'll post my question for a tracing mechanism with another more accurate

[SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Juha Heinanen
i have stored in htable a key_value=0 with key_type=1, i.e., string. then i have this piece of test code: if (defined($sht(htable=>$var(carrier_key)::id))) { xlog("L_INFO", "$sht(htable=>$var(carrier_key)::id) is defined\n"); } else { xlog("L_INFO", "$sht(htable=>$var(carr

[SR-Users] calltrace mechanism available?

2010-10-15 Thread Nicolas Rüger
Hello, I am looking for a possibility to trace kamailio on a per call basis. I need something like... id | caller | callee | start_time | end_time | ... as a table in the kamailio database because I want to evaluate these CDRs for SPIT-Prevention. Therefore I need these traces to be st

Re: [SR-Users] calltrace mechanism available?

2010-10-15 Thread Morten Isaksen
Hi, You could use the dialog module and then create a trigger in mysql that insert the row to be deleted in another table. /Morten On Fri, Oct 15, 2010 at 4:00 PM, "Nicolas Rüger" wrote: > Hello, > > I am looking for a possibility to trace kamailio on a per call basis. > > I need something like

Re: [SR-Users] calltrace mechanism available?

2010-10-15 Thread Nicolas Rüger
Hello, thank you. That's been one of my thougts as well but I guess I gonna try the idea with using perl-scripts then instead because I need the following attributes and I guess dialog module doesn't provide all of them, right!? - caller - callee - start_time (and date) --> timestamped at initi

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Daniel-Constantin Mierla
On 10/15/10 1:43 PM, Juha Heinanen wrote: Daniel-Constantin Mierla writes: I don't think a strict type checking is suitable for configuration file - e.g., if I want to check value in cseq, don't want to get lost in type conversions. If there is going to be such error messages, they must be e

Re: [SR-Users] Best of new in Kamailio 3.1

2010-10-15 Thread Gaston Draque
Impressive, thanks Daniel for the update! On Fri, Oct 15, 2010 at 7:04 AM, Daniel-Constantin Mierla wrote: > Hello, > > some time ago I started a blog post series to reveal in more details some > of the cool new features in version 3.1.0. Not finished yet, but has quite > some posts so far, you

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Juha Heinanen
daniel, after your rant, please tell a non-programmer, how he/she can easily test if a var holds integer 0 value? -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Andrei Pelinescu-Onciul
On Oct 15, 2010 at 16:26, Daniel-Constantin Mierla wrote: > > > On 10/15/10 1:43 PM, Juha Heinanen wrote: > >Daniel-Constantin Mierla writes: > > > >>I don't think a strict type checking is suitable for configuration file > >>- e.g., if I want to check value in cseq, don't want to get lost in ty

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Daniel-Constantin Mierla
Juha, On 10/15/10 4:32 PM, Juha Heinanen wrote: daniel, after your rant, rant?!? maybe you got the message wrong. It was about the purpose of configuration file and the target users for it. please tell a non-programmer, how he/she can easily test if a var holds integer 0 value? I don't s

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Juha Heinanen
Andrei Pelinescu-Onciul writes: > Regarding this case, I agree that changing it now for 3.1 is a bad idea > and this is also not the best example of how things could go wrong. yes, there should not be any changes in 3.1. whatever is done, should go to master. -- juha __

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Andrei Pelinescu-Onciul
On Oct 15, 2010 at 13:44, Juha Heinanen wrote: > Andrei Pelinescu-Onciul writes: > > > Because "==" works only with arguments of the same type, 0 it's > > autoconverted to "0". The alternative would be to log an error. > > andrei, > > please log an error, because it is hard to remember this unc

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > rant?!? maybe you got the message wrong. It was about the purpose of > configuration file and the target users for it. your message was very emotional. you defined the target users in your message. i have not seen that discussed or agreed earlier. my claim i

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Daniel-Constantin Mierla
On 10/15/10 4:36 PM, Andrei Pelinescu-Onciul wrote: On Oct 15, 2010 at 16:26, Daniel-Constantin Mierla wrote: On 10/15/10 1:43 PM, Juha Heinanen wrote: Daniel-Constantin Mierla writes: I don't think a strict type checking is suitable for configuration file - e.g., if I want to check value

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Juha Heinanen
Andrei Pelinescu-Onciul writes: > No, there is no is_int function, but you could use a hack: > > if (($v == 0) && ($v + 0 == (str)0)) > > will be true only if $v is int and == 0 ($v == 0 makes sure that > $v!=""). daniel, here you go. is that in your opinion something that a non-programmer co

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Changing current behavior will be killing, using new operators (iirc, > you added something with le, lt, ...) would be an option, but we add > more to the confusion of what and how to use. i agree with daniel here. introducing new operators is not user friend

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Andrei Pelinescu-Onciul
On Oct 15, 2010 at 17:04, Daniel-Constantin Mierla wrote: > > > On 10/15/10 4:36 PM, Andrei Pelinescu-Onciul wrote: > >On Oct 15, 2010 at 16:26, Daniel-Constantin Mierla wrote: > >> > >>On 10/15/10 1:43 PM, Juha Heinanen wrote: > >>>Daniel-Constantin Mierla writes: > >>> > I don't think a s

[SR-Users] SIP Ping utility with kamailio

2010-10-15 Thread JR Richardson
Hi All, Can someone point me in the right direction of a command line SIP Ping utility or how to invoke from Kamailio? I see there is a sip_ping.pl script in voip-hacks, does anyone have copy-paste text version of that, all I can find is the PDF? Thanks. JR -- JR Richardson Engineering for the

[SR-Users] SIP Ping utility with kamailio

2010-10-15 Thread Juha Heinanen
JR Richardson writes: > Can someone point me in the right direction of a command line SIP Ping > utility or how to invoke from Kamailio? you can use sipsak as command line ping tool. tm module has t_uac function that you can invoke via mi interface. i do not have any scripts for you. -- juha

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Daniel-Constantin Mierla
On 10/15/10 5:03 PM, Juha Heinanen wrote: Daniel-Constantin Mierla writes: rant?!? maybe you got the message wrong. It was about the purpose of configuration file and the target users for it. your message was very emotional. you defined the target users in your message. i have not seen tha

Re: [SR-Users] Fwd: perl_exec() using parameter?

2010-10-15 Thread Nicolas Rüger
Hello, just realized that something like the following works now with kamailio v3.1... perl_exec("mytest",$fu); Whoever changed it...THANK YOU :) Regards, Nicolas > > thanks for adding it to the list. The feature would help me a lot. > > In the meanwhile... > > I tried

Re: [SR-Users] SIP Ping utility with kamailio

2010-10-15 Thread Fred Posner
Hey JR... I use this: #! /usr/bin/perl -w use IO::Socket; use POSIX 'strftime'; my ($msg,$remotehost,$callid,$socket,$date,$branch,$localip,$dest); $remotehost = $ARGV[0] or die "FAIL \(no host defined\)\n"; if ($ARGV[1]) { $remoteport = $ARGV[1]; } else {

Re: [SR-Users] getting unexpected values from htable

2010-10-15 Thread Javier Gallart
Hello thanksI think It's working now; I had defined the key_type and value_type columns as char; I've changed them to integer and now it's showing the correct values. Regards Javi On Fri, Oct 15, 2010 at 12:32 PM, Elena-Ramona Modroiu wrote: > Hi, > > > On 10/14/2010 04:26 PM, Javier Gall

Re: [SR-Users] rtp proxy - where to invoke?

2010-10-15 Thread Anders
Thanks for the references to examples. I've been through them, gotten rid of force_rtp_proxy() since it's considered depreciated - but still get the same error: /usr/local/sbin/kamailio[31035]: ERROR:nathelper:force_rtp_proxy: incorrect port 0 in reply from rtp proxy I do this in my main route

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Iñaki Baz Castillo
2010/10/15 Juha Heinanen : >> No, there is no is_int function, but you could use a hack: >> >> if (($v == 0) && ($v + 0 == (str)0)) >> >> will be true only if $v is int and == 0 ($v == 0 makes sure that >> $v!=""). > > daniel, > > here you go.  is that in your opinion something that a non-programme

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Daniel-Constantin Mierla
On 10/15/10 5:14 PM, Andrei Pelinescu-Onciul wrote: On Oct 15, 2010 at 17:04, Daniel-Constantin Mierla wrote: [...] Andrei, besides that bad things can happen always :-) , so far nobody complained about such cases, but about complexity to understand and build configuration files. If we make

Re: [SR-Users] getting unexpected values from htable

2010-10-15 Thread Juha Heinanen
Javier Gallart writes: > thanksI think It's working now; I had defined the key_type and > value_type columns as char; I've changed them to integer and now it's > showing the correct values. it is not a good idea to create tables by hand. use the script that is provided. -- juha ___

Re: [SR-Users] SIP Ping utility with kamailio

2010-10-15 Thread JR Richardson
On Fri, Oct 15, 2010 at 10:22 AM, Fred Posner wrote: > Hey JR... > > I use this: > > #! /usr/bin/perl -w > use IO::Socket; > use POSIX 'strftime'; > > my ($msg,$remotehost,$callid,$socket,$date,$branch,$localip,$dest); > > $remotehost = $ARGV[0] >        or die "FAIL \(no host defined\)\n"; > > if

Re: [SR-Users] rtp proxy - where to invoke?

2010-10-15 Thread Ovidiu Sas
The example that is in the link is using rtpproxy_offer/rtpproxy_answer (don't know which files you were browsing). The script is provided as an example. Once you understand how it works, you can build on top of it. You need to invoke rtpproxy_offer for the first SIP request or reply that is carr

Re: [SR-Users] SIP Ping utility with kamailio

2010-10-15 Thread Fred Posner
On Oct 15, 2010, at 11:42 AM, JR Richardson wrote: > On Fri, Oct 15, 2010 at 10:22 AM, Fred Posner wrote: >> Hey JR... >> >> I use this: >> >> #! /usr/bin/perl -w >> use IO::Socket; >> use POSIX 'strftime'; >> >> my ($msg,$remotehost,$callid,$socket,$date,$branch,$localip,$dest); >> >> $remot

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Iñaki Baz Castillo
2010/10/15 Daniel-Constantin Mierla : > Even we like it or not, non-type-safety languages such as perl, shell or > python rule the sys admin world. Said that I would like to expose a proposal for comparisons: 1) Never do implicit type conversion. This is, a string is NEVER equal to an integer:

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Iñaki Baz Castillo
2010/10/15 Iñaki Baz Castillo : > 1) Never do implicit type conversion. This is, a string is NEVER equal > to an integer: > >    if "0" == 0     =>  false >    if "" == 0       => false >    if "asdasd" == 0     => false > > > 2) An integer is NEVER equal to a string: > >    if 0 == "0"     =>  fal

[SR-Users] upgrade from 3.0 to 3.1

2010-10-15 Thread Anders
Hi, Sorry about the low-level question, but... - how do I upgrade from Kamailio 3.0 to 3.1? I used git for installing 3.0 (this great guide: http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.0.x-from-git) - but do I need to remove 3.0 and then install 3.1? Thanks, Anders _

Re: [SR-Users] SIP Ping utility with kamailio

2010-10-15 Thread JR Richardson
On Fri, Oct 15, 2010 at 10:50 AM, Fred Posner wrote: > On Oct 15, 2010, at 11:42 AM, JR Richardson wrote: > >> On Fri, Oct 15, 2010 at 10:22 AM, Fred Posner wrote: >>> Hey JR... >>> >>> I use this: >>> >>> #! /usr/bin/perl -w >>> use IO::Socket; >>> use POSIX 'strftime'; >>> >>> my ($msg,$remoteh

Re: [SR-Users] upgrade from 3.0 to 3.1

2010-10-15 Thread Ovidiu Sas
Best thing to do is to build a package for your OS and install via packages. If you don't know how to build a package or you want to install using 'make install', then you need to remove by hand the previous installed version. To find out what to remove: cd /usr/local find . | grep kamailio Then

Re: [SR-Users] upgrade from 3.0 to 3.1

2010-10-15 Thread Anders
Great - I cleaned out manually before moving to the install. Thanks a lot! //Anders On Fri, Oct 15, 2010 at 12:38 PM, Ovidiu Sas wrote: > Best thing to do is to build a package for your OS and install via packages. > If you don't know how to build a package or you want to install using > 'make

[SR-Users] upgrade from 3.0 to 3.1

2010-10-15 Thread Juha Heinanen
Anders writes: > Sorry about the low-level question, but... - how do I upgrade from > Kamailio 3.0 to 3.1? I used git for installing 3.0 (this great guide: > http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.0.x-from-git) > - but do I need to remove 3.0 and then install 3.1? for upgrad

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Iñaki Baz Castillo
2010/10/15 Juha Heinanen : >> No, there is no is_int function, but you could use a hack: >> >> if (($v == 0) && ($v + 0 == (str)0)) >> >> will be true only if $v is int and == 0 ($v == 0 makes sure that >> $v!=""). > > daniel, > > here you go.  is that in your opinion something that a non-programme

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Daniel-Constantin Mierla
On 10/15/10 7:46 PM, Iñaki Baz Castillo wrote: [...] In Kamailio 1.5 I experiment this problem very often: Usually I get data from a DB table in which some fields are INT (allowing NULL). Possible values are NULL or integers from 0 to N. Trying to figure if the column has value 0 is a pain. H

Re: [SR-Users] upgrade from 3.0 to 3.1

2010-10-15 Thread Anders
Thanks, but I had already seen this document, but I didn't quite get how I could do the kamailio upgrade based on this - was already doing clean-up-and-then-install way, and now I'm installing again. I'm with an odd problem now, though, - running "/usr/local/sbin/kamdbctl create" gives a "no such f

Re: [SR-Users] upgrade from 3.0 to 3.1

2010-10-15 Thread Juha Heinanen
Anders writes: > I'm with an odd problem now, though, - running > "/usr/local/sbin/kamdbctl create" gives a "no such file or directory" > - but if I run "locate kamdbctl", it actually finds the file in that > directory...but an "ls" shows nothingwhat am I missing? i suggest you install kamail

Re: [SR-Users] upgrade from 3.0 to 3.1

2010-10-15 Thread Anders
Thank you for the advice - I appreciate it - but I do not see how I can actually get more experience with binaries by using a package. Everything has a beginning. Moving on - thanks for input. On Fri, Oct 15, 2010 at 2:59 PM, Juha Heinanen wrote: > Anders writes: > >> I'm with an odd problem now,

Re: [SR-Users] upgrade from 3.0 to 3.1

2010-10-15 Thread Anders
In case anyone should run into the same issue, here is the solution for the record: I had not taken db_mysql and mysql off the exclude_modules list in modules.lst, and therefore the module was not installed. //Anders On Fri, Oct 15, 2010 at 3:06 PM, Anders wrote: > Thank you for the advice - I a

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Iñaki Baz Castillo
2010/10/15 Daniel-Constantin Mierla : >> Usually I get data from a DB table in which some fields are INT >> (allowing NULL). Possible values are NULL or integers from 0 to N. >> Trying to figure if the column has value 0 is a pain. > > Have you tried: if($var(x)==0) ? Yes, that would work, but it'

Re: [SR-Users] how can string "0" be equal to int 0?

2010-10-15 Thread Iñaki Baz Castillo
2010/10/15 Iñaki Baz Castillo : > 1) In case I retrieve 1...8 from the database: > >  - if $avp(column)            => true >  - if $avp(column) >=0     => true > > 2) In case I retrieve 0 or NULL from the database: > >  - if $avp(column)            => false >  - if $avp(column) >=0     => ERROR (in

[SR-Users] Fwd: Tutorial: SIP SIMPLE Presence Made Simple with Kamailio 3.1

2010-10-15 Thread Rouskol Andrey
Daniel, What whould you think about this variant of xcap authentication: event_route[xhttp:request] { xdbg("= xhttp: request [$rv] $rm => $hu\n"); if($hu=~"^/xcap-root/") { # xcap ops $xcapuri(u=>data) = $hu; if($xcapuri(