Module: kamailio
Branch: master
Commit: 9075253cd220165a5386ea6ed8f474ff185f8ed9
URL:
https://github.com/kamailio/kamailio/commit/9075253cd220165a5386ea6ed8f474f…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: 2019-02-26T07:56:44+11:00
rr: parse route headers if not parsed already (instead of aborting)
---
Modified: src/modules/rr/loose.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9075253cd220165a5386ea6ed8f474f…
Patch:
https://github.com/kamailio/kamailio/commit/9075253cd220165a5386ea6ed8f474f…
---
diff --git a/src/modules/rr/loose.c b/src/modules/rr/loose.c
index efe428a1cd..e9138985f3 100644
--- a/src/modules/rr/loose.c
+++ b/src/modules/rr/loose.c
@@ -998,7 +998,19 @@ int redo_route_params(sip_msg_t *msg)
return -1;
}
- if(msg->route==NULL || msg->route->parsed==NULL) {
+ if(msg->route==NULL) {
+ return -1;
+ }
+
+ if(msg->route->parsed==NULL) {
+ if (parse_rr(msg->route) < 0) {
+ LM_ERR("failed to parse Route HF\n");
+ return -1;
+ }
+ }
+
+ if(msg->route->parsed==NULL) {
+ LM_ERR("NULL parsed Route header\n");
return -1;
}