Module: sip-router
Branch: 4.0
Commit: 86864275e240be94d901fe21dde2472701e1669e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8686427…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Jul 17 20:19:28 2013 +0200
uac: restrict check of multiple from/to header changes to request route blocks
- it can occur many times in due to branch route usage
- reported by Andrew Pogrebennyk, FS#323
(cherry picked from commit d3a0a8b15af59846fdaee5d9ceae61484f1d7301)
---
modules/uac/replace.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/uac/replace.c b/modules/uac/replace.c
index 791d69b..7f1f92c 100644
--- a/modules/uac/replace.c
+++ b/modules/uac/replace.c
@@ -39,6 +39,7 @@
#include "../../parser/parse_from.h"
#include "../../mem/mem.h"
#include "../../data_lump.h"
+#include "../../route.h"
#include "../../modules/tm/h_table.h"
#include "../../modules/tm/tm_load.h"
#include "../rr/api.h"
@@ -251,10 +252,12 @@ int replace_uri( struct sip_msg *msg, str *display, str *uri,
str * dlgvar_names;
uac_flag = (hdr==msg->from)?FL_USE_UAC_FROM:FL_USE_UAC_TO;
- if(msg->msg_flags & uac_flag)
- {
- LM_ERR("Called uac_replace multiple times on the message\n");
- return -1;
+ if(get_route_type()==REQUEST_ROUTE) {
+ if(msg->msg_flags & uac_flag)
+ {
+ LM_ERR("Called uac_replace multiple times on the message\n");
+ return -1;
+ }
}
/* consistency check! in AUTO mode, do NOT allow URI changing