[SR-Users] Reload lua script?

2012-03-29 Thread Javier Gallart
Hello all I'm starting to play with lua scripting in Kamailio. It's really cool, some complex stuff in the script becomes really easy this way. The script is becoming quite big, therefore I'd like to use lua_run instead of lua_dofile. My doubt is pretty basic: if i load a script in memory at

Re: [SR-Users] Reload lua script?

2012-03-29 Thread Javier Gallart
Thanks Daniel On Thu, Mar 29, 2012 at 2:49 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 3/29/12 11:49 AM, Javier Gallart wrote: Hello all I'm starting to play with lua scripting in Kamailio. It's really cool, some complex stuff in the script becomes really easy

Re: [SR-Users] sr-users Digest, Vol 82, Issue 21

2012-03-07 Thread Javier Gallart
Hello this is what I normally use: if (defined $var(x)) {...} Regards Javi -- Message: 4 Date: Tue, 6 Mar 2012 20:05:32 -0600 From: Krishna Kurapati kkura...@gmail.com Subject: [SR-Users] Improving Kamailo configuration parser ... To: kamailio users

Re: [SR-Users] how to match exact string value in mtree (Uri Shacked)

2012-02-17 Thread Javier Gallart
: Hello Javier, one question about redis, can it do longest prefix matching or all prefixes match? Cheers, Daniel On 2/16/12 2:51 PM, Javier Gallart wrote: Hello Uri I had similar needs and I found the ndb_redis module more suited for that type of task. Instead of a tree you have

Re: [SR-Users] ndb_redis module fails after a while

2012-02-17 Thread Javier Gallart
Hi Daniel, Andrew I've just tested the patch and kamailio crashes when the redis server is stopped. This is what I could get: -From the logs: Feb 17 06:33:32 r-gate-test ./kamailio[23812]: ALERT: core [main.c:751]: child process 23819 exited by a signal 11 Feb 17 06:33:32 r-gate-test

Re: [SR-Users] how to match exact string value in mtree (Uri Shacked)

2012-02-17 Thread Javier Gallart
, 2012 at 3:11 PM, Uri Shacked ushac...@gmail.com wrote: hi, what do you think about the Dialplan module? it can probably do the trick as well... cheers, On Fri, Feb 17, 2012 at 10:18 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 2/16/12 2:51 PM, Javier Gallart wrote

Re: [SR-Users] Kamailio Redundancy examples/pointers required

2012-01-26 Thread Javier Gallart
Hello the net.ipv4.ip_nonlocal_bind = 1 options works fine. We have a very basic redundancy level, but it fits our current needs; sometimes it's even harder to troubleshoot the redundancy failures than the actual failures. We have 2 identical servers running kamailio and listening to the same ip

Re: [SR-Users] ndb_redis module fails after a while

2012-01-13 Thread Javier Gallart
-localhost:6379 (CLOSE_WAIT) kamailio 13382 kamailio4u IPv4 58693 0t0 TCP localhost:35007-localhost:6379 (CLOSE_WAIT) Regards Javi On Fri, Jan 13, 2012 at 9:35 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 1/13/12 8:00 AM, Javier Gallart wrote: Hi all I have

[SR-Users] ndb_redis module fails after a while

2012-01-12 Thread Javier Gallart
Hi all I have started making some tests with the ndb_redis module. So far we have not stressed the module (no more than 5 HGET commands/second at maximum). It works well, but with at some point it starts failing. The failures are easily found because the logs always show this: INFO: core

Re: [SR-Users] Kamailio v3.2.0 Development Guide published

2011-11-29 Thread Javier Gallart
Daniel, This is great! Thanks a lot for it, it will help third-party contributors enormously. -- Alex I agree, excellent document, thank you -though I must say that, not being a developer, I understood very little :) -. Regards Javi ___

[SR-Users] Access to multivalue responses in ndb_redis

2011-11-18 Thread Javier Gallart
Hello do you know if it's possible to access the different values in a complex response using ndb_redis? For instance: ZREVRANGE key 0 -1 1) 123456 2) 123 3) 1 I'd like to store the first value (123456); is it possible? Thanks in advance Javi ___ SIP

Re: [SR-Users] mtree on db Berkeley DB?

2011-11-17 Thread Javier Gallart
Hi Daniel On Thu, Nov 17, 2011 at 8:03 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 11/16/11 12:45 PM, Javier Gallart wrote: [...] All the data in Redis stays in memory, you can dump periodic snapshots to disk. Some time ago they worked in a feature called disktore

Re: [SR-Users] mtree on db Berkeley DB?

2011-11-16 Thread Javier Gallart
Hi On Wed, Nov 16, 2011 at 8:13 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 11/15/11 10:09 PM, Javier Gallart wrote: Hello coming back to the topic related to mtree, to be able to set values via mi/rpc -- it won't be that difficult to add such functionality

Re: [SR-Users] mtree on db Berkeley DB?

2011-11-15 Thread Javier Gallart
Hello coming back to the topic related to mtree, to be able to set values via mi/rpc -- it won't be that difficult to add such functionality. Usually with a tree is mainly reading, due to fast matching on tree indexing. The question is how many times/often do you need to change values and

Re: [SR-Users] mtree on db Berkeley DB?

2011-11-14 Thread Javier Gallart
Hello very interesting issue actually...the mtree module fits perfectly well in a key-value model becaue basically is what the mtree table structure defines; that's why redis was the first thing that came to my mind when I saw the redis module. Two problems with redis: -no native mt_match

Re: [SR-Users] mtree on db Berkeley DB?

2011-11-12 Thread Javier Gallart
On 11/11/11 7:50 PM, Javier Gallart wrote: Hi list we've been happily using the mtree module for months now. Lately the size of the tree has grown a lot. The mtree table needs to be fully repopulated and reloaded several times a day, and we are looking for a fastest mechanism (for populating

[SR-Users] mtree on db Berkeley DB?

2011-11-11 Thread Javier Gallart
Hi list we've been happily using the mtree module for months now. Lately the size of the tree has grown a lot. The mtree table needs to be fully repopulated and reloaded several times a day, and we are looking for a fastest mechanism (for populating the table, I guess the reload time does not

Re: [SR-Users] Kamailio v3.2.0 Released - new major version is

2011-10-19 Thread Javier Gallart
Hello congratulations to all the people who has contributed! I'm looking forward to try it out, some of the new features look really promising... Regards Javi -- Message: 2 Date: Tue, 18 Oct 2011 20:30:22 +0200 From: Daniel-Constantin Mierla mico...@gmail.com

Re: [SR-Users] mtree question

2011-08-15 Thread Javier Gallart
and or transformations...)... Being able to use avp (o xavp) would be a nice addition to the modue. Regards Javi On Mon, Aug 15, 2011 at 5:55 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, some more comments/confirmations: On 8/12/11 11:31 PM, Javier Gallart wrote: Hi Juha based on my

Re: [SR-Users] mtree question

2011-08-12 Thread Javier Gallart
Hi Juha based on my experience with the mtree module: -mt_match() will match the longest prefix in the tree, in your case 00358 -mt_ignore_duplicates makes sense when loading the data in the DB to the memory. There could be duplicate entries in the db and with that directive you tell kamailio

Re: [SR-Users] Dialog module question

2011-06-28 Thread Javier Gallart
Thanks Timo it looks really promising! I'll stay tuned for upcoming annoucements... Regards Javi On Tue, Jun 28, 2011 at 7:34 PM, Timo Reimann timo.reim...@1und1.de wrote: Hey Javier, On 28.06.2011 17:53, Javier Gallart wrote: I have little experience with the dialog module -so sorry

Re: [SR-Users] sr-users Digest, Vol 73, Issue 40

2011-06-16 Thread Javier Gallart
Hello not sure what you want to accomplish, but in case it might help this is how we use the mtree module. Our 3 columns are: partition, prefix, route Partition is just a name that defines a group, this is done inside the script before calling mt_match (via a table lookup for instance). Let's say

Re: [SR-Users] Use of mtree module having multiple trees in the same table

2011-06-16 Thread Javier Gallart
Hello not sure what you want to accomplish, but in case it might help this is how we use the mtree module. Our 3 columns are: partition, prefix, route Partition is just a name that defines a group, this is done inside the script before calling mt_match (via a table lookup for instance). Let's say

Re: [SR-Users] no private memory left after mi mt_reload command

2011-02-28 Thread Javier Gallart
February 2011, Javier Gallart wrote: we are currently doing it looking for error messages in the logs, and it´s ok, but since the request is processed by the kamailio routing script via the xmlrpc module with the dispatch_rpc() command , I was wondering if there could be a way to check

[SR-Users] no private memory left after mi mt_reload command

2011-02-21 Thread Javier Gallart
Hi all we are running kamailio 3.1.1. Basically for every call it has to query a mtree that is reloaded every 15 minutes. The mtree table is about 4M records and is stored in a Pgostgres database. For the reload we use the command mi mt_reload embedded in a xmlrpc request. The code for this is:

Re: [SR-Users] no private memory left after mi mt_reload command

2011-02-21 Thread Javier Gallart
Thanks Henning, I'll go with to recompile option and post the results... Regards Javier 2011/2/21 Henning Westerholt henning.westerh...@1und1.de On Monday 21 February 2011, Javier Gallart wrote: we are running kamailio 3.1.1. Basically for every call it has to query a mtree

Re: [SR-Users] Reconnection to db

2011-01-19 Thread Javier Gallart
fetching it. If you can try again and report, would be appreciated. Thanks, Daniel On 1/18/11 11:34 AM, Javier Gallart wrote: Hi Daniel I tested the patch but the mtree module fails to start: Jan 18 04:15:55 kam-test ./kamailio[4616]: DEBUG: core [db.c:202]: using db bind api

Re: [SR-Users] Reconnection to db

2011-01-18 Thread Javier Gallart
the query, attempting to reconnect then. Let me know if works now. Cheers, Daniel On 1/16/11 6:17 PM, Javier Gallart wrote: Hi Daniel, I'm using postgres 8.4 at the server and libpq5 library for the client. I've been testing again and the problem is that after a db restart (no matter

Re: [SR-Users] Reconnection to db

2011-01-16 Thread Javier Gallart
:15 AM, Javier Gallart wrote: Hi Daniel this is my test: 1- Kamailio starts and correctly loads the mtree 2- I make whatever modification in the tree and reload with mt_reload Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:153]: sending query ok: 0x92f880

Re: [SR-Users] Reconnection to db

2011-01-14 Thread Javier Gallart
the log messages (debug=3) for that moment (restart of pg server and making a new call/registration)? Daniel On 1/13/11 12:00 PM, Javier Gallart wrote: Hi Daniel I have just tested it and I'm getting the same results. This is the kamailio version I'm testing: root@kam-test:/usr/local

Re: [SR-Users] Reconnection to db

2011-01-13 Thread Javier Gallart
Hi Daniel I have just tested it and I'm getting the same results. This is the kamailio version I'm testing: root@kam-test:/usr/local/kamailio/sbin# ./kamailio -V version: kamailio 3.2.0-dev2 (x86_64/linux) 35568f Thanks! Javi On Tue, Jan 4, 2011 at 3:46 PM, Javier Gallart jgalla...@gmail.com

Re: [SR-Users] sr-users Digest, Vol 68, Issue 7

2011-01-04 Thread Javier Gallart
: [SR-Users] Reconnection to db To: sr-users@lists.sip-router.org Message-ID: 4d2350bc.8080...@evaristesys.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 01/04/2011 09:46 AM, Javier Gallart wrote: Hi list we have been testing the mtree module. We do periodical reloads

Re: [SR-Users] Segmentation fault when loading dialplan

2010-12-06 Thread Javier Gallart
Hello I haven't been able to fix this problem yet. Has anyone run into a similar issue? Thanks Javi On Sun, Nov 28, 2010 at 5:39 PM, Javier Gallart jgalla...@gmail.com wrote: Hi as you say, it also works for me in a 32b architechture (same kamailio version,db drivers, insert command

Re: [SR-Users] Segmentation fault when loading dialplan

2010-12-06 Thread Javier Gallart
dialplan on such arch many times with older releases. Btw, can you paste the list of loaded modules in the config? Just to see which ones are using connection to db. Cheers, Daniel Thanks Javi On Sun, Nov 28, 2010 at 5:39 PM, Javier Gallart jgalla...@gmail.comwrote: Hi as you say

[SR-Users] Settings adjustments

2010-11-29 Thread Javier Gallart
Hello I have a Kamailio acting as Redirect server. In some cases I need to include more that 12 Contact headers in the 302 message. I've set these values in the config.h file. #define MAX_BRANCHES20 /*! maximum number of branches per transaction */ #define MAX_REDIRECTION_LEN

Re: [SR-Users] Settings adjustments

2010-11-29 Thread Javier Gallart
Hi thanks for the reply, I will try with those values... Javi On Mon, Nov 29, 2010 at 6:24 PM, Alex Balashov abalas...@evaristesys.comwrote: On 11/29/2010 11:57 AM, Javier Gallart wrote: Could these settings cause any collateral damage? Not really. They will result in increased memory

Re: [SR-Users] Segmentation fault when loading dialplan

2010-11-27 Thread Javier Gallart
, Javier Gallart wrote: Hi Daniel sorry but I'm deeply ignorant of gdb, this is what I get when I try to run it: use gdb for the core file: gdb /path/to/kamailio /path/to/corefile Then do the commands I sent. Cheers, Daniel gdb --args ./kamailio -f ../etc/kamailio/kamailio.cfg

Re: [SR-Users] Segmentation fault when loading dialplan

2010-11-26 Thread Javier Gallart
libthread_db enabled] Cannot find new threads: generic error Regards Javi On Thu, Nov 25, 2010 at 10:55 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: On 11/25/10 4:54 PM, Javier Gallart wrote: Hi Daniel I completely reinstalled the OS and installed the latest kamailio git, but the problem

Re: [SR-Users] Segmentation fault when loading dialplan

2010-11-26 Thread Javier Gallart
Hi Daniel no core files are generated after the last upgrade... Javi On Fri, Nov 26, 2010 at 12:32 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 11/26/10 12:12 PM, Javier Gallart wrote: Hi Daniel sorry but I'm deeply ignorant of gdb, this is what I get when I try

Re: [SR-Users] db_flatstore not loading

2010-11-25 Thread Javier Gallart
upon addition of implementation for DB API v2. I had no test framework for it, let me know if it works. Thanks, Daniel On 11/24/10 6:50 PM, Javier Gallart wrote: Hi I'd like to test db_flatstore module at 3.1 to write accounting data. The module is not loading though. The config is really

Re: [SR-Users] Segmentation fault when loading dialplan

2010-11-25 Thread Javier Gallart
The architechture details are: Ubuntu 10.04.1 LTS \n \l Linux kam-test 2.6.32-24-server #39-Ubuntu SMP Wed Jul 28 06:21:40 UTC 2010 x86_64 GNU/Linux Regards Javi On Wed, Nov 24, 2010 at 11:18 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 11/23/10 12:36 PM, Javier Gallart wrote

[SR-Users] db_flatstore not loading

2010-11-24 Thread Javier Gallart
Hi I'd like to test db_flatstore module at 3.1 to write accounting data. The module is not loading though. The config is really simple: loadmodule db_flatstore.so modparam(acc, db_url, flatstore:/var/log/kamailio/cdr) I'm getting this error: 0(27360) DEBUG: core [sr_module.c:631]:

[SR-Users] Segmentation fault when loading dialplan

2010-11-22 Thread Javier Gallart
Hello I'd like to do some tests with the dialplan module, but Kamailio is crashing when it loads it. Actually the module is properly loaded if the table is empty, but it fails when a row is added; so I guess it's related with the way I've inserted the values. A core file is generated: Core was

Re: [SR-Users] Drouting usage

2010-10-26 Thread Javier Gallart
specific than Re: Contents of sr-users digest... Today's Topics: 1. Drouting usage (Javier Gallart) 2. PSTN call (michel freiha) 3. Re: Drouting usage (marius zbihlei) 4. bflag under failure_route (kamailio 1.5) (I?aki Baz Castillo) 5. Re: bflag under failure_route (kamailio 1.5

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

2010-10-15 Thread Javier Gallart
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:passw...@localhost :5432

[SR-Users] getting unexpected values from htable

2010-10-14 Thread Javier Gallart
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:passw...@localhost :5432/database) modparam(htable, htable,