diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 661556d51b..ed65a2616c 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1280,7 +1280,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi if (!switch_channel_test_flag(channel, CF_ANSWERED) && !sofia_test_flag(tech_pvt, TFLAG_BYE)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Overlap Dial with %d %s\n", code, reason); - nua_respond(tech_pvt->nh, code, su_strdup(tech_pvt->nh->nh_home, reason), TAG_IF(to_uri, SIPTAG_CONTACT_STR(to_uri)), + nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), TAG_IF(to_uri, SIPTAG_CONTACT_STR(to_uri)), SIPTAG_SUPPORTED_STR(NULL), SIPTAG_ACCEPT_STR(NULL), TAG_IF(!switch_strlen_zero(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)), TAG_END()); @@ -1303,12 +1303,12 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi sofia_glue_tech_patch_sdp(tech_pvt); sofia_glue_tech_proxy_remote_addr(tech_pvt); } - nua_respond(tech_pvt->nh, code, su_strdup(tech_pvt->nh->nh_home, reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact), + nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), SOATAG_REUSE_REJECTED(1), SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END()); } else { - nua_respond(tech_pvt->nh, code, su_strdup(tech_pvt->nh->nh_home, reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact), TAG_END()); + nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact), TAG_END()); } } } diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index b43a930ca4..8ba631329f 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -793,7 +793,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand } if (sip->sip_path) { - path_val = sip_header_as_string(nh->nh_home, (void *) sip->sip_path); + path_val = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_path); path_encoded_len = (strlen(path_val) * 3) + 1; switch_zmalloc(path_encoded, path_encoded_len); switch_copy_string(path_encoded, ";fs_path=", 10); @@ -1117,7 +1117,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand if (exptime) { switch_snprintf(exp_param, sizeof(exp_param), "expires=%ld", exptime); - sip_contact_add_param(nh->nh_home, sip->sip_contact, exp_param); + sip_contact_add_param(nua_handle_home(nh), sip->sip_contact, exp_param); if (switch_event_create(&s_event, SWITCH_EVENT_MESSAGE_QUERY) == SWITCH_STATUS_SUCCESS) { switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "Message-Account", "sip:%s@%s", to_user, reg_host); @@ -1147,10 +1147,10 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand } if (sofia_test_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE)) { - char *full_contact = sip_header_as_string(nh->nh_home, (void *) sip->sip_contact); + char *full_contact = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_contact); if (full_contact && switch_stristr("SUBSCRIBE", full_contact)) { sofia_sla_handle_register(nua, profile, sip, exptime, full_contact); - su_free(nh->nh_home, full_contact); + su_free(nua_handle_home(nh), full_contact); } } diff --git a/src/mod/endpoints/mod_sofia/sofia_sla.c b/src/mod/endpoints/mod_sofia/sofia_sla.c index 258fd7ede2..7dd79f5f26 100644 --- a/src/mod/endpoints/mod_sofia/sofia_sla.c +++ b/src/mod/endpoints/mod_sofia/sofia_sla.c @@ -217,7 +217,7 @@ void sofia_sla_handle_sip_r_subscribe(int status, nua_handle_destroy(nh); sofia_private_free(sofia_private); } else { - char *full_contact = sip_header_as_string(nh->nh_home, (void *) sip->sip_contact); + char *full_contact = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_contact); time_t expires = switch_epoch_time_now(NULL); char *sql; char *contact_str = strip_uri(full_contact);