Re: [SR-Users] load 2 500 000 rows from dialplan

2015-09-24 Thread Javi Gallart

Hello


On 24/09/15 11:06, Никитенко Виталий wrote:

Hi!
I have kamailio-4.2.3. And in table dialplan there is 2 500 000 rows. When i 
started kamailio i see error

ERROR: dialplan [dp_repl.c:74]: repl_exp_parse(): out of shm memory
ERROR: dialplan [dp_db.c:393]: build_rule(): failed to compile replacing 
expression
ERROR: dialplan [dp_db.c:111]: init_db_data(): failed to load database data
ERROR: dialplan [dialplan.c:188]: mod_init(): could not initialize data
ERROR:  [sr_module.c:968]: init_mod(): Error while initializing module 
dialplan (/usr/local/lib64/kamailio/modules/dialplan.so)

then i set modparam("dialplan", "fetch_rows", 250) and started kamailio i 
see

ERROR: db_mysql [km_dbase.c:422]: db_mysql_fetch_result(): no memory left
ERROR: dialplan [dp_db.c:231]: dp_load_db(): failed to fetch
ERROR: dialplan [dp_db.c:111]: init_db_data(): failed to load database data
ERROR: dialplan [dialplan.c:188]: mod_init(): could not initialize data
ERROR:  [sr_module.c:968]: init_mod(): Error while initializing module 
dialplan (/usr/local/lib64/kamailio/modules/dialplan.so)

Please say me how i can load to memory 250 rows dialplan?

/usr/local/kamailio/sbin/kamailio -h | grep '\-[mM]'
-m nrSize of shared memory allocated in Megabytes
-M nrSize of private memory allocated, in Megabytes

In you particular case, you need more shared memory (-M).

Regards

Javi

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] SIPCapture and Message Queues

2015-07-17 Thread Javi Gallart

Hello,

I haven't tested it, but the Kazoo module provides you with an AMQP 
connector the allows you to publish messages to RabbitMQ. Would that 
work for you?


Javi


On 16/07/15 12:52, Grant Bagdasarian wrote:


Hello,

Would it be possible to send the messages captured by the sipcapture 
module to a message queue instead of inserted directly into  a database?


Be it DMQ or SQL Server Service Broker Queues, etc.

Or maybe another approach, executing a stored procedure instead of an 
insert statement?


I couldn’t find a way to accomplish this, but maybe someone has a 
brilliant idea how to accomplish any of the above.


Regards,

Grant



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] is_present_hf error on select

2015-03-30 Thread Javi Gallart

Hi
On 27/03/15 16:37, Kyle Kurz wrote:
Thanks guys, that worked. Follow-up question, I want to reroute the 
incoming packet to the sip URI in that header, but Kamailio is 
complaining about the use of a variable in t_relay_to_udp. Putting 
$var(b) in quotes just makes it try to use that literal string as the 
target host. Is there another way to accomplish this?

you could set $ru to the desired value, and the call t_relay().

Regards

Javi


$var(a) =$hdr(X-Digium-AppServer-Response-URI);
$var(b) =$(var(a){s.strip,4});
if (!t_relay_to_udp($var(b), 5060)) {
 sl_reply_error();
}

Thanks,
Kyle


On Fri, Mar 27, 2015 at 8:21 AM, Javi Gallart 
jgall...@systemonenoc.com mailto:jgall...@systemonenoc.com wrote:


Hi
On 27/03/15 16:09, Kyle Kurz wrote:

I'm trying to use the is_present_hf function to detect the
presence of a user-defined header and getting the following
errors in my Kamailio logs:

2(12149) BUG: core [select.c:426]: run_select(): Select
structure has not been resolved
2(12149) ERROR: core [lvalue.c:416]: lval_assign(): assignment
failed at pos: (99,58-99,58)
2(12149) ERROR: script:

A quick Google search yielded no results for why this could be
happening. Originally, I had my code in route[REPLY], but noticed
that was not one of the paths it was listed as available in the
textops document, so I moved it to request_route, but got the
same errors. Does anyone have any feedback on how to move
forward? My code snippet is below:

if (is_present_hf(X-Digium-AppServer-Response-URI)) {
 $var(a) = @hf_value.X_Digium_AppServer_Response_URI[1];
 xlog (\n\nHERE RESPONSE URI $var(a)\n\n);
}


Apparently the syntax for accessing the header is not correct.
@hf_value will look for a global variable with that name. Try with
$hdr().


http://www.kamailio.org/wiki/cookbooks/4.2.x/pseudovariables#hdr_name_-_headers

Regards

Javi


Thanks,
Kyle

-- 


*Kyle Kurz*
Digium, Inc. · Senior Software Engineer
9115 Brown Deer Rd · San Diego, CA 92121 · US
direct +1 858.537.1166
Check us out at: http://digium.com http://digium.com/ ·
http://asterisk.org http://www.asterisk.org/


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org  mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




--

*Kyle Kurz*
Digium, Inc. · Senior Software Engineer
9115 Brown Deer Rd · San Diego, CA 92121 · US
direct +1 858.537.1166
Check us out at: http://digium.com http://digium.com/ · 
http://asterisk.org http://www.asterisk.org/



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] is_present_hf error on select

2015-03-27 Thread Javi Gallart

Hi
On 27/03/15 16:09, Kyle Kurz wrote:
I'm trying to use the is_present_hf function to detect the presence of 
a user-defined header and getting the following errors in my Kamailio 
logs:


2(12149) BUG: core [select.c:426]: run_select(): Select structure 
has not been resolved
2(12149) ERROR: core [lvalue.c:416]: lval_assign(): assignment 
failed at pos: (99,58-99,58)

2(12149) ERROR: script:

A quick Google search yielded no results for why this could be 
happening. Originally, I had my code in route[REPLY], but noticed that 
was not one of the paths it was listed as available in the textops 
document, so I moved it to request_route, but got the same errors. 
Does anyone have any feedback on how to move forward? My code snippet 
is below:


if (is_present_hf(X-Digium-AppServer-Response-URI)) {
 $var(a) = @hf_value.X_Digium_AppServer_Response_URI[1];
 xlog (\n\nHERE RESPONSE URI $var(a)\n\n);
}

Apparently the syntax for accessing the header is not correct. @hf_value 
will look for a global variable with that name. Try with $hdr().


http://www.kamailio.org/wiki/cookbooks/4.2.x/pseudovariables#hdr_name_-_headers

Regards

Javi


Thanks,
Kyle

--

*Kyle Kurz*
Digium, Inc. · Senior Software Engineer
9115 Brown Deer Rd · San Diego, CA 92121 · US
direct +1 858.537.1166
Check us out at: http://digium.com http://digium.com/ · 
http://asterisk.org http://www.asterisk.org/



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] lua_run seems to be working in asynchronous way

2015-03-09 Thread Javi Gallart

Hi

we have a similar setup; within a lua_run call several avp are assgined; 
and I see no different behaviour in 4.2.2 than in other versions (we run 
4.2.1 in production): avp_print() shows the correct values.


Regards

Javi

On 06/03/15 09:48, José Seabra wrote:

Hi Javi
Thank you for your reply,
Yes i don't have avp ready after lua_run, i use avp_print(); after 
lua_run, but it prints the avp's only when the kamailio sent invite, 
this is weird, and what is more weird is that i have another kamailio 
instance connected to same redis and with same setup, and i don't see 
this behavior there.


Thank you
Best regards

2015-03-06 8:47 GMT+00:00 José Seabra joseseab...@gmail.com 
mailto:joseseab...@gmail.com:


Hi Javi
Thank you for your reply,
Yes i don't have avp ready after lua_run, i use avp_print(); after
lua_run, but it prints the avp's only when the kamailio sent
invite, this is weird, and what is more weird is that i have
another kamailio instance connected to same redis and with same
setup, and i do see this behavior there.

Thank you
Best regards

2015-03-06 8:13 GMT+00:00 Javi Gallart jgall...@systemonenoc.com
mailto:jgall...@systemonenoc.com:

Hello

do you mean that the avp you assign inside the lua scripts are
not yet ready after lua_run? What do you obtain if you print
their values?

Regards

On 06/03/15 00:20, José Seabra wrote:

Hi there,
I'm using kamailio version 4.2.2 to a short time, and I'm
using lua scripts to build some avps with information needed
to make calls(lua functions uses redis as source data to
build avp data.), what i have noticed today making some tests
is that when i make a call my lua function:
if(!lua_run(get_prefs,$fU,$fd))
{
xdbg(SCRIPT: failed to execute lua function!\n);
}

kamailio gets the avp's after send the invite to the
destine,(the invite will fail because kamailio needs avp
information).
it seems that kamailio calls the lua_run in asynchronous way,
i never noticed that before in old version. is that a normal
behavior or it is an issue in this version?

Best Regards
-- 
Cumprimentos

José Seabra


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org  mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
mailing list
sr-users@lists.sip-router.org
mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




-- 
Cumprimentos

José Seabra




--
Cumprimentos
José Seabra


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] lua_run seems to be working in asynchronous way

2015-03-06 Thread Javi Gallart

Hello

do you mean that the avp you assign inside the lua scripts are not yet 
ready after lua_run? What do you obtain if you print their values?


Regards
On 06/03/15 00:20, José Seabra wrote:

Hi there,
I'm using kamailio version 4.2.2 to a short time, and I'm using lua 
scripts to build some avps with information needed to make calls(lua 
functions uses redis as source data to build avp data.), what i have 
noticed today making some tests is that when i make a call my lua 
function:

if(!lua_run(get_prefs,$fU,$fd))
{
xdbg(SCRIPT: failed to execute lua function!\n);
}

kamailio gets the avp's after send the invite to the destine,(the 
invite will fail because kamailio needs avp information).
it seems that kamailio calls the lua_run in asynchronous way, i never 
noticed that before in old version. is that a normal behavior or it is 
an issue in this version?


Best Regards
--
Cumprimentos
José Seabra


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ndb_redis set null reply to EXISTS query

2015-03-05 Thread Javi Gallart
Unless you send the relevant part of your configuration and of the 
restults the tests I proposed it is really diificult to provide more 
detailed advice. For instance, is your redis instance in the same 
machine as Kamailio? Are you using unix sockets or tcp sockets? Can you 
run kamailio in debig mode to see any potentially helpful message?


Javi
On 06/03/15 08:04, Yuriy Gorlichenko wrote:
arrives kamailio stil disconnects from redis.  Haw can I debug this 
deeper?



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ndb_redis set null reply to EXISTS query

2015-02-27 Thread Javi Gallart

Hello

I ignore your setup, a few tips that can help you to narrow down the 
problem:


-Make sure your kamailio is connected to redis: 'redis-cli info | grep 
connected_clients' should show a number bigger than the number of 
kamailio children


-Print with xlog the value of $si before calling redis_cmd

-At the redis prompt (redis-cli) type the command EXISTS x, with x being 
the value of $si. If that gives you a 1 it means that the key exists, 
otherwise you need to create it.


-Pritn the values of $redis(s=type), $redis(s=value) after calling 
redis_cmd


-With redis-cli monitor you are goign to see all the commands sent to redis

Javi
On 27/02/15 14:30, Yuriy Gorlichenko wrote:

What type of info can I provide for deeper analys of this situation?

2015-02-27 14:34 GMT+03:00 Javi Gallart jgall...@systemonenoc.com 
mailto:jgall...@systemonenoc.com:


Hello
On 27/02/15 11:58, Yuriy Gorlichenko wrote:

at the monitor I see nothing about this request

It's difficult to say without further information, but for some
reason your command is not hitting redis, probably because the
connection is down.

Javi



2015-02-27 13:21 GMT+03:00 Yuriy Gorlichenko ovoshl...@gmail.com
mailto:ovoshl...@gmail.com:

Now I see that null values recieved after I see this at
kamailio log

redisc_exec(): Redis error: Server closed the connection


2015-02-27 12:45 GMT+03:00 Javi Gallart
jgall...@systemonenoc.com mailto:jgall...@systemonenoc.com:

Hello,
check out http://redis.io/commands/monitor
It will help you to determine the exact command that
kamailio is delivering to the server when you execute the
redis_cmd(...) function inside the script.
For a non null reply, yo will need a key in redis with
the same value as $si.

Javi

On 27/02/15 10:04, Yuriy Gorlichenko wrote:

I will try. I new at redis. Does cli monitor get resul
of kamailio request at the cli?

2015-02-27 11:38 GMT+03:00 Javi Gallart
jgall...@systemonenoc.com
mailto:jgall...@systemonenoc.com:

Hello

can you check with redis-cli monitor what is the
command sent to Redis in that case?

Javi
On 27/02/15 09:15, Yuriy Gorlichenko wrote:

Hello I try to get some replies from redis. Time
after time redis request give me null result. But
redis bs not disconnected.

This happens only with websocket endpoints. My
queries is:

redis_cmd(srv1, EXISTS $si, s);

So at xLOG i see that $si correctly sended, but
result is null. At db I keep key IP with value
TIMESTAMP

Intresting that route, that givesme this result
idependend of WS or UDP endpoint. IT does not know
about it anything.


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users 
mailing list
sr-users@lists.sip-router.org  
mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list
sr-users@lists.sip-router.org
mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
list
sr-users@lists.sip-router.org  
mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list
sr-users@lists.sip-router.org
mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users





___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org  mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER

Re: [SR-Users] ndb_redis set null reply to EXISTS query

2015-02-27 Thread Javi Gallart

Hello,
check out http://redis.io/commands/monitor
It will help you to determine the exact command that kamailio is 
delivering to the server when you execute the redis_cmd(...) function 
inside the script.
For a non null reply, yo will need a key in redis with the same value as 
$si.


Javi
On 27/02/15 10:04, Yuriy Gorlichenko wrote:
I will try. I new at redis. Does cli monitor get resul of kamailio 
request at the cli?


2015-02-27 11:38 GMT+03:00 Javi Gallart jgall...@systemonenoc.com 
mailto:jgall...@systemonenoc.com:


Hello

can you check with redis-cli monitor what is the command sent to
Redis in that case?

Javi
On 27/02/15 09:15, Yuriy Gorlichenko wrote:

Hello I try to get some replies from redis. Time after time redis
request give me null result. But redis bs not disconnected.

This happens only with websocket endpoints. My queries is:

redis_cmd(srv1, EXISTS $si, s);

So at xLOG i see that $si correctly sended, but result is null.
At db I keep key IP with value TIMESTAMP

Intresting that route, that givesme this result idependend of WS
or UDP endpoint. IT does not know about it anything.


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org  mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ndb_redis set null reply to EXISTS query

2015-02-27 Thread Javi Gallart

Hello

can you check with redis-cli monitor what is the command sent to Redis 
in that case?


Javi
On 27/02/15 09:15, Yuriy Gorlichenko wrote:
Hello I try to get some replies from redis. Time after time redis 
request give me null result. But redis bs not disconnected.


This happens only with websocket endpoints. My queries is:

redis_cmd(srv1, EXISTS $si, s);

So at xLOG i see that $si correctly sended, but result is null. At db 
I keep key IP with value TIMESTAMP


Intresting that route, that givesme this result idependend of WS or 
UDP endpoint. IT does not know about it anything.



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ndb_redis set null reply to EXISTS query

2015-02-27 Thread Javi Gallart

Hello
On 27/02/15 11:58, Yuriy Gorlichenko wrote:

at the monitor I see nothing about this request
It's difficult to say without further information, but for some reason 
your command is not hitting redis, probably because the connection is down.


Javi


2015-02-27 13:21 GMT+03:00 Yuriy Gorlichenko ovoshl...@gmail.com 
mailto:ovoshl...@gmail.com:


Now I see that null values recieved after I see this at kamailio log

redisc_exec(): Redis error: Server closed the connection


2015-02-27 12:45 GMT+03:00 Javi Gallart jgall...@systemonenoc.com
mailto:jgall...@systemonenoc.com:

Hello,
check out http://redis.io/commands/monitor
It will help you to determine the exact command that kamailio
is delivering to the server when you execute the
redis_cmd(...) function inside the script.
For a non null reply, yo will need a key in redis with the
same value as $si.

Javi

On 27/02/15 10:04, Yuriy Gorlichenko wrote:

I will try. I new at redis. Does cli monitor get resul of
kamailio request at the cli?

2015-02-27 11:38 GMT+03:00 Javi Gallart
jgall...@systemonenoc.com mailto:jgall...@systemonenoc.com:

Hello

can you check with redis-cli monitor what is the
command sent to Redis in that case?

Javi
On 27/02/15 09:15, Yuriy Gorlichenko wrote:

Hello I try to get some replies from redis. Time after
time redis request give me null result. But redis bs not
disconnected.

This happens only with websocket endpoints. My queries is:

redis_cmd(srv1, EXISTS $si, s);

So at xLOG i see that $si correctly sended, but result
is null. At db I keep key IP with value TIMESTAMP

Intresting that route, that givesme this result
idependend of WS or UDP endpoint. IT does not know about
it anything.


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
list
sr-users@lists.sip-router.org  
mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list
sr-users@lists.sip-router.org
mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org  mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
mailing list
sr-users@lists.sip-router.org
mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users





___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Help with dispatcher module

2013-04-08 Thread Javi Gallart

Hello

you may try to cast $var(y) to int using this transformation: 
http://www.kamailio.org/wiki/cookbooks/4.0.x/transformations#sint


Regards

Javi
On 04/09/2013 12:17 AM, julian arsanches wrote:

thanks for all support from the forum before hand.
i am having an issue with  my setup, i am trying to make the 
dispatcher dynamic by asigning a value from a variable, that variable 
is define on my dispatcher.lst but i am getting an error, if anyone 
can help thanks.


my config on the relay route
first i strip the prefix from my dial string, and set variable y with 
that code, then i strip it and dial it. but it does not work.

again thanks if anyone can helpme.



xlog( anrtes de strip   el r-uri($ru)($ru{s.substr,0,3})\n);


$var(x) = $ru;  # set varx as an string

$var(y)=$(var(x){s.substr,4,3}); #strip the first 3 digits to find 
my route




xlog(dsroute $var(y) my test ($ru)\n); #check for variables loaded

strip(3); # strip the prefix to  route to destinatio

xlog(despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el 
code ($var(y)\n); #check for loaded variables after strip



ds_select_dst($var(y), 4);#carrer dynamic don't  work variable 
is load propperly but  i get the following error

*
*
*##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: 
script: despues de strip time [Mon Apr  8 17:59:32 2013] method 
(ACK) r-uri (sip:54.236.192.19) 2nd via el code (54).  i see a the 
right code in the variable*
*##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: 
core [sr_module.c:1726]: Could not convert PV to int *



#ds_select_dst(097, 4);#statically define works

xlog(print el destination y el $var(y) ($du)($td) ($ru)\n);

   if (!t_relay_to_udp()) {

sl_reply_error();
};


exit;
}



dispatcher.lst

#lineformat
#setit(integer)destination(sipuri)flags(integer,optional)


#Asterisks

007 sip:1.1.1.1:5060 http://1.1.1.1:5060##route 1
024 sip:2.2.2.2:5060 http://2.2.2.2:5060  ##route 2
100 sip:1.1.1.100:5060 http://1.1.1.100:5060  ##route 100
103 sip:1.1.1.103:5060 http://1.1.1.103:5060  ###route 103



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to remove custom header after adding one

2013-02-24 Thread Javi Gallart
Hello

you may try to do the remove/add operations in each branch_route

Regards

Javi
-Original Message-
From: Mino Haluz mino.ha...@gmail.com
Sender: sr-users-boun...@lists.sip-router.org
Date: Sun, 24 Feb 2013 19:06:29 
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing Listsr-users@lists.sip-router.org
Reply-To: SIP Router - Kamailio \(OpenSER\) and SIP Express Router \(SER\) -
Users Mailing List sr-users@lists.sip-router.org
Subject: [SR-Users] How to remove custom header after adding one

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Use different flags in rtpproxy_manage() based on from which route its called

2012-11-11 Thread Javi Gallart

Hello

you can use uac module to generate sip requests from the config file:

http://kamailio.org/docs/modules/3.3.x/modules_k/uac.html#id2494432

Regards

Javi
On 11/11/2012 11:40 AM, Aft nix wrote:

On Fri, Nov 9, 2012 at 2:08 PM, Daniel-Constantin Mierla
mico...@gmail.com wrote:

Hello,


On 11/8/12 11:40 AM, Aft nix wrote:

snip

in route[NATMANAGE] you can see that there are some functions that help to
detect if a request or a reply is processed, respectively
is_request()/is_reply().


Thanks for the solution.

I'm thinking of setting up a kamailio lab in my lapto using VMs. Any
pointer on that how should i proceed?

If i have that i can check first hand these little things without
bothering others.

The lab should only be a place for testing kamailio features. nothing else.

How can i set it up without any sort of sip client?(Like can i use one
kamailio instance as sip client for
generating sip msgs?)


You can have if conditions and execute any of rtpproxy_*() functions with
different parameters.

Cheers,
Daniel


Thanks in advance.

--
-aft

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 -
http://asipto.com/u/katu




--
-aft

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Blacklist initialization

2012-10-30 Thread Javi Gallart
Hi Olle

What about doing the init stuff in event-route[htable:mod-init] ?

Regards

Javi


--Original Message--
From: Olle E. Johansson
Sender: sr-users-boun...@lists.sip-router.org
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
ReplyTo: SIP Router - Kamailio \(OpenSER\) and SIP Express Router \(SER\) - 
Users Mailing List
Subject: [SR-Users] Blacklist initialization
Sent: Oct 30, 2012 21:58

Hi!

I am looking for a way to add addresses to the IP blacklist in Kamailio at 
startup. Is that possible?

I know I can do it with sercmd, but I fail to find a documented way to do it in 
the configuration... Must be missing something simple.

Thank you for your help!

/O
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RTPProxy with kamailio : How to get calls count?

2012-09-14 Thread Javi Gallart

Hello


On 09/13/2012 07:09 PM, Mino Haluz wrote:

Thank you, setting ulimits worked! And the performance is the same as
stated in the document I mentioned! :)

One more thing, I found these errors in syslog:

Sep 13 18:38:18 perftest kamailio[5268]: ERROR: core
[parser/sdp/sdp.c:211]: Invalid payload location
Sep 13 18:38:18 perftest kamailio[5268]: ERROR: core
[parser/sdp/sdp.c:227]: Invalid payload location
Sep 13 18:38:18 perftest kamailio[5270]: ERROR: core
[parser/sdp/sdp.c:227]: Invalid payload location

This is possibly something related to my sipp scenario, this is the
INVITE sent from sipp

   ![CDATA[

 INVITE sip:8...@perftest.vm SIP/2.0
 Via: SIP/2.0/[transport] 10.0.2.36:[local_port];branch=[branch]
 From: 700 sip:500@10.0.2.36;tag=[call_number]
 To: sip:8...@perftest.vm
 Call-ID: [call_id]
 CSeq: 1 INVITE
 Contact: 700 sip:700@10.0.2.36:[local_port]
 Max-Forwards: 70
 Subject: Performance Test
 Content-Type: application/sdp
 Content-Length: [len]

v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] 10.0.2.36
s=-
c=IN IP[local_ip_type] 10.0.2.36
t=0 0
m=audio [auto_media_port] RTP/AVP 8
a=rtpmap:8 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11,16
I think this SDP body is not correctly built. There are attributes for a 
media format 101 that is not declared in the m= line.


Regards

Javi

]]

Do you see something that could cause this error ? Otherwise the call
is initiated ok, but I really dont understand what is so strange to
kamailio in this INVITE.

On Thu, Sep 13, 2012 at 6:37 PM, Peter Lemenkov lemen...@gmail.com wrote:

2012/9/13 Mino Haluz mino.ha...@gmail.com:

You mean on the proxy side? I'm running rtpproxy as root, limits are
still applied ? ulimit -s unlimited should do the trick ?

Yes, they usually applied even for superuser, and yes - this should
help (if that's the issue).


--
With best regards, Peter Lemenkov.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DROUTING nub question

2012-08-27 Thread Javi Gallart

Hi

maybe this would work. You have a mask like  (you choose 
the max length and the content). From the mask you extract as many 
digits as the length of your number with {s.substr,offset,length}, being 
length $(rU{s.len}}. Then you prepend the result to you $rU.


Hope it helps


Javi

On 08/28/2012 02:34 AM, Luis Fernando Urrea wrote:
I see there is a transformation to return the string value of an 
integer but I can't seem to find the opposite one.


{s.int http://s.int}
Return integer value of a string-represented number

On Mon, Aug 27, 2012 at 6:22 PM, Luis Fernando Urrea 
lfur...@simplecs.net mailto:lfur...@simplecs.net wrote:


Thanks Daniel,

That got me started, however, it seems that the return  value
from $(rU{s.len}) is actually an integer and therefore could not
be concatenated to $rU string ?

4(18194) ERROR: pv [pv_core.c:1798]: str value required to set
R-URI user
14(18194) ERROR: core [lvalue.c:354]: setting pvar failed
14(18194) ERROR: core [lvalue.c:407]: assignment failed at pos:
(906,8-906,25)
14(18194) ERROR: *** cfgtrace:
c=[/usr/local/etc/kamailio/kamailio.cfg] l=907 a=26 n=xlog
14(18194) ERROR: script: rU is now 8287825573

On Mon, Aug 27, 2012 at 2:30 PM, Daniel-Constantin Mierla
mico...@gmail.com mailto:mico...@gmail.com wrote:

Hello,

one solution is doing following trick:

- get the length of the dialed number via transformation and
prefix it to the number

$rU = $(rU{s.len}) + $rU;

- in drouting keep rules only for prefixes  2, 4, 6, 7 and 8
- for drouting gateways set strip to 1, so the first digit
(the length) is removed before forwarding

Cheers,
Daniel


On 8/27/12 10:20 PM, Luis Fernando Urrea wrote:

Yes thank you Daniel,

On my setup I terminate local calls using colocated TDM
equipment, these calls are 8 digit numbers that start with
2,4,6,7 and 8

Then I use a FreeSWITCH box as a gateway for US and
international calls, so I was hoping I could somehow route
based on numbers of digits.

I hope that is clear enough.

Regards,

Luis

On Mon, Aug 27, 2012 at 2:08 PM, Daniel-Constantin Mierla
mico...@gmail.com mailto:mico...@gmail.com wrote:

Hello,


On 8/27/12 6:54 PM, Luis Fernando Urrea wrote:

I haven't been able to find the answer in the
documentation.

It seems DROUTING does not take regex in the dr_rules
table to match routable numbers, are there any kind
of wilcards that could be used.

How does one specify different rules for 8 digit
numbers and 10 digit numbers.


drouting uses longest prefix matching to select the rule.

Do you have rules only on length or also on prefix? If
you provide a bit more details about what routing rules
you are looking for, we may be able to provide hints
about how to implement in the config file.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com

http://twitter.com/#!/miconda
http://twitter.com/#%21/miconda -
http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -
http://asipto.com/u/kat




-- 
O: 2248-2483

C: 6040-3624




-- 
Daniel-Constantin Mierla -http://www.asipto.com

http://twitter.com/#!/miconda  http://twitter.com/#%21/miconda  
-http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 
-http://asipto.com/u/kat




-- 
O: 2248-2483

C: 6040-3624





--
O: 2248-2483
C: 6040-3624




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Best tool for crafting sip messages

2012-08-13 Thread Javi Gallart

Hello

you definitely wan to to try sipp (http://sipp.sourceforge.net/). I  
haven't used sip inspector but have heard good things about it (http://www.sipinspector.com/ 
).


Regards

Javi
On Aug 13, 2012, at 7:41 AM, Anton Kvashenkin wrote:


Hello, guys.

What is the best tool for crafting sip messages for testing purpose?  
For example, simple REGISTER or INVITE message. I'm new to kamailio  
(not sip) so it would be great for me to use debbuger module for  
step-by-step digging into cfg.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing  
list

sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users