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 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

[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 star

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 > Subject: [SR-Users] Improving Kamailo configuration parser ... > To: kamailio users > Message-ID: >

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

2012-02-17 Thread Javier Gallart
On Fri, Feb 17, 2012 at 3:11 PM, Uri Shacked 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: > >>

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

2012-02-17 Thread Javier Gallart
RROR: ndb_redis [redis_client.c:246]: error communicating with redis server [redis1] (127.0.0.1:6379/0): Connection refused After recovering the redis server everything works as expected again. Regards Javi > Thanks, > Daniel > > > > On 2/17/12 1:13 PM, Javier Gallart wrote: > > Hi D

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

2012-02-17 Thread Javier Gallart
HI Daniel On Fri, Feb 17, 2012 at 1:44 PM, Daniel-Constantin Mierla wrote: > Hello, > > > On 2/17/12 1:04 PM, Javier Gallart wrote: > > Hi Daniel, > > no, in order to find the best match we do a manual trick using > the s.prefixes transformation (I think you sugg

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: [main.c:751]: child process 23819 exited by a signal 11 Feb 17 06:33:32 r-gate-test ./kamailio[23812]

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

2012-02-17 Thread Javier Gallart
wrote: > 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 m

Re: [SR-Users] How to do request URI rewrites using database tables

2012-02-16 Thread Javier Gallart
Hello Ben dialplan module should help you: http://kamailio.org/docs/modules/3.2.x/modules/dialplan.html Regards Javi > -- > > Message: 5 > Date: Fri, 17 Feb 2012 12:49:04 +1300 > From: Ben WIlliams > Subject: Re: [SR-Users] How to do request URI rewrites using data

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

2012-02-16 Thread Javier Gallart
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 a hash like this: tname tprefix tvalue. If you do a hget nts $avp(DID) and you get a not null value you have found your exact match. It works very well for me and the time

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-16 Thread Javier Gallart
Hi Daniel On Mon, Jan 16, 2012 at 9:47 AM, Daniel-Constantin Mierla wrote: > Hello, > > > On 1/13/12 12:27 PM, Javier Gallart wrote: > > Hi Daniel > > both values are null. > > ok, could be a hint that the connection is down and try a reconnect... >

Re: [SR-Users] sr-users Digest, Vol 80, Issue 49

2012-01-16 Thread Javier Gallart
Hello Yaron can you try "mi mt_reload"? Regards Javi > > Message: 2 > Date: Mon, 16 Jan 2012 11:54:04 +0200 > From: Yaron Nachum > Subject: [SR-Users] using XMLRPC module for fifo commands > To: sr-users@lists.sip-router.org > Message-ID: > > > Content-Type: text/plain; charset="iso-88

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

2012-01-13 Thread Javier Gallart
gt;localhost:6379 (CLOSE_WAIT) kamailio 13381 kamailio4u IPv4 58691 0t0 TCP localhost:35006->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-Co

[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: [main.c:811]

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 __

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 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 worke

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 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 dif

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

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

2011-11-15 Thread Javier Gallart
Hi Daniel sound like a good idea, thanks for the tip Regards Javi On Tue, Nov 15, 2011 at 9:59 AM, Daniel-Constantin Mierla wrote: > Hello, > > > On 11/14/11 3:24 PM, Javier Gallart wrote: > > Hello > > very interesting issue actually...the mtree module fits p

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 functi

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

2011-11-12 Thread Javier Gallart
heers, > Daniel > > > > > 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 reloade

[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 depe

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 > Subject: [SR

Re: [SR-Users] mtree question

2011-08-15 Thread Javier Gallart
ops 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 wrote: > Hello, > > some more comments/confirmations: > > > On 8/12/11 11:31 PM, Javier Gallart wrote:

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 how

Re: [SR-Users] 10 years of SER - statistics

2011-08-02 Thread Javier Gallart
Hi Daniel a few numbers here...we use Kamailio in a carrier environment (no subscribers, no nat...), basically as proxy and redirect server. We use it in production and also as one of the foundations of other features still under development. As a redirect server, on average it handles around 600k

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 wrote: > Hey Javier, > > > On 28.06.2011 17:53, Javier Gallart wrote: > > I have little experience with the dialog

[SR-Users] Dialog module question

2011-06-28 Thread Javier Gallart
Hello I have little experience with the dialog module -so sorry if the quesiton is silly-, and I was wondering if I could use it for doing accounting (acc works just fine, but I was looking for a unique stop record that includes all the call information). The basic idea would be to assign the init

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] 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] no private memory left after mi mt_reload command

2011-02-28 Thread Javier Gallart
te: > On Friday 25 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 wa

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

2011-02-25 Thread Javier Gallart
same script. Regards Javi 2011/2/24 Henning Westerholt > On Wednesday 23 February 2011, Javier Gallart wrote: > > I've upgraded to 3.1.2 and compiled with the DEFS+= -DMI_SYSTEM_MALLOC > > option. Looking good so far. Any thoughts about my second question, that > >

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

2011-02-23 Thread Javier Gallart
avier Gallart wrote: > Thanks Henning, > > I'll go with to recompile option and post the results... > > Regards > > Javier > > 2011/2/21 Henning Westerholt > > On Monday 21 February 2011, Javier Gallart wrote: >> > we are running kamailio 3.1.1. Basically

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 > 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 that is reloa

[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: r

Re: [SR-Users] Reconnection to db

2011-01-19 Thread Javier Gallart
ns and will be reported when > 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:1

Re: [SR-Users] Reconnection to db

2011-01-18 Thread Javier Gallart
ter doing actually 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 bee

Re: [SR-Users] Reconnection to db

2011-01-16 Thread Javier Gallart
ee if the client side loses somehow connection parameters due to long time > unconnected. > > Cheers, > Daniel > > > On 1/14/11 11:15 AM, Javier Gallart wrote: > > Hi Daniel > > > this is my test: > > 1- Kamailio starts and correctly loads the mtree > 2-

Re: [SR-Users] Reconnection to db

2011-01-14 Thread Javier Gallart
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:

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 wrote:

Re: [SR-Users] Reconnection to db

2011-01-12 Thread Javier Gallart
and feature, since the parameter existed in the module (nameed retries), > but was implemented only for DB API v2, so it can be backported to be also > available for DB API v1 (which is the one used by kamailio modules right > now). > > Thanks, > Daniel > > On 1/4/11 5:54 PM,

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

2011-01-04 Thread Javier Gallart
bject: Re: [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 bee

[SR-Users] Reconnection to db

2011-01-04 Thread Javier Gallart
Hi list we have been testing the mtree module. We do periodical reloads of the mtree table with the "mi mt_reload" command through xmlrpc. It works fine except when the db is restarted. If we manually restart the db and then try the mt_reload commands we get this error: Jan 4 09:13:17 server /usr

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

2011-01-03 Thread Javier Gallart
Thanks Juha...that was it. Regards Javi On Mon, Jan 3, 2011 at 4:37 PM, Juha Heinanen wrote: > Javier Gallart writes: > > > ,whereas the mi command output is: > > sercmd> mi dp_translate 1 "01123456789" > > try > >

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

2011-01-03 Thread Javier Gallart
ok for you. It was a 32b to 64b issues > with a parameter given to pcre library (the reason didn't reproduce on my > system). > > Cheers, > Daniel > > > On 12/6/10 12:47 PM, Javier Gallart wrote: > > Hi Daniel > > it's a clean 64 bit instalallation.

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

2010-12-06 Thread Javier Gallart
ot;htable.so" loadmodule "db_flatstore.so" loadmodule "uac_redirect.so" loadmodule "dialplan.so" loadmodule "auth.so" loadmodule "auth_db.so" loadmodule "permissions.so" Regards Javi On Mon, Dec 6, 2010 at 11:59 AM, Daniel-Constantin

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 wrote: > Hi > > as you say, it also works for me in a 32b architechture (same kamailio > version,db drivers, insert comma

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 wrote: > On 11/29/2010 11:57 AM, Javier Gallart wrote: > > Could these settings cause any "collateral damage"? >> > > Not really. They will result

[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] Segmentation fault when loading dialplan

2010-11-28 Thread Javier Gallart
gt; > On 11/27/10 9:32 AM, Javier Gallart wrote: > > Hi > > sorry if i didn't make myself clear. It's not starting and no core files > are generated either. The startup logs are at http://pastebin.ca/2002031 > > be sure you do: > > ulimit -c unlimited > &

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

2010-11-27 Thread Javier Gallart
Hi sorry if i didn't make myself clear. It's not starting and no core files are generated either. The startup logs are at http://pastebin.ca/2002031 best regards javi On Fri, Nov 26, 2010 at 7:56 PM, Daniel-Constantin Mierla wrote: > Hello, > > > On 11/26/10 4:30 PM

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

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

2010-11-26 Thread Javier Gallart
o/lib/kamailio/modules/ [Thread debugging using 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

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

2010-11-25 Thread Javier Gallart
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

Re: [SR-Users] db_flatstore not loading

2010-11-25 Thread Javier Gallart
ules was no longer exported > 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.

[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: [sr_module.c:631]: find_export

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

2010-11-23 Thread Javier Gallart
e these days. > > Can you add a second rule and see what happens? At the first sight of the > debug messages, the result from database is ok, should not be a null value > there. > > Cheers, > Daniel > > > On 11/23/10 10:38 AM, Javier Gallart wrote: > > Thanks Dani

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

2010-11-23 Thread Javier Gallart
Thanks Daniel you can find both the gdb and ./kamailio output at http://pastebin.ca/1999786 <http://pastebin.ca/1999786>Regards Javier On Mon, Nov 22, 2010 at 10:19 PM, Daniel-Constantin Mierla < mico...@gmail.com> wrote: > Hello, > > > On 11/22/10 5:32 PM, Javier

[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 ge

Re: [SR-Users] Drouting usage

2010-10-26 Thread Javier Gallart
Subject line so it is more 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_rout

[SR-Users] Drouting usage

2010-10-25 Thread Javier Gallart
Hello sorry if this sounds too "newbie". I'm interested in the drouting module. The first INVITE is correctly forwarded to the gw foudn in the drouting table: if (is_method("INVITE") && !has_totag()) { do_routing("0"); record_route(); } However for subsequen

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

[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",