Re: [SR-Users] HTTP POST

2011-06-16 Thread Edson - Lists
Lua. Em 16/06/2011 14:51, Matthew Williams escreveu: Hi, I'm working on an application that needs to create an HTTP POST from within Kamailio. The utils module has the http_query function, but that is only for GET. I think I'm looking for something more like the uac module's uac_req_send -- but

Re: [SR-Users] mi_datagram usage example

2011-06-16 Thread Ovidiu Sas
IIRC, the feature was requested during openser project (before the merge with sip-router) and it was lost after the merge. You can open a new one on the sip-router tracker. Regards, Ovidiu Sas On Thu, Jun 16, 2011 at 1:18 PM, Bruce McAlister wrote: > Ahh yes, you are correct, it appears to be re

[SR-Users] HTTP POST

2011-06-16 Thread Matthew Williams
Hi, I'm working on an application that needs to create an HTTP POST from within Kamailio. The utils module has the http_query function, but that is only for GET. I think I'm looking for something more like the uac module's uac_req_send -- but for http. Any suggestions? Thanks in advance!

Re: [SR-Users] mi_datagram usage example

2011-06-16 Thread Bruce McAlister
Ahh yes, you are correct, it appears to be responding from a different port: [root@myhost sbin]# ngrep -q -t -P "" -W byline -d any host 1.1.1.1 and udp interface: any filter: (ip) and ( host 1.1.1.1 and udp ) U 2011/06/16 18:07:56.206350 1.1.1.2:59267 -> 1.1.1.1:8080 :ds_list: U 2011/06/16 18

Re: [SR-Users] mi_datagram usage example

2011-06-16 Thread Ovidiu Sas
Perform a tcpdump of the traffic between nc and kamailio. IIRC, the server replies but from a different port and therefor the reply is discarded by nc (at least this was the issue with openser 1.x and I assume that the same issue is present with sip-router). See the old reports for openser here: h

[SR-Users] mi_datagram usage example

2011-06-16 Thread Asgaroth
Hi All, I am trying to send a mi command over the mi_datagram udp socket. I dont seem to be getting a response back from the server. I am certain that it is something I am doing wrong. I have mi_datagram loaded and listening on udp:1.1.1.1:8080. I then try to send the following dispatcher mi com

Re: [SR-Users] Kamailio dispatcher

2011-06-16 Thread Evgeniy Spinov
On Thu, 2011-06-16 at 12:06 +0200, Daniel-Constantin Mierla wrote: > > On 6/15/11 10:50 AM, Evgeniy Spinov wrote: > > On Wed, 2011-06-15 at 09:47 +0200, Daniel-Constantin Mierla wrote: > >> On 6/14/11 1:06 PM, Evgeniy Spinov wrote: > >>> On Mon, 2011-06-13 at 12:12 +0200, Daniel-Constantin Mierla

[SR-Users] Invite replies

2011-06-16 Thread Lucas Alvarez
Hi, how may I catch the reply of an invite? I did this but it seems is not working: if (method=="INVITE") { $avp(sdp_ret) = fix_nated_sdp("11"); xlog("L_ALERT","### SDP return: $avp(sdp_ret)\n");

Re: [SR-Users] How to check a bit (1/0) of a pseudo-variable?

2011-06-16 Thread Iñaki Baz Castillo
2011/6/16 Daniel-Constantine Mierla : > You can do 2*2*2... to get the power of two. Doing it in a while loop gives > dynamic power parameter. Other option is to use Lua for example. A bit exotic just to calculate a simple mathematical operation :) > ... until the left shift gets in 3.1 - if yo

Re: [SR-Users] How to check a bit (1/0) of a pseudo-variable?

2011-06-16 Thread Daniel-Constantine Mierla
On Jun 16, 2011, at 2:03 PM, Iñaki Baz Castillo wrote: > 2011/6/16 Daniel-Constantin Mierla : >> that function is probably for ser-like AVPs. >> >> back to your original need, you can use directly if conditions like: >> >> if($var(x) & 2) { ... } >> >> will be true if the second bit is set.

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

2011-06-16 Thread Iñaki Baz Castillo
2011/6/16 Javier Gallart : > 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 lo

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

2011-06-16 Thread Javier Gallart
ose rows with scope 1. > > > > Is it possible with current mtree module? or maybe we'd do better by > > creating two views of the table (one for entries with scope 0 and > > another for entries with scope 1)? > > > > Thanks a lot. > > > > -- >

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] How to check a bit (1/0) of a pseudo-variable?

2011-06-16 Thread Iñaki Baz Castillo
2011/6/16 Daniel-Constantin Mierla : > that function is probably for ser-like AVPs. > > back to your original need, you can use directly if conditions like: > > if($var(x) & 2) { ... } > > will be true if the second bit is set. You have to use the power of two for > the appropriate integer value to

Re: [SR-Users] How to check a bit (1/0) of a pseudo-variable?

2011-06-16 Thread Daniel-Constantin Mierla
Hello, that function is probably for ser-like AVPs. back to your original need, you can use directly if conditions like: if($var(x) & 2) { ... } will be true if the second bit is set. You have to use the power of two for the appropriate integer value to match the bit position. The master bra

Re: [SR-Users] How to check a bit (1/0) of a pseudo-variable?

2011-06-16 Thread Iñaki Baz Castillo
2011/6/16 Iñaki Baz Castillo : > I've found isavpflagset() right now: > >  http://sip-router.org/wiki/cookbooks/core-cookbook/devel#isavpflagset > > But it has no description. How is it supposed to work? The Changelog file says: --- Every AVP may by flage

Re: [SR-Users] How to check a bit (1/0) of a pseudo-variable?

2011-06-16 Thread Iñaki Baz Castillo
2011/6/16 Iñaki Baz Castillo : > Now I just need to know if bit number 2 ($var(id_zone)) of > $var(allowed_zones) is 0 or 1. > > Is there any function like isflagset() but for pseudo-variables? I've found isavpflagset() right now: http://sip-router.org/wiki/cookbooks/core-cookbook/devel#isavpfl

[SR-Users] How to check a bit (1/0) of a pseudo-variable?

2011-06-16 Thread Iñaki Baz Castillo
Hi, summarizing I have two pseudo-variables: $var(allowed_zones) = 5; $var(id_zone) = 2; The binary representation of 5 (3+2), assuming 8 bits lenght, is: 0101 so bit 0 = 1, bit 1 = 0, bit 2 = 1 ... Now I just need to know if bit number 2 ($var(id_zone)) of $var(allowe

Re: [SR-Users] Security in proxy

2011-06-16 Thread Henning Westerholt
On Thursday 16 June 2011, Anto wrote: > After reading the modules pike, pipelimit, etc. I wanted to know what > measures can be used in the proxy, because like me, there will be more > people interested ;-). > > We see that the module pike is a good security measure, but for users with > many ch

Re: [SR-Users] Kamailio dispatcher

2011-06-16 Thread Daniel-Constantin Mierla
On 6/15/11 10:50 AM, Evgeniy Spinov wrote: On Wed, 2011-06-15 at 09:47 +0200, Daniel-Constantin Mierla wrote: On 6/14/11 1:06 PM, Evgeniy Spinov wrote: On Mon, 2011-06-13 at 12:12 +0200, Daniel-Constantin Mierla wrote: Ok, still unsolved problem. I've changed failover part of the script to

Re: [SR-Users] t_relay_to("0x02") alternative with kamailio 3.1

2011-06-16 Thread Alex Hermann
On Thursday 16 June 2011 01:48:45 Herve Couplet wrote: > I had a setup with an old version where I used the function > t_relay_to("0x02"). > Following the 3.1 documentation, flag : > * 0x02* - do not generate reply on internal error (NOTE: has no effect > anymore) > > I used that function as a