Module: kamailio
Branch: master
Commit: 480399653e00fdbb3a6352045814a7fbf3277060
URL:
https://github.com/kamailio/kamailio/commit/480399653e00fdbb3a6352045814a7f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2016-10-24T16:54:59+02:00
sca: use To header as target if SUBSCRIBE is in-dialog
---
Modified: modules/sca/sca_subscribe.c
---
Diff:
https://github.com/kamailio/kamailio/commit/480399653e00fdbb3a6352045814a7f…
Patch:
https://github.com/kamailio/kamailio/commit/480399653e00fdbb3a6352045814a7f…
---
diff --git a/modules/sca/sca_subscribe.c b/modules/sca/sca_subscribe.c
index efa931c..e9fb461 100644
--- a/modules/sca/sca_subscribe.c
+++ b/modules/sca/sca_subscribe.c
@@ -1082,14 +1082,17 @@ int sca_subscription_from_request(sca_mod *scam, sip_msg_t *msg,
int event_type,
goto error;
}
}
+ if (sca_uri_extract_aor(ruri, &req_sub->target_aor) < 0) {
+ LM_ERR("Failed to extract AoR from RURI %.*s\n", STR_FMT(ruri));
+ goto error;
+ }
+ }
+ else {
+ /* we are in-dialog */
+ req_sub->target_aor = to->uri;
}
req_sub->subscriber = contact_uri;
- if (sca_uri_extract_aor(ruri, &req_sub->target_aor) < 0) {
- LM_ERR("Failed to extract AoR from RURI %.*s\n",
- STR_FMT(ruri));
- goto error;
- }
req_sub->event = event_type;
req_sub->index = SCA_CALL_INFO_APPEARANCE_INDEX_ANY;
req_sub->expires = expires;