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
With 4.1, I've got a call scenario that looks like this:
1. INVITE -->
2. <-- 100
3. <-- 183
4. <-- 200 OK
5. <-- 200 OK again (no ACK from near end)
6. Finally an e2e ACK comes through -->
7. (38 seconds later) BYE -->
8. (no response to BYE) BYE -->
9. BYE -->
10. BYE -->
11. BYE -->
12. BYE -->
13. BYE -->
etc.
I've also got another call that looks very similarly, except that the
BYE comes from the callee instead of the caller. It also goes
unanswered by the near end.
I am tracking both dialogs with 'dialog', and, sooner or later, they end
up in DELETED state. However, they do not get deleted. I have one that
has been in there for 4 days and isn't going anywhere, and another that
has been stuck in DELETED state for 3. My dialog timeout is set to 4
hours, but the timeout operation doesn't delete dialogs that are already
DELETED.
Moreover, dlg_end_dlg is not a means of removing these dialogs, either:
[root@gw1 ~]# kamctl fifo dlg_end_dlg 154 6753
500 Operation failed
Any suggestions on what to do here? Should this be considered a bug?
Thanks,
-- Alex
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
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>