}
if (!strchr(dest, '@')) {
- tech_pvt->dest = switch_core_session_sprintf(nsession, "sip:%s@%s", dest, sofia_glue_strip_proto(gateway_ptr->register_proxy));
+ tech_pvt->dest = switch_core_session_sprintf(nsession, "sip:%s@%s", dest, gateway_ptr->from_domain);
} else {
tech_pvt->dest = switch_core_session_sprintf(nsession, "sip:%s", dest);
}
if (!strncasecmp(proxy, "sip:", 4)) {
gateway->register_proxy = switch_core_strdup(gateway->pool, proxy);
- gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, register_proxy ? register_proxy + 4 : proxy + 4);
+ gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, from_domain);
} else {
gateway->register_proxy = switch_core_sprintf(gateway->pool, "sip:%s", proxy);
- gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, register_proxy ? register_proxy : proxy);
+ gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, from_domain);
}
gateway->expires_str = switch_core_strdup(gateway->pool, expire_seconds);