Hello list,
I have a question to the dispatcher module in Kamailio version 3.0.4.
In my integration I use this module for distributing calls to a set of
gateways (with the round robin algorithm). Sometimes a gateway does not
react or send back a negative response. In that case I use the function
'ds_mark_dst("p")' in the failure_route and mark the current destination
with the flag 'probing'. I have set the threshhold value for probing mode
to '10'. This means that a gateway is effectively set to probing mode only
when it was marked with the flag 'probing' for 10 times. However,
sometimes a gateway is sending back a negative response for e.g. 5 times
and is afterwards working fine - without any problems. A few hours later
(e.g.) it is sending a negative reply again for one time. This means: the
counter for the probing_flags is increasing every time when the function
ds_mark_dst("p") is executed (in case that the process was not restarted
in the meantime!). So the problem is, that the counter is reaching the
threshhold value at any time and at that moment the gateway is set to
probing mode. Even if the gateway has sent a negative reply for only one
time (at that moment) - but according the history the proging_flag was set
several times.
What I miss in this module is a function to _reset_ that flag counter from
a REPLY_ROUTE. Note: I have to reset the counter, because the gateway does
not yet SIP OPTIONS requests and therefore it is set to 'probing' all time
until it is manually set back to active via MI command or after a process
restart. According the README file (and practical experience) the function
ds_mark_dst() is executable only within the failure_route. However, when I
want to set the flag ("a") for the current destination I will do it within
a reply_route, but not in the failure_route (because I have received a
positive response and not a negative one). From my point of view it does
not make sense setting the 'active' flag for a destination from within a
FAILURE route.
Does anybody have an idea, how the 'flag-counter' could be reset (from
within the script)? I do not want to use a MI command.....
configuration excerpt:
[...]
modparam("dispatcher", "db_url",
"mysql://openser:openserrw@localhost/openser")
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")
modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")
modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")
modparam("dispatcher", "ds_ping_from", "sip:proxy@192.168.37.87")
modparam("dispatcher", "ds_probing_mode", 0)
modparam("dispatcher", "ds_probing_threshhold", 10)
modparam("dispatcher", "ds_ping_interval", 30)
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "force_dst", 1)
[...]
if (!ds_select_dst("1", "4")) {
sl_send_reply("404", "No destination (disp)");
exit;
}
t_on_failure("failureroute");
t_on_reply("replyroute");
[...]
failure_route[failureroute] {
[...]
if (t_check_status("[45][08]0") || (t_branch_timeout() &&
!t_branch_replied())) {
ds_mark_dst("p");
if (!ds_next_dst()) {
t_reply("404", "No destination (disp)");
exit;
}
t_on_failure("failureroute");
t_on_reply("replyroute");
}
[...]
}
onreply_route [replyroute] {
if (t_check_status("180|200") {
# nice to have......
# ds_mark_dst("a");
}
}
Thanks in advance!
regards,
Klaus
Hi,
whats about: http://sip-router.org/tracker/index.php?do=details&task_id=108 I think that some users are trying to register to an asterisk system. Or does somebody have a solution for that?
A new release would be nice!!!
Thanks in advance.
Best regards,
Bernhard
----- Original Message -----
From: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
To: kamailio [mailto:sr-users@lists.sip-router.org], sr-dev [mailto:sr-dev@lists.sip-router.org]
Sent: Fri, 28 Jan 2011 20:15:50 +0100
Subject: [sr-dev] planning release of v3.1.2
> Hello,
>
> I think it is time to release v3.1.2, first date that comes in my mind
> is next Thursday if everyone feels it is enough time to take care of
> backporting any fix he/she did and it is not yet there. That will
> provide us a fresh release for the FOSDEM event. If not, then maybe the
> other week, Tuesday, so the participants at the Kamailio Devel training
> in Barcelona can practice on it.
>
> Soon after we should plan also a release for previous stable, branch 3.0.
>
> Anyone having other options?
>
> Thanks,
> Daniel
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
Hi,
I'd like to ask whether my situation is normal. During kamailio restart
calls are dropped from mediaproxy. Those two programs are connected using
kamailio.sock. Why RTP strem is dropped when SIP proxy is restarted? I would
expect just undelivered BYE or something.
Thanks for answer,
Efelin
I'm trying to use the db_alias module as a way to define "generic"
addresses that map to a set of actual phones. For example, I'd like
the alias "home(a)foo.bar" to map to "kitchen(a)foo.bar" and
"office(a)foo.bar", so that both phones ring when a call comes in to
"home".
I have set the append_branches param to 1:
modparam("alias_db", "append_branches", 1)
I also modified the dbaliases database table so that key "alias_idx"
isn't unique, thereby allow me to add multiple rows for the same
alias.
The relevant script section is taken verbatim from 3.1 kamailio.cfg:
# USER location service
route[LOCATION] {
#!ifdef WITH_ALIASDB
# search in DB-based aliases
alias_db_lookup("dbaliases");
#!endif
if (!lookup("location")) {
switch ($rc) {
case -1:
case -3:
xlog( "L_WARN", "XXX $ru $fu\n");
t_newtran();
t_reply("404", "Not Found");
exit;
case -2:
sl_send_reply("405", "Method Not Allowed");
exit;
}
}
# when routing via usrloc, log the missed calls also
if (is_method("INVITE"))
{
setflag(FLT_ACCMISSED);
}
}
When I place a call to an alias, the kamailio debug log shows that
alias_db_lookup() is correctly setting the ruri to the first entry
found in the table, and using append_branch() to add the others. But
only the first matching phone gets an INVITE, not the others. I
suspect that the lookup() call is blowing away the branches set up by
alias_db_lookup() and replacing them with the single phone that
matches the ruri for the first alias entry.
Is there a way to get alias_db_lookup() and lookup() to play together,
so that the first function can set up a list of branches, and the
second function can resolve all of the branches to the actual device
locations?
--
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com
I am trying to authenticate through radius (info in LDAP database). I am
using kamailio 3.1
First of all I would like to clear up an issue:
As shown the way to do the authentication is done with:
*Code:*
if (! radius_www_authorize("uu.net")) {
www_challenge("uu.net", "0");
return;
}
Ok, when I installed openser I did it with kamailio "flavour" so it was
using the auth_radius module belonging to it.
Does anyone know which would be the correct way to do the challenge to the
user cause is was not working at all. The radius client does not even send
it. I got stuck some time till I just decided to load the module from ser
modules folder and then freeradius server started to get correctly my
requests. Actually I can even see it authenticates them correctly.
However Openser/Kamailio doesn't seem to see the same and it doesn't saves
location.
*Code:*
route[AUTH] {
#!ifdef WITH_AUTH
# Primeramente comprobamos si pertenece a nuestro dominio; si no ya no hace
falta comprobar credenciales.
if (uri==myself)
{
if (is_method("REGISTER"))
{
xlog("L_NOTICE","KAM-INFO: r[AUTH] - REGISTER - User
info: ($fu):($si)>\n");
if (!radius_www_authorize("i2cat.net")){
route(RADIUS);
#www_challenge("i2cat.net","0");
exit;
}
}
if ($au!=$tU)
{
sl_send_reply("403","Forbidden auth ID");
exit;
}
} else {
#!ifdef WITH_IPAUTH
if(allow_source_address())
{
# source IP allowed
return;
}
#!endif
# authenticate if from local subscriber
if (from_uri==myself)
{
if (!proxy_authorize("$fd", "subscriber")) {
proxy_challenge("$fd", "0");
exit;
}
if (is_method("PUBLISH"))
{
if ($au!=$tU) {
sl_send_reply("403","Forbidden auth
ID");
exit;
}
} else {
if ($au!=$fU) {
sl_send_reply("403","Forbidden auth
ID");
exit;
}
}
consume_credentials();
# caller authenticated
} else {
# caller is not local subscriber, then check if it
calls
# a local destination, otherwise deny, not an open
relay here
if (!uri==myself)
{
sl_send_reply("403","Not relaying");
exit;
}
}
}
#!endif
return;
}
Before doing the challenge then it just goes throught:
*Code:*
route[RADIUS]
{
sl_send_reply("100", "Trying");
append_to_reply("Expires: 600\r\n");
append_to_reply("Min-Expires: 240\r\n");
xlog("L_NOTICE","KAM-INFO: RADIUS AUTHENTICATION - AUTHORIZING USER $fU -
<$fu>:<$si>\n");
xlog("L_NOTICE","KAM-INFO: CHALLENGING. - RETCODE-> $rc \n");
www_challenge("i2cat.net", "0");
switch($rc){
case -5:
xlog("L_INFO", "-> 500: internal server error");
sl_send_reply("500", "Internal Server Error");
case -4:
xlog("L_INFO", "-> 404: credentials not found");
sl_send_reply("404", "Credentials Not Found");
case -3:
xlog("L_INFO", "-> 400: bad request - stale nonce");
sl_send_reply("400", "Bad Request");
case -2:
xlog("L_INFO", "-> 401: invalid password");
sl_send_reply("401", "Invalid Password");
case -1:
xlog("L_INFO", "-> 401: invalid user");
sl_send_reply("401", "Invalid User");
default:
xlog("L_INFO", "-> 401: unauthorized");
sl_send_reply("401", "Unauthorized");
}
}
Buuuuuuuuuuuuut... I got that in the debug of Kamailio:
*Code:* 4(31099) DEBUG: auth [api.c:95]: auth: digest-algo: MD5 parsed
value: 1
4(31099) DEBUG: auth_radius [sterman.c:271]: radius_authorize_sterman():
Success
4(31099) WARNING: auth_radius [authorize.c:89]: RADIUS server did not send
SER-UID attribute in digest authentication reply
4(31099) DEBUG: auth [challenge.c:102]: build_challenge_hf: realm='
i2cat.net'
4(31099) DEBUG: auth [challenge.c:113]: build_challenge_hf: qop='auth'
4(31099) DEBUG: auth [challenge.c:236]: auth: 'WWW-Authenticate: Digest
realm="i2cat.net", nonce="TWZJLk1mSAKFVzL0b+dVPzkuyyAnZHQs", qop="auth"
I guess it has something to do with this SER-UID attribute and thus
something about the dictonary? It is weird seeing that the radius server
says 'ok' but then openser is not authenticating it.
I need some clues! Thank you!.
--
Pablo Ros
In continue of letters:
Kamailio 1.5.5 No TLS Segmentation Fault
After upgrade from openser 1.3.4 to kamailio 1.5.5 the same crash set
Can someone from developers provide me commercial support to fix this
bug in malloc module.
If so, contact me directly.
Hello Community,
I am new to Kamailio, and this list as well.
I am trying to install Kamailio 3.1.2, but I am getting too many errors. I
have fixed some but still not getting the way.
I am using Red Hat Enterprise Linux (RHEL) 5, and /usr/local directory.
When I ran the following command:
make group_include="standard standard-dep mysql"
include_modules="carrierroute peering" install
it prompted not found error for the file docbookx.dtd, I found it
(modules/auth/auth.xml, and modules_s/acc_syslog/acc_syslog.xml) and fixed
it as it was errorenous URL location.
For reference earlier it was
http://www.oasis-open.org/docbookid/id/g/4.5/docbookx.dtd, which I changed
to http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd.
Now when I run the previous command again, I am getting the follwing errors:
*nsgmls:<URL>http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd:116:17:E:
"X20AC" is not a function name*
If I ignore this, and continue, I am not able to find the "sip-router"
service in /etc/init.d.
The entire errors is attached here.
Please help me solve the issue.
TIA
Suresh
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:
route[XMLRPC]{
if (method == "POST" || method == "GET")
{
if (search("^User-Agent:"))
{
xlog("xmlrpc request\n");
set_reply_close();
set_reply_no_connect(); # optional
dispatch_rpc();
}
exit;
}
}
This server has been running with no issued for some weeks now, but at some
point during the weekend the mi command started to fail. This is what the
logs show:
ERROR: <core> [db_res.c:181]: no private memory left
ERROR: db_postgres [km_res.c:225]: could not allocate rows
ERROR: db_postgres [km_dbase.c:280]: failed to convert rows
ERROR: mtree [mtree_mod.c:627]: Error while fetching result
ERROR: db_postgres [km_dbase.c:318]: invalid parameter value
ERROR: mtree [mtree_mod.c:738]: cannot re-load info from database
I've restarted kamailio and now it's working fine. Should we increase the
private memory? On the other hand, we'd like to detect this failure
condition on the script and act accordingly (for instance sending an email
with an alarm message), is there anyway to do this?
Thanks in advance
Regards
Javier