diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h index e249be314d..1152c3d53f 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.h +++ b/src/mod/endpoints/mod_sofia/mod_sofia.h @@ -434,6 +434,7 @@ struct sofia_profile { char *tls_bind_params; char *tls_cert_dir; char *reg_domain; + char *sub_domain; char *reg_db_domain; char *user_agent; char *record_template; diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index ecc892d579..0734d19d31 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1893,6 +1893,8 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile) profile->local_network = switch_core_strdup(profile->pool, val); } else if (!strcasecmp(var, "force-register-domain")) { profile->reg_domain = switch_core_strdup(profile->pool, val); + } else if (!strcasecmp(var, "force-subscription-domain")) { + profile->sub_domain = switch_core_strdup(profile->pool, val); } else if (!strcasecmp(var, "force-register-db-domain")) { profile->reg_db_domain = switch_core_strdup(profile->pool, val); } else if (!strcasecmp(var, "hold-music")) { diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 30dff37caa..ca8f9e4627 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -1552,8 +1552,8 @@ void sofia_presence_handle_sip_i_subscribe(int status, to_host = to->a_url->url_host; } - if (profile->reg_db_domain) { - to_host = profile->reg_db_domain; + if (profile->sub_domain) { + to_host = profile->sub_domain; } if (sip && sip->sip_from) {