Module: kamailio
Branch: master
Commit: abae614277a723e79814966d412965ebc5359142
URL:
https://github.com/kamailio/kamailio/commit/abae614277a723e79814966d412965e…
Author: The Root <root(a)kamailio.org>
Committer: The Root <root(a)kamailio.org>
Date: 2016-10-24T10:46:19+02:00
Merge branch 'master' of
https://github.com/kamailio/kamailio
# By Victor Seva
# Via Victor Seva
* 'master' of
https://github.com/kamailio/kamailio:
sca: obey server_address param at subscription replies
---
Modified: modules/sca/doc/sca_admin.xml
Modified: modules/sca/sca_subscribe.c
---
Diff:
https://github.com/kamailio/kamailio/commit/abae614277a723e79814966d412965e…
Patch:
https://github.com/kamailio/kamailio/commit/abae614277a723e79814966d412965e…
---
diff --git a/modules/sca/doc/sca_admin.xml b/modules/sca/doc/sca_admin.xml
index bf212a3..6ff3944 100644
--- a/modules/sca/doc/sca_admin.xml
+++ b/modules/sca/doc/sca_admin.xml
@@ -288,7 +288,7 @@ modparam("sca", "onhold_bflag", 15)
<title><varname>server_address</varname> (string)</title>
<para>
The server address which will become the value of Contact header filed
- for NOTIFY messages.
+ for reply messages.
</para>
<para>
<emphasis>
diff --git a/modules/sca/sca_subscribe.c b/modules/sca/sca_subscribe.c
index 37b46b4..efa931c 100644
--- a/modules/sca/sca_subscribe.c
+++ b/modules/sca/sca_subscribe.c
@@ -1377,7 +1377,12 @@ int sca_subscription_reply(sca_mod *scam, int status_code, char
*status_msg,
extra_headers.len = len;
SCA_STR_APPEND_CSTR(&extra_headers, "Contact: ");
- SCA_STR_APPEND(&extra_headers, &REQ_LINE(msg).uri);
+ if (sca->cfg->server_address != NULL) {
+ SCA_STR_APPEND( &extra_headers, sca->cfg->server_address);
+ }
+ else {
+ SCA_STR_APPEND( &extra_headers, &REQ_LINE( msg ).uri );
+ }
SCA_STR_APPEND_CSTR(&extra_headers, CRLF);
SCA_STR_COPY_CSTR(&extra_headers,