Module: sip-router
Branch: master
Commit: a5f8f4cd4da60168fd73d7999c09181582ec5943
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a5f8f4cd4da60168fd73d7999c09181582ec5943

Author: Peter Dunkley <[email protected]>
Committer: Peter Dunkley <[email protected]>
Date:   Wed Mar 27 16:51:52 2013 +0000

modules/outbound: further improvement to the use_outbound() check

---

 modules/outbound/ob_mod.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/outbound/ob_mod.c b/modules/outbound/ob_mod.c
index a58fdff..3f76433 100644
--- a/modules/outbound/ob_mod.c
+++ b/modules/outbound/ob_mod.c
@@ -385,6 +385,14 @@ static int use_outbound_non_reg(struct sip_msg *msg)
                }
        }
 
+       /* Check there is a single Via: */
+       if (!(parse_headers(msg, HDR_VIA2_F, 0) == -1 || msg->via2 == 0
+               || msg->via2->error != PARSE_OK))
+       {
+               LM_INFO("second Via: found - outbound not used\n");
+               return 0;
+       }
+
        /* Look for ;ob in Contact-URIs */
        if (msg->contact
                || (parse_headers(msg, HDR_CONTACT_F, 0) != -1 && msg->contact))


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to