Juha-
Vikram had posted a while back on the thread where he explained a bit more about his resolution and the fact the issue
was occurring with VoipSwitch but not asterisk. Let us know if you want a link to that.
Thanks for following up.
-Jeff
-------------------- Original Message -----------------
Subject: Re: [SR-Users] [Kamailio-Users] Possible timing/latency relatedproblem ?
From: "Vikram Ragukumar" <vragukumar(a)signalogic.com>
Date: Mon, April 19, 2010 11:15 am
To: "Juha Heinanen" <jh(a)tutpro.com>
Cc: users(a)lists.kamailio.org
-------------------------------------------------------
Juha,
> what was the conclusion regarding this? did the problem go
> away when you called nat traversal functions both on 180
> ringing and 183 session progress?
Yes. The problem did go away once we started forcing rtpproxy on 180 Ringing also.
Thanks and Regards,
Vikram.
Hello,
Scenario 1
----------
--------- -------- -------- -------- --------
|Cellphone|--|Wireless|--|Internet|--|Kamailio|--|Asterisk|
| | |Router | | | |rtpproxy| | |
--------- -------- -------- -------- --------
|<-Lowlatency->|
Scenario 2
----------
--------- -------- -------- -------- --------
|Cellphone|--|Wireless|---|Internet|--|Kamailio|--|Asterisk|
| | |Router | | | |rtpproxy| | |
--------- -------- -------- -------- --------
|<-Highlatency->|
Both scenario 1 and scenario 2 are similar in setup, excepting that in
scenario 2 there is a greater latency involved in SIP and RTP
transmission between the wireless router and Kamailio+rtpproxy server.
In scenario 1 calls from the cellphone using a SIP softphone app go
through 100% of the time with both endpoints of the call being audible.
However in scenario 2, calls from the cellphone go through with both
endpoints of the call being audible only sometimes, and during all other
attempts, call goes through with no voice from the cellphone.
In scenario 2 the SIP softphone can always register, the SDP connection
address is always rewritten to use rtpproxy so it does not appear to be
a NAT issue, rtpproxy's logs show a session being set up and torn down,
with RTP stats for caller being 0.
In both scenarios, the equipment and their configuration are identical.
(Both cellphone's are Nokia e51, router's are Netgear wgr614) What might
be probable causes for the behavior seen in scenario 2 ? Could there be
a timing/latency related issue ?
Any pointers on how to approach this problem will be appreciated.
Thanks and Regards,
Vikram.
Hi all,
I have a kamailio sip server with two trunk connections to two asterisk
servers. The register server is kamailio. I'd like to be able to configure a
load balancing with kamailio between two asterisk servers. How can i do
that? Do you know any good tutorial for configure load balancing with
dispatcher module in kamalio?
Thanks in advance.
Regards.
--
jabber: triptik(a)12jabber.com
blog: http://impresionesdeunloco.wordpress.com
hi dear all,
i'm trying to use latest trunk with mysql
i have down compiling kamailio
now i don't know ghow do i enable mysql for kamailio (not for kamdbctl)
the db is created successfully
but kamailio is unable to connect to the db
default user/pass, i don't change anything
how do i use this define stufs?
thanks
Hi,
I'm trying to setup Kamailio to act as a load-balancer in front of
asterisk servers.
I want it to do the following:
- The UA sends an invite to Kamailio
- Kamailio sends a 30x redirect to the UA (dispatcher)
- The UA sends it's invite to the asterisk server
I've seen a couple of examples, but doesn't seem to work for me.
Here's the relevant config:
route{
if (method=="REGISTER") {
[...clip...]
};
if (method=="INVITE") {
ds_select_domain("2","8");
#ds_select_dst("2","8");
sl_send_reply("300","Redirect");
exit;
};
}
What seems to happen is that Kamailio does send the redirect, but with
no indication of where to go. ds_select_domain (or ds_select_dst ... I
having trouble understanding the difference like many people it seems)
I'm guessing selects an appropriate uri, but doesn't put it the
contact for the redirect.
Is there anyway to see what was set by the ds_select_dst? what pv
would have this value?
What do I need to set prior to sending a redirect reply for it to be
properly forwarded?
BTW: using Kamailio 3.0.1
Thank you,
--
Benjamin
Hello,
I started the page that should collect notes about how to upgrade from
version 3.0.x to 3.1.0:
http://sip-router.org/wiki/install/3.0.x-to-3.1.x
3.1.0 is not yet released, target date is September 2010, right now is
the code on master branch in GIT repository. However, this page will
help people that want to test it or use some modules from it, making as
well the life easier before release.
Please add to the document as you change (or discover) something
breaking compatibility with 3.0.x - the wiki is open.
Thanks,
Daniel
--
Daniel-Constantin Mierla * http://www.asipto.com/ *
http://twitter.com/miconda *
http://www.linkedin.com/in/danielconstantinmierla
i call drop() in branch route and it is the only branch left. the
branch gets correctly dropped, i.e., the request is not send out, but
the reply to UAC is strange:
U 2010/04/14 21:03:43.750712 192.98.102.10:5060 -> 192.98.103.2:5074
SIP/2.0 477 Unfortunately error on sending to next hop occurred (477/TM).
Via: SIP/2.0/UDP 192.98.103.2:5074;rport=5074;branch=z9hG4bKaoxzewgj.
To: <sip:0407058055@192.98.102.10>;tag=c02670ad1171fe45d9ff9a27d6c2cb82-e03b.
From: <sip:+35816234567@foo.bar>;tag=bclsw.
Call-ID: doibilvynrtqxpk@localhost.
CSeq: 134 INVITE.
Server: SIP Proxy (3.0.99-dev1 (i386/linux)).
Content-Length: 0.
why this kind of reply, because the proxy didn't even try to send the
request to next ho?
is it possible to somehow choose in the script, which reply to send? in
this example, i'm using lcr to choose gws and none of them was suitable,
so something like '503 service not available' would be more appropriate.
-- juha
2010/4/16 Benjamin Lawetz <benjaminlawetz(a)gmail.com>:
>> I strongly suggest not to do that. Instead:
>>
>> - The UA sends an invite to Kamailio
>> - Kamailio uses LCR module to randomly select asterik-1 or asterisk-2.
>> - Kamailio sends the request to the selected asterisk.
>> - If there is a failure (to inspect in failure_route) Kamailio uses
>> next_ge() (LCR module) and routes the INVITE to the other asterisk.
>>
>> This will work really better.
>
> Good idea, hadn't thought of a retry for the invite (was thinking of
> removing the server from the dispatch if it failed, but your idea is
> better).
> I'm guessing this doesn't add too much load to Kamailio.
> For learning/understanding the dispatcher... was what I wanted to do possible?
Please, keep the mail within the maillist thread.
No, it doesn't add too much load to Kamailio. This is one of the major
purposes of a transaction stateful proxy (the serial forking in order
to implement failover).
Take a look to the LCR module. It gives you load balancing (with
priorities if you want) and failover features. It's all you need in
your scenario.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Dear list members
I'm using kamailio 3
and the problem that I'm facing is that when a call is rejected by
global blacklist, kamailio does not generate an accounting record.
Is this normal behavior or I need to configure something somewhere ?
Below are parts of the config file
# ----- acc params -----
modparam("acc", "early_media", 1)
modparam("acc", "report_ack", 1)
modparam("acc", "report_cancels", 1)
modparam("acc", "detect_direction", 0)
modparam("acc", "failed_transaction_flag", 3)
#!ifdef WITH_ACCDB
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)
modparam("acc", "db_url",
"mysql://username:password@localhost/openser")
modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
#!endif
----------------------
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(1); # do accounting ...
setflag(3); # ... even if the
transaction fails
}
-------------------------
if (is_method("INVITE")) {
setflag(1); # do accounting
setflag(2); # log missed calls
setflag(3); # log failed calls
setflag(4); # do siptrace
setflag(5); # log dialog
-------------
route[name] {
# --- Remove # or %23 from rU ---
bm_start_timer("hash_remove");
if($rU =~ "^.*%+")
{
xlog("------- The number contains %23 ---- ");
$rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/});
xlog(" ------- The perl $rU ------- ");
}
if($rU =~ "^.*#+")
{
xlog("------- The number contains # ----");
$rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/});
xlog("------- The perl $rU ------- ");
}
bm_log_timer("hash_remove");
# --- PDT section ------ get service prefix to be appended
before is send out
bm_start_timer("pdt_lookup");
if(!prefix2domain("2", "0"))
{
sl_send_reply("404", "Prefix not found");
exit;
}
$var(dstgrp) = 0;
$var(dstgrp) = $(rd{s.int});
if($var(dstgrp)==0)
{
sl_send_reply("404", "Service not found");
exit;
}
$avp(s:service_prefix) = $var(dstgrp);
xlog("--$rU----------- $avp(s:service_prefix) --- PDT ---------\n");
bm_log_timer("pdt_lookup");
# --- DialPlan section --- get the routing group id
xlog("----- The rU is $rU before DP -----\n");
bm_start_timer("dialplan_lookup");
if(dp_translate("1", "$rU/$rU"))
{
$avp(s:dstgrp) = $(var(dpattrs){s.int});
xlog("----- The destination Drouting GroupID is
$avp(s:dstgrp) -----\n ");
}
bm_log_timer("dialplan_lookup");
xlog("----- The rU is $rU after DP -----\n");
# --- Global Blacklist section ---
bm_start_timer("blacklist_lookup");
if(!check_blacklist("globalblacklist")){
xlog("----- The number is blacklisted globaly! -----");
sl_send_reply("403", "Forbidden");
exit;
}
bm_log_timer("blacklist_lookup");
# --- Dynamic routing section --- route the call based on the
routing group id
bm_start_timer("drouting_lookup");
if (!do_routing("$avp(s:dstgrp)")) {
xlog("----- DRouting don't match dstgrp $avp(s:dstgrp) -----\n");
sl_send_reply("404","Route Not Found -$rU-");
exit;
}
bm_log_timer("drouting_lookup");
xlog("-----DRouting with $rU and $avp(s:dstgrp) -and
$avp(s:service_prefix)----\n");
# Append service prefix in front of number
$ru = "sip:" + $avp(s:service_prefix) + $rU + "@" + $rd;
xlog(" ------ $ru ----$rU- $avp(s:user)---\n");
t_on_failure("FAIL_ONE");
route(RELAY);
exit;
return;
}
Regards
Panagiotis