diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 0d41f044ec..30dff37caa 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -1552,6 +1552,10 @@ 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 (sip && sip->sip_from) { from_user = sip->sip_from->a_url->url_user; from_host = sip->sip_from->a_url->url_host;