Hi,
going on with debug, the issue is that outgoing_find does not
check for different to_tag in provisional response.
I've created a patch that "works for me" which
handles different to_tag in provisional responses and
manage RSeq in right way if to_tag changed.
but I don't know if this is the proper way to do it.
open to better ideas.
regards,
matteo.
--- libsofia-sip-ua/nta/nta.c.orig 2011-03-11 15:49:18.000000000 +0100
+++ libsofia-sip-ua/nta/nta.c 2011-05-17 16:21:07.000000000 +0200
@@ -9120,8 +9120,14 @@
if (su_strcasecmp(orq->orq_from->a_tag, sip->sip_from->a_tag))
continue;
if (orq->orq_to->a_tag &&
- su_strcasecmp(orq->orq_to->a_tag, sip->sip_to->a_tag))
- continue;
+ su_strcasecmp(orq->orq_to->a_tag, sip->sip_to->a_tag)) {
+ /* to_tag can be different in provisional responses, after a remote call trasfer where dialog is different, for example */
+ if (status < 200 && status > 100) {
+ SU_DEBUG_9(("nta: Ignoring different to tags, orq->orq_to->a_tag:'%s', sip->sip_to->a_tag: '%s'\n",orq->orq_to->a_tag, sip->sip_to->a_tag));
+ } else {
+ continue;
+ }
+ }
if (orq->orq_method == sip_method_ack && 300 <= status)
continue;
@@ -11281,6 +11287,12 @@
return -1;
}
+ /* in a new dialog RSeq starts from scratch */
+ if (orq->orq_to->a_tag && su_strcasecmp(orq->orq_to->a_tag, sip->sip_to->a_tag)) {
+ SU_DEBUG_5(("nta: %03u %s with different to_tag: new dialog, accepting new RSeq\n", status, phrase));
+ return 0;
+ }
+
if (orq->orq_rseq && orq->orq_rseq + 1 != rseq) {
SU_DEBUG_3(("nta: %03d %s is not expected (RSeq: %u, expecting %u)\n",
status, sip->sip_status->st_phrase,
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel