Hello,
As you will see I have merged my branch back into master.
These changes add a new event route [tm:branch-failure] to the tm module
which is run when any failure response is received on a transaction.
The event_route uses a new route type BRANCH_ROUTE which limits the
functions that can be run in the route.
The functions t_check_status(), t_next_contact_flow(), t_relay() and
unregister() can be used in this route.
A new pv $T_reply_ruid is accessible in this route which can be used to
unregister a single contact entry.
The following example route can be used on a registrar to handle failed
or invalid flows:
event_route[tm:branch-failure] {
xlog("L_INFO", "event_route[tm:branch-failure]\n");
if (t_check_status("430|403")) {
if (!unregister("location", "$tu", "$T_reply_ruid"))
{
xlog("L_WARN", "failed to unregister $tu with
ruid $T_reply_ruid\n");
}
if (!t_next_contact_flow())
{
xlog("L_INFO", "No more flows\n");
}
else
{
xlog("L_INFO", "Next flow\n");
t_relay();
}
}
}
Any bugs, memory leaks etc. let me know!
Hugh
--
Hugh Waite
Principal Design Engineer
Crocodile RCS Ltd.
please help
----- Forwarded by Piyush Bansal/RCOM/RelianceADA on 10/10/2013 10:51 AM
-----
From:
Piyush Bansal/RCOM/RelianceADA
To:
serusers(a)iptel.org, serdev(a)iptel.org
Date:
10/09/2013 12:14 PM
Subject:
query related to NOTIFY message size
Hi there,
I have certain queries regarding batch SUBSCRIBE and NOTIFY. I
have a user who has 100 buddies in his buddy list. If any of his buddy
changes his/her presence status, that user gets a NOTIFY message with
presence status of all the 100 buddies.
In that case, the message size is exceeding 500 KB. Thats quite a
higher value for a UDP packet.
Can anybody suggest-
1. If there is any way to restrict the size of the packet.
2. How to ensure that the packet is received correctly by the client.
Thanks and Regards,
--Piyush Bansal
The information contained in this electronic message (email) and any attachments to this email are intended for the exclusive use of the addressee(s) and access to this email by any one else is unauthorised. The email may contain proprietary, confidential or privileged information or information relating to Reliance Group. If you are not the intended recipient, please notify the sender by telephone, fax, or return email and delete this communication and any attachments thereto, immediately from your computer. Any dissemination, distribution, or copying of this communication and the attachments thereto (in whole or part), in any manner, is strictly prohibited and actionable at law. The recipient acknowledges that emails are susceptible to alteration and their integrity can not be guaranteed and that Company does not guarantee that any e-mail is virus-free and accept no liability for any damage caused by any virus transmitted by this email.
Hi,
I am trying to use t_suspend()/t_continue() multiple times on the same
transaction. Calling t_suspend() more than once works, but the second
time I call t_continue() the transaction is killed and a 500 response is
sent. It is the "if (branch == t->nr_of_outgoings)" check from the code
fragment below (from t_suspend.c:t_continue()) that results in the
transaction being killed - you can see the debug/error line I added to
determine this in the fragment.
Is using t_suspend()/t_continue() multiple times something that should
work?
Thanks,
Peter
if (t->uas.status < 200) {
/* No final reply has been sent yet.
* Check whether or not there is any pending branch.
*/
for ( branch = 0;
branch < t->nr_of_outgoings;
branch++
) {
if ((t->uac[branch].request.buffer != NULL)
&& (t->uac[branch].last_received < 200)
)
break;
}
if (branch == t->nr_of_outgoings) {
/* There is not any open branch so there is
* no chance that a final response will be
received. */
ret = 0;
LM_ERR("branch == t->nr_of_outgoings\n");
goto kill_trans;
}
}
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
RFC3261 8.1.1.2 states that To header "may or may not be the ultimate
recipient of the request", and 8.1.1.3 states that From header is
"possibly the user's address-of-record". So either of them cannot be
fully trusted.
This was already noted and fixed partially in commit 1ef4587612806a94
("modules/sca: reconcile Contact and From URIs in ACK callback").
But similar issues happen when using ENUM and/or calling using local
alias (numbers only, or local forward) and the destination is in another
SIP domain. To-header contains the initial domain, and not the AoR domain.
When handling response to such INVITE a sane way to determine correct
AoR is to inspect the Call-Info header's Application Server URI.
Thus this changes AoR canonicalization to happens as follow:
1. User portion is taken from Contact header if present, otherwise
from the applicable From / To header.
2. Domain/port part is taken from Call-Info header if present, and
otherwise from the applicable From / To header.
---
This has not fully tested, but this seems to be the root case why SCA does
not on certain inter-domain calls that I get. I'd like to get review comments,
and possible other fix ideas. I'll let you know how the testing goes, and
if looks OK to you can push this to master and relevant stable branches.
modules/sca/sca_util.c | 51 +++++++++++++++++++++++++++-----------------------
1 file changed, 28 insertions(+), 23 deletions(-)
diff --git a/modules/sca/sca_util.c b/modules/sca/sca_util.c
index 143ac47..e209cc0 100644
--- a/modules/sca/sca_util.c
+++ b/modules/sca/sca_util.c
@@ -26,6 +26,7 @@
#include <assert.h>
#include "sca_util.h"
+#include "sca_call_info.h"
#include "../../parser/sdp/sdp.h"
@@ -343,9 +344,13 @@ sca_aor_create_from_info( str *aor, uri_type type, str *user, str *domain,
sca_create_canonical_aor_for_ua( sip_msg_t *msg, str *c_aor, int ua_opts )
{
struct to_body *tf = NULL;
- sip_uri_t c_uri;
- str tf_aor = STR_NULL;
+ str user_portion;
+ str domain_portion;
+ str port_portion = STR_NULL;
str contact_uri = STR_NULL;
+ sip_uri_t c_uri;
+ sca_call_info call_info;
+ hdr_field_t *call_info_hdr;
int rc = -1;
assert( msg != NULL );
@@ -373,12 +378,6 @@ sca_create_canonical_aor_for_ua( sip_msg_t *msg, str *c_aor, int ua_opts )
}
}
- if ( sca_uri_extract_aor( &tf->uri, &tf_aor ) < 0 ) {
- LM_ERR( "sca_create_canonical_aor: failed to extract AoR from "
- "URI <%.*s>", STR_FMT( &tf->uri ));
- goto done;
- }
-
memset( &c_uri, 0, sizeof( sip_uri_t ));
if (( rc = sca_get_msg_contact_uri( msg, &contact_uri )) < 0 ) {
LM_ERR( "sca_create_canonical_aor: failed to get contact URI from "
@@ -394,22 +393,28 @@ sca_create_canonical_aor_for_ua( sip_msg_t *msg, str *c_aor, int ua_opts )
}
}
- if ( SCA_STR_EMPTY( &c_uri.user ) ||
- SCA_STR_EQ( &c_uri.user, &tf->parsed_uri.user )) {
- /* empty contact header or Contact user matches To/From AoR */
- c_aor->s = (char *)pkg_malloc( tf_aor.len );
- c_aor->len = tf_aor.len;
- memcpy( c_aor->s, tf_aor.s, tf_aor.len );
+ /* Prefer Contact header user, fallback to To/From */
+ if ( SCA_STR_EMPTY( &c_uri.user ) )
+ user_portion = tf->parsed_uri.user;
+ else
+ user_portion = c_uri.user;
+
+ memset( &call_info, 0, sizeof( sca_call_info ));
+ call_info_hdr = sca_call_info_header_find( msg->headers );
+ if ( !SCA_HEADER_EMPTY( call_info_hdr ) &&
+ sca_call_info_body_parse( &call_info_hdr->body, &call_info ) >= 0 ) {
+ /* Call-Info present, use the server name as AoR domain */
+ domain_portion = call_info.sca_uri;
} else {
- /* Contact user and To/From user mismatch */
- if ( sca_aor_create_from_info( c_aor, c_uri.type,
- &c_uri.user, &tf->parsed_uri.host,
- &tf->parsed_uri.port ) < 0 ) {
- LM_ERR( "sca_create_canonical_aor: failed to create AoR from "
- "Contact <%.*s> and URI <%.*s>",
- STR_FMT( &contact_uri ), STR_FMT( &tf_aor ));
- goto done;
- }
+ /* Use To/From domain */
+ domain_portion = tf->parsed_uri.host;
+ port_portion = tf->parsed_uri.port;
+ }
+
+ if ( sca_aor_create_from_info( c_aor, c_uri.type, &user_portion, &domain_portion, &port_portion ) < 0 ) {
+ LM_ERR( "sca_create_canonical_aor: failed to create canonical AoR "
+ "user: <%.*s>, domain: <%.*s>", STR_FMT( &user_portion ), STR_FMT( &domain_portion ));
+ goto done;
}
rc = 1;
--
1.8.4
Hi all,
This has been in the back of my head from some time now. Libconfuse is a
small project not distributed with major distros and unmaintained for 3.5
years now. As it is only used for reading of a simple cfg file, I want to
write a simple parser that does the job(I do not want external deps ... see
below why)
Benefits: we can now pack carrierroute with the common used modules (as it
will not have any external dependencies) and also will remove a lot of
problems seen on the list regarding linkage of libconfuse.
Any thoughts?
Marius
Hi, the new RFC 6665 mandates that the subscription dialog is made
*after* the first NOTIFY from the UAS (rather than after the 200 to
the initial SUBSCRIBE). This means that the UAC MUST take the route
set from the *first* received NOTIFY (instead of taking it from the
200 to the initial SUBSCRIBE).
Therefore a proxy compliant with RFC 6665 MUST always add RR to
in-dialog NOTIFY requests and thus, I propose that the default SR
script file implements it.
Regards.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Hello,
There was some talk about restructuring the Kamailio code (for example,
putting the core into an "src/" or "core/" directory and having an
"include/" directory).
Would there be any mileage in considering a move to GitHub for the
repository at the same time?
Regards,
Peter
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
Hello,
we are preparing for a new VUC session to give an update about Kamailio
project - a perfect timing as we are just about to release a new major
version.
We will like to get many developers involved to be able to highlight
properly what is new, especially those that did new development for v4.1
- new modules or enhancement to existing modules. However, any developer
and community member is welcome to join, we will appreciate it very
much, in support of the project.
Those that have a google hangout account can participate with video,
otherwise there are options to join via sip or pstn audio calls - you
can see more details at:
- http://vuc.me
The number of participants with video is limited, therefore if you plan
to do it, let me know to be able to coordinate and send you the invite
link when the session starts.
No matter you participate with audio/video, you can join the IRC channel
#vuc on freenode.net for text chatting during the event.
I made quickly a news about the event:
- http://www.kamailio.org/w/2013/10/kamailio-update-on-vuc-nov-15-2013/
I will add names of other participants as I get confirmations. Do
suggest topics to highlight/discuss there as well.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Nov 25-28
- more details about Kamailio trainings at http://www.asipto.com -
Hi,
Kamailio's NAPTR behavior by default ignores the Order field, which it is
not allowed to do. Excerpt from RFC 2915:
Order
A 16-bit unsigned integer specifying the order in which the NAPTR
records MUST be processed to ensure the correct ordering of
rules. Low numbers are processed before high numbers, and once a
NAPTR is found whose rule "matches" the target, the client MUST
NOT consider any NAPTRs with a higher value for order (except as
noted below for the Flags field).
Currently one can set dns_{udp,tcp,tls,sctp}_pref to the same value and
then it will respect the Order field. This has the problem that the SRV
lookup order is forced to udp, tcp, tls and sctp.¹ Hence you can not
follow the RFC for NAPTR and also set your own priorities for SRV. E.g. I
want to have tls -> tcp -> udp and adhere to the NAPTR.
Made a core option, dns_naptr_ignore_rfc, default off, to preserve today's
behavior. See attached patch.
One implementation detail is that one currently can disable a protocol
by setting the priority to -1. In my patch that is currently ignored.
Can add a check for that in init_naptr_proto_prefs() before setting
a protocol's preference to 1.
¹ Mandated by the order of ip_addr.h's enum sip_protos.
--
Øyvind Kolbu