diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 471837bd8c..a6f52c651e 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -714,6 +714,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand char *dup_mwi_account = NULL; char *mwi_user = NULL; char *mwi_host = NULL; + char *var = NULL; const char *from_user = NULL; const char *from_host = NULL; const char *reg_host = profile->reg_db_domain; @@ -1008,6 +1009,11 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand } reg: + + if (v_event && *v_event && (var = switch_event_get_header(*v_event, "sip-force-extension"))) { + to_user = var; + } + if (v_event && *v_event && (mwi_account = switch_event_get_header(*v_event, "mwi-account"))) { dup_mwi_account = strdup(mwi_account); switch_assert(dup_mwi_account != NULL);