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!
Kamailio by default doesn't compile on OS/X Mavericks.
$ make
generating autover.h ...
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-print-directory -wC . cfg-defs
target architecture <x86_64>, host architecture <x86_64>
making config...
CC (gcc) [kamailio] action.o
error: invalid value '9' in '-O9'
make: *** [action.o] Error 1
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
Anyone that has found an optimal way to patch the Makefile?
/O
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>
Hi,
3GPP's "SIP Digest" is not working in the ims_auth module and stopping
of the module before the auth_vector was initialized causing
"Segmentation fault".
code source : origin/4.1
Regards
Marek.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you for understanding.
Hi,
I've been trying to set up Kamailio 4.0.5 as a P-CSCF, I-CSCF and S-CSCF
today, and hit a few issues which I've fixed.
http://sip-router.org/contribute/ suggests that patches should be
submitted to this list, so here I am.
The first issue I hit was the sem_post issue that has been reported from
time to time
(http://lists.kamailio.org/pipermail/sr-users/2013-January/076554.html)
- it looks as though sem_post is only included in -lpthread on Ubuntu
12.04, not -lrt
(https://bugs.launchpad.net/ubuntu/+source/manpages/+bug/874418), so
I've updated some Makefiles to reflect that.
I subsequently hit a segfault when calling pcscf_save: I've tracked this
down to a while loop that was missing curly braces, and so tried to
dereference a null pointer. I think there's another bug in this piece of
code - because h is NULL at the end of the first while loop, we never go
round the second loop, and so never call free_rr. It looks like even if
we did, h->parsed has been set to 0 before we try and free it, so
nothing would happen. I wasn't sure how the memory management here
works, though, and so haven't tried to change this.
I also found that the ims_auth module didn't handle standard SIP Digest
authentication on the MAR interface, only AKA and Digest-MD5 (which
seems to be specific to OpenIMSCore HSS, and not mentioned in the IMS
specs). Most of the code to allow SIP Digest authentication was already
there, so I just hooked the last piece in to get it to work. I'm not
sure whether this counts as a new feature or a bugfix - it's not clear
whether this was meant to be supported but just missing a piece, or not
meant to be supported but very easy to add in.
Finally, I was working from the 4.0 nightlies Debian repository, and the
examples/scsf/kamailio.cfg file for 4.0.x seems to skip authentication.
It looks like this section has been reworked heavily in 4.1.0, so this
may be less important - but I put together a different kamailio.cfg
based on a mailing list post
(http://lists.sip-router.org/pipermail/sr-users/2013-March/077142.html),
and it might make sense to use that as the default file for 4.0.x.
The attached patches are against the 4.0 branch in Git (specifically,
commit 1b98961522fd8a7eb73ecc7d1772541f8b81aabc). I'm happy to apply any
feedback which more knowledgeable contributors have.
Best regards,
Rob