Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/kamailio/kamailio
Browse files Browse the repository at this point in the history
# By Victor Seva
# Via Victor Seva
* 'master' of https://github.com/kamailio/kamailio:
  sca: obey server_address param at subscription replies
  • Loading branch information
The Root committed Oct 24, 2016
2 parents d79b191 + 531df44 commit abae614
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/sca/doc/sca_admin.xml
Expand Up @@ -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>
Expand Down
7 changes: 6 additions & 1 deletion modules/sca/sca_subscribe.c
Expand Up @@ -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,
Expand Down

0 comments on commit abae614

Please sign in to comment.