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
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.
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/
So I posted this to the user list in December, and got nowhere..
Can someone familiar with db_cassandra review my patch ( possibly clean
this up and commit it )
# git diff dbcassa_base.cpp
diff --git a/modules/db_cassandra/dbcassa_base.cpp
b/modules/db_cassandra/dbcassa_base.cpp
index e9d3a32..155221d 100644
--- a/modules/db_cassandra/dbcassa_base.cpp
+++ b/modules/db_cassandra/dbcassa_base.cpp
@@ -439,6 +439,7 @@ ColumnVecPtr cassa_translate_query(const db1_con_t* _h,
const db_key_t* _k,
int key_len=0, seckey_len = 0;
int no_kc, no_sec_kc;
dbcassa_table_p tbc;
+ char pk[255];
/** Lock table schema and construct primary and secondary key **/
if(_k) {
@@ -495,8 +496,12 @@ ColumnVecPtr cassa_translate_query(const db1_con_t*
_h, const db_key_t* _k,
} else { /* the table doesn't have any secondary key
defined */
if(_c) {
for(int i=0; i< _nc; i++) {
- sp.column_names.push_back(_c[i]->s);
- LM_DBG("Query col: %s\n", _c[i]->s);
+ sprintf(pk, "%.*s", _c[i]->len,
_c[i]->s );
+ sp.column_names.push_back( pk);
+
//sp.column_names.push_back(_c[i]->s);
+ LM_DBG("Query col: %s\n", pk );
+ //LM_DBG("Query col: %s\n",
_c[i]->s);
+ LM_DBG("JAY Query col: %.*s\n",
_c[i]->len, _c[i]->s);
}
LM_DBG("get %d columns\n", _nc);
sp.__isset.column_names = true; // set
yea I know I left crap in there, but it gives you an idea... also...
yea pk is a crap name... copy paste... and I havnt given any thought to the
size 255 , but thats probably fairly safe and anything smaller might not
be so safe.
( unless there is a limit elsewhere I should observe )
Jay