Hello,
I am planning to release kamailio 3.0.2 this Thursday. There were some
fixes since 3.0.1 that worth to be packaged. If you have major reports
for current stable version, please write to sr-dev(a)lists.sip-router.org
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Miami, Fl, USA - June 21-23, 2010
http://www.asipto.com/index.php/kamailio-advanced-training/
if t_relay() fails in route block so that failure route is not executed,
is request uri "consumed" so that if a new branch is added by in the
route block, that branch will be the only remaining one?
in the test that i made, two lcr gws match the request uri. in route
block i have:
load_gws();
next_gw(); /* sets request-uri to uri of first gw */
while ($true) {
t_on_branch("BRANCHES");
if (t_relay()) {
xlog("Relaying succeeded with result $rc\n");
exit;
} else {
xlog("Relaying failed with result $rc\n");
};
if (!next_gw()) { /* tries to append the next gw as a new branch */
xlog("L_WARN", "No more gws\n");
send_reply("503", "Service not available");
exit;
};
xlog("found next gw <$ds>\n")
};
and in branch route block BRANCHES i have
branch_route [BRANCHES] {
xlog("L_INFO", "Relaying $rm <$ru>\n");
return;
};
when proxy receives a request, i get to syslog (some lcr DBGs are
changed to INFOs):
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: INFO: lcr [lcr_mod.c:1532]: added gw_uri_avp <1|1|00||lohi.tutpro.com|5060||1|4096> with weight <8192865>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: INFO: lcr [lcr_mod.c:1532]: added gw_uri_avp <1|1|00||sars.tutpro.com|||2|64> with weight <3725453>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: INFO: Relaying INVITE <sip:00358407058055@sars.tutpro.com;transport=tcp>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: tm [ut.h:295]: ERROR: uri2dst: failed to resolve "sars.tutpro.com" :unresolvable A or AAAA request (-7)
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: tm [t_fwd.c:1391]: ERROR: t_forward_nonack: failure to add branches
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: Relaying failed with result -478
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: INFO: lcr [lcr_mod.c:1949]: appending branch <sip:00358407058055@lohi.tutpro.com:5060>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: found next gw <Contact: sip:00358407058055@sars.tutpro.com;transport=tcp, sip:00358407058055@lohi.tutpro.com:5060>
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: tm [ut.h:295]: ERROR: uri2dst: failed to resolve "sars.tutpro.com" :unresolvable A or AAAA request (-7)
May 16 15:58:49 localhost /usr/sbin/sip-proxy[11412]: ERROR: Relaying succeeded with result 1
May 16 15:58:54 localhost /usr/sbin/sip-proxy[11459]: WARNING: No more gws
the first gw domain name sars.tutpro.com does not exist and the tm
errors are as they should. then next_gw() appends a new branch, but
based on the "found next gw" log message it looks like sars.tutpro.com
is still in the destination set.
is this how it is supposed to be? if so, looks like i there is a bug in
next_gw() in that it should clear the previous branch before adding a
new one in case the previous branch was not consumed by t_relay?
another strange thing is, why the branch route is executed only once
(for the first t_relay) although the script is calling t_relay() two
times and t_on_branch() is called before each call?
-- juha
Module: sip-router
Branch: master
Commit: 9b0c1a0e1f02d84c312d67cdc71360d5612b9e2c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9b0c1a0…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri May 28 13:30:38 2010 +0200
Merge remote branch 'origin/tmp/ruri_branch'
* origin/tmp/ruri_branch:
modules*: mark r-uri as "new" when changed
tm: failure route start with r-uri marked as "consumed"
tm: use ruri for forking only if marked as "new"
core: mark uri as new on new message or seturi()
core: support for marking a "consumed" r-uri
---
Hello,
there is a new module named xhttp which provides an embedded http server
inside the SIP server. It reuses the transport layer from the core, so
you can send http requests via TCP and TLS. The port is the same as for
SIP traffic. The documentation of the module is available at:
http://sip-router.org/docbook/sip-router/branch/master/modules/xhttp/xhttp.…
Since sip and http are very similar, you can use other modules in
handling the http requests. For example, you can do www-authentication:
event_route[xhttp:request] {
if (!www_authorize("xcap", "subscriber"))
{
www_challenge("sip-router.org", "0");
exit;
}
xhttp_reply("200", "OK", "text/html",
"<html><body>Welcome $au, you are connected from
$si:$sp</body></html>");
}
allowing in this way only local SIP users to do http requests.
For now supports only http 1.0, meaning it cannot take chunked requests
(usually happening in PUT requests with large body). Hope it is useful
for some of you. Its main goal right now is to offer the transport layer
for embedded xcap server (the new xcap_server module), but it can be
used for service monitoring, server control, etc.
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Miami, Fl, USA - June 21-23, 2010
http://www.asipto.com/index.php/kamailio-advanced-training/
Module: sip-router
Branch: master
Commit: 4cca625ce8229c5513451d135c09d9701c80dcd7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4cca625…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)iptel.org>
Date: Wed May 26 11:31:51 2010 +0200
tm: support for changing the reply status in the script
The reply status code is re-read after the onreply_route block
is executed which makes possile to change the status code from the script.
The status code shall be rewritten directly in the message buffer
and in the parsed structure, and the class of provisional and
positive final replies cannot be changed.
---
modules/tm/t_reply.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 9ad1d0e..2e6fd55 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -2129,6 +2129,17 @@ int reply_received( struct sip_msg *p_msg )
stop_rb_timers(&uac->request);
}
#endif /* TM_ONREPLY_FINAL_DROP_OK */
+ /* Re-read the status code, it can be changed in the route block. */
+#ifdef EXTRA_DEBUG
+ /* The class of provisional and positive final replies cannot be changed. */
+ if (((msg_status < 300) || (p_msg->REPLY_STATUS < 300))
+ && (msg_status/100 != p_msg->REPLY_STATUS/100)
+ ) {
+ LOG(L_ERR, "ERROR: The class of provisional and "
+ "positive final replies should not be changed!\n");
+ }
+#endif /* EXTRA_DEBUG */
+ msg_status=p_msg->REPLY_STATUS;
}
#ifdef USE_DST_BLACKLIST
/* add temporary to the blacklist the source of a 503 reply */