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
So Im writing a custom module to implement some of our business logic,
there are a few steps that im building into the module, for example
conform_callerid
conform_destination
what I want to achive should be fairly simple, but let me explain and im
sure someone will tell me where to look.
when I call conform_callerid, I want to store a few bits of info so
Initially I store them in a global variable ( yup lazy & dangerous I guess )
then I write the pv "get" function, to return the value from the global.
this was only done as a quick proof of concept.
but being global, im sure the variable will be overwritten by other message
etc etc..
so I effectively want to store some custom fields against the message.
I didnt see this on the msg structure, but maybe I missed something
or is there a better way to achieve this ??
basically I want to be able to call conform_callerid
then when I call conform_destination I want to look at some fields from the
conform_callerid process ( within the context of the message we are
processing )
any pointers would be appreciated.
--
Sincerely
Jay
Hello,
In our installation of Kamailio 4.1.1 we need to branch messages and
invites to more than 100 clients.
The actual implementation only allows 12 branches.
We have implemented new functions to be able to control up to 512 branches.
Therefore we use several functions to control the bitmap and a dynamic
array for uac branches. Every uac initializes with 12 branches as before,
but when the limit is reached, new branches are dynamically added to the
array.
We are still in testing-phase but I would like to know if you would add
this feature in some of the next versions.
Regards
--
*Jan **Gaida*
Ingeniero Desarrollo Software C/ Marconi 3 (PTM)
28760 Tres Cantos
Spain
jan.gaida(a)grupoamper.com | www.grupoamper.com
--
This message and any attachments are intended only for the use of the
individual to whom they are addressed and it may contain information that
is privileged or confidential. If you have received this communication by
mistake, please notify us immediately by e-mail or telephone.The storage,
recording, use or disclosure of this e-mail and its attachments by anyone
other than the intended recipient is strictly prohibited. This message has
been verified using antivirus software; however, the sender is not
responsible for any damage to hardware or software resulting from the
presence of any virus.
Este mensaje y cualquier anexo son exclusivamente para la persona a quien
van dirigidos y pueden contener información privilegiada o confidencial. Si
usted ha recibido esta comunicación por error, le agradecemos notificarlo
de inmediato por esta misma vía o por teléfono. Está prohibida su
retención, grabación, utilización o divulgación con cualquier propósito.
Este mensaje ha sido verificado con software antivirus; sin embargo, el
remitente no se hace responsable en caso de que en éste o en los archivos
adjuntos haya presencia de algún virus que pueda generar daños en los
equipos o programas del destinatario.
Hi,
I'd like to develop module for Kamailio which will be working with RTP/RTCP
packets. Is there any way to capture and edit RTP packet in module of
Kamailio for example in module extended from *topoh*?
In topoh there are two events SREV_NET_DATA_IN and SREV_NET_DATA_OUT but I
didn't be able to capture any RTP packets by them.
Thanks in advance for any help or useful information.
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