Module: sip-router
Branch: master
Commit: 0956052b4e28c941c55c0d5e4b5550ee12b222ed
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0956052…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Mon Mar 21 17:17:12 2011 +0200
modules_k/rr Do not falsely recover after strict route if RURI matches the server
Check if the RURI contains an lr param. If it doesn't, than the request
doesn't come after a strict route server, as Kamailio always adds a lr
parameter(always loose routes)
This fixes problems with re-SUBSCRIBEs where RURI identifies the resourse and can be the
same as the initial
subscribe.
---
modules_k/rr/loose.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/modules_k/rr/loose.c b/modules_k/rr/loose.c
index 9cf1ef9..b34eb65 100644
--- a/modules_k/rr/loose.c
+++ b/modules_k/rr/loose.c
@@ -928,7 +928,15 @@ int loose_route(struct sip_msg* _m)
#else
if (is_myself(&_m->parsed_uri.host, _m->parsed_uri.port_no)) {
#endif
- return after_strict(_m);
+ /* even if RURI is myself check to see if it's really after_strict by
+ looking over the lr param, as kamailio always adds it
+ If lr is missing, than surely this was not after strict
+ */
+ if(!is_strict(GET_RURI(_m))){
+ return after_strict(_m);
+ } else {
+ return after_loose(_m, 0);
+ }
} else {
return after_loose(_m, 0);
}