I am having an issue with 1.5.4 where force_send_socket() isn't behaving as
I would expect.
I have an LCR scenario where depending on which gateway I am sending to, I
send from a different socket.
It appears that calling force_send_socket from failure_route has no affect
on the routing. In my initial route block I call
force_send_socket(X.X.X.180:5060). In my failure_route I am calling
force_send_socket(X.X.X.179:5060), yet after calling the subsequent time, my
sip trace and tcpdump are clearly showing kamailio is still sending from
X.X.X.180:5060.
I have added a lot of debug lines, so I am 100% sure the second call to
force_send_socket is happening.
Am I misusing this module in some way?
Hi, according to the doc:
1.5.9. rtpproxy_retr (integer)
How many times nathelper should retry to send and receive after timeout
was generated.
Default value is “5”.
So imagine this configuration:
modparam("nathelper", "rtpproxy_tout", 2)
modparam("nathelper", "rtpproxy_disable_tout", 60)
modparam("nathelper", "rtpproxy_retr", 10)
Let's imagine that the RtpProxy servers crashes and is down for 1 day.
Does this configuration mean that the rtpproxy server will NEVER be
contacted again by nathelper module since 60x10 seconds < 1 day?
Thanks.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Hi All,
I'm testing dispatcher functions with kamailio 3.0 and using database
to load destination address. The problem I am seeing is the 1'st
destination address in a group is not being used, the dispatcher
always starts at the second database entry. For instance, if I have 2
destination addresses listed in the database, sip:10.10.14.101:5060
and sip:10.10.14.102:5060, only sip:10.10.14.102:5060 will receive
calls. But if I list .101 in the database twice, then I will get
proper distribution.
So here is my setup and some debug traffic:
sipp><sr-router><dispatcher round robin group 1><10.10.14.101,
10.10.14.102, 10.10.14.101
This will send calls to both .101 and 102 evenly.
sip-router2:~# kamctl fifo ds_list
SET:: 1
URI:: sip:10.10.14.101:5060 flag=A
URI:: sip:10.10.14.102:5060 flag=A
URI:: sip:10.10.14.101:5060 flag=A
first call to dispatcher:
0(4780) DEBUG: dispatcher [dispatch.c:1111]: set [1]
0(4780) DEBUG: dispatcher [dispatch.c:1185]: alg hash [0]
0(4780) DEBUG: dispatcher [dispatch.c:1223]: selected [4-1/0]
<sip:10.10.14.101:5060>
0(4780) DEBUG: dispatcher [dispatch.c:1257]: using entry [1/1]
0(4780) INFO: <script>: ds_dispatcher sip:10.10.14.101:5060 1 3
second call to dispatcher:
0(4780) DEBUG: dispatcher [dispatch.c:1111]: set [1]
0(4780) DEBUG: dispatcher [dispatch.c:1185]: alg hash [1]
0(4780) DEBUG: dispatcher [dispatch.c:1223]: selected [4-1/1]
<sip:10.10.14.102:5060>
0(4780) DEBUG: dispatcher [dispatch.c:1245]: using entry [1/0]
0(4780) INFO: <script>: ds_dispatcher sip:10.10.14.102:5060 1 3
third call to dispatcher goes back to .101, then .102, ect.
sipp><sr-router><dispatcher round robin group 2><10.10.14.103 and 10.10.14.104
This will send calls only to .104
sip-router2:~# kamctl fifo ds_list
SET_NO:: 2
SET:: 2
URI:: sip:10.10.14.104:5060 flag=A
URI:: sip:10.10.14.103:5060 flag=A
first call to dispatcher:
0(4780) DEBUG: dispatcher [dispatch.c:1111]: set [2]
0(4780) DEBUG: dispatcher [dispatch.c:1185]: alg hash [0]
0(4780) DEBUG: dispatcher [dispatch.c:1223]: selected [4-2/0]
<sip:10.10.14.104:5060>
0(4780) INFO: <script>: ds_dispatcher sip:10.10.14.104:5060 2 2
second call to dispatcher:
0(4780) DEBUG: dispatcher [dispatch.c:1111]: set [2]
0(4780) DEBUG: dispatcher [dispatch.c:1185]: alg hash [1]
0(4780) DEBUG: dispatcher [dispatch.c:1223]: selected [4-2/0]
<sip:10.10.14.104:5060>
0(4780) INFO: <script>: ds_dispatcher sip:10.10.14.104:5060 2 2
So it appears with only 2 entries loaded in the database, there is a
missing "DEBUG: dispatcher [dispatch.c:1245]: using entry [1/0]" This
is the only difference I can see between the call executions between
the two groups. But I don't really know what that means.
I can reproduce these symptoms on kamailio 3.0, 1.5.x and older
versions. The same thing happens when the destinations are loaded via
config file dispatcher.lst.
I am using debian Lenny with siremis web interface.
mysql> select * from dispatcher\G;
*************************** 1. row ***************************
id: 1
setid: 1
destination: sip:10.10.14.101:5060
flags: 0
priority: 0
description: lab1
*************************** 2. row ***************************
id: 2
setid: 1
destination: sip:10.10.14.102:5060
flags: 0
priority: 0
description: lab2
*************************** 3. row ***************************
id: 3
setid: 2
destination: sip:10.10.14.103:5060
flags: 0
priority: 0
description: lab3
*************************** 4. row ***************************
id: 4
setid: 2
destination: sip:10.10.14.104:5060
flags: 0
priority: 0
description: lab4
*************************** 5. row ***************************
id: 5
setid: 1
destination: sip:10.10.14.101:5060
flags: 0
priority: 0
description: lab1
5 rows in set (0.00 sec)
Is this a bug?
Thanks.
JR
--
JR Richardson
Engineering for the Masses
Hello,
On 6/29/10 6:39 PM, yaron nahcum wrote:
> Hi Daniel,
> Thanks a lot for the quick response. I will look at it.
fyi: keep cc-ing the mailing list for any discussion that started there
- message sent privately are usually ignored.
Daniel
> Yaron.
>
> ------------------------------------------------------------------------
> *From:* Daniel-Constantin Mierla <miconda(a)gmail.com>
> *To:* yaron nahcum <yaron_nachum(a)yahoo.com>
> *Cc:* sr-users(a)lists.sip-router.org
> *Sent:* Tue, June 29, 2010 6:57:53 PM
> *Subject:* Re: [SR-Users] using avpops for querying an external db on
> kamailio 3.0.2
>
> Hello,
>
> look at sqlops module, it is more suitable for custom sql queries:
> http://kamailio.org/docs/modules/stable/modules_k/sqlops.html
>
> Cheers,
> Daniel
>
>
> On 6/29/10 5:47 PM, yaron nahcum wrote:
>> Hi,
>> I have recently installed a kamailio server with release 3.0.2.
>> I would like to use the kamilio as a redirect server that would
>> recieve REGISTER messages from users and query a proprietary database
>> that holds users information - if the users are registered to the
>> service it would redirect the user to the registrar. I need it for
>> security reasons which I can't fully explain.
>> Now, I am using the avpops module. I have been able to make it work
>> using the following configuration:
>> modparam("avpops","db_url","mysql://user:pass@localhost/mysql")
>> modparam("avpops","avp_table","proptable")
>> modparam("avpops","db_scheme","scheme0:username_col=sipUsername;value_col=sipDomainName;table=proptable")
>> ----------
>>
>> if (is_method("REGISTER"))
>> {
>> if
>> (avp_db_load("$fu/username","$avp(s:CONSTANT_DOMAIN)/$scheme0"))
>> {
>> append_branch("sip:registrarIP");
>> sl_send_reply("302","Test Redirect");
>> }
>> else
>> {
>> sl_send_reply("404","Test Not found");
>> }
>> --------------
>> The thing is that I don't need to match the string CENTREX against
>> the domain- it is something I added because I couldn't find another
>> way to do it. I would like to match only the username. I tried
>> wildcards or leaving it empty but it didn't work. I tried not to use
>> the scheme and instead use the table it self but again it didn't work.
>> Is it possible? Do you know a better to do it?
>> Thanks,
>> Yaron.
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users(a)lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com/
>
>
--
Daniel-Constantin Mierla
http://www.asipto.com/
> 2010/6/28 JR Richardson <jmr.richardson(a)gmail.com>:
> > Kamailio 3.0 permissions module, I see that the address database table
> > is cached by default, really the only option. ?But there is no MI
> > Function to reload the database into cache, you must restart kamailio
> > to update the cache for the address table. ?Is there any reason the
> > reload MI function is not there for the address table?
>
> It is:
> http://kamailio.org/docs/modules/stable/modules_k/permissions.html#id29613
> 70
Yes, I see that now, I was looking for subnet_reload, didn't realize that
the address_ and subnet_ entries were in the same table.
Thanks.
JR
Hi All,
Kamailio 3.0 permissions module, I see that the address database table
is cached by default, really the only option. But there is no MI
Function to reload the database into cache, you must restart kamailio
to update the cache for the address table. Is there any reason the
reload MI function is not there for the address table? It is present
for the trusted table and works fine.
I like the trusted db option to use cache or no cache, I'm wondering
if this option can be extended to the address table as well? Also I
like the address table ability to define subnets, can this be extended
to the trusted table?
Thanks.
JR
--
JR Richardson
Engineering for the Masses
Hey everyone,
Just wanted to bounce some things off the list to make sure I'm not heading
down the wrong path here. I'll quickly explain my problem and then explain
my plan to deal with it. Please let me know if anyone sees an issue here.
Problem: I need to send FROM two different IP addresses based on the LCR
group returned from next_gw();. For example, if the gateway returned is in
group_id=1 from the LCR I need to send FROM 1.1.1.1:5060, if it's from
group_id=2, I need to send FROM 1.1.1.2:5060. I need to do this on
REQUEST_ROUTE and FAILURE_ROUTE. Here is what I am thinking will work:
modparam("pv","shvset","gw_one=s:1.1.1.1:5060")
modparam("pv","shvset","gw_two=s:1.1.1.2:5060")
route{
load_gws();
next_gw();
if(to_gw("1")){
force_send_socket($shv(gw_one));
}else if(to_gw("2")){
force_send_socket($shv(gw_two));
}
}
Sorry for not just trying this out on my own. I currently don't have access
to a dev machine, and I need to make changes to the live script... so I
would prefer not to have a ton of restarts while trying to work the bugs
out.
Thanks.
Job offer:
Interested in working with one of the biggest Voice over IP networks in
europe? We're hiring and have one additional VoIP developer position open in
our team in Karlsruhe, Germany at the moment.
For more informations (requirements, how to apply..) please refer to the
opening on the job web page. Some facts about our VoIP system can be found at
e.g. [1], please feel free to contact me per mail as well.
http://www.united-internet.de/xml/ui/JobsJobDetail;?__lf=JobsApplication200…
Best regards,
Henning Westerholt
[1] http://www.kamailio.org/events/2010-linuxtag/presentation.pdf
--
Henning Westerholt - Technical Leader VoIP backend development
1&1 Internet AG, Ernst-Frey-Str. 9, 76135 Karlsruhe, Germany
Greetings,
I have a Contact URI with params as in the following form returned to
me in a 302 Moved Temporarily reply:
<sip:a=foo;b;c=bar>
I am able to check the existence of parameters 'a' and 'b', which have
values assigned to them, in the following way:
failure_route[...] {
...
$var(dest) = $T_rpl($ct);
$var(dest) = $(var(dest){nameaddr.uri});
$var(dest) = $(var(dest){uri.user});
...
if(! $(var(dest){param.value,a})) {
....
}
...
}
However, what I cannot seem to figure out is a reliable test condition
for the existence of a parameter like 'b', which does not have a
value. I have tried:
if(! $(var(dest){param.value,b}))
which clearly cannot work as the parameter has no _value_.
Also have tried:
if(!defined $(var(dest){param.value,b}))
and also tests of strempty(), !defined, etc. for
$var(dest){uri.param,b}) (prior to extraction of param list using
{uri.user} above).
Ideas appreciated, thanks!
--
Alex Balashov - Principal
Evariste Systems LLC
1170 Peachtree Street
12th Floor, Suite 1200
Atlanta, GA 30309
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/