SWITCH_STANDARD_STREAM(stream);
for (rp = sip->sip_route; rp; rp = rp->r_next) {
- char *route = sip_header_as_string(nh->nh_home, (void *) rp);
+ char *route = sip_header_as_string(nua_handle_get_home(nh), (void *) rp);
stream.write_function(&stream, x == 0 ? "%s" : ",%s", route);
- su_free(nh->nh_home, route);
+ su_free(nua_handle_get_home(nh), route);
x++;
}
switch_channel_set_variable(channel, "sip_full_route", stream.data);
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
if (sip->sip_contact) {
- char *c = sip_header_as_string(nh->nh_home, (void *) sip->sip_contact);
+ char *c = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_contact);
switch_channel_set_variable(channel, "sip_recover_contact", c);
- su_free(nh->nh_home, c);
+ su_free(nua_handle_get_home(nh), c);
}
}
SWITCH_STANDARD_STREAM(reverse_stream);
for(rrp = sip->sip_record_route; rrp; rrp = rrp->r_next) {
- char *rr = sip_header_as_string(nh->nh_home, (void *) rrp);
+ char *rr = sip_header_as_string(nua_handle_get_home(nh), (void *) rrp);
forward_stream.write_function(&forward_stream, x == 0 ? "%s" : ",%s", rr);
tmp[y++] = rr;
if (y == 127) break;
while(y >= 0) {
reverse_stream.write_function(&reverse_stream, x == 0 ? "%s" : ",%s", tmp[y]);
- su_free(nh->nh_home, tmp[y]);
+ su_free(nua_handle_get_home(nh), tmp[y]);
y--;
x++;
}
SWITCH_STANDARD_STREAM(stream);
for(vp = sip->sip_via; vp; vp = vp->v_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
stream.write_function(&stream, x == 0 ? "%s" : ",%s", v);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
x++;
}
switch_channel_set_variable(channel, "sip_from_display", p);
}
if (p != sip->sip_from->a_display) free(p);
- if ((full = sip_header_as_string(nh->nh_home, (void *) sip->sip_from))) {
+ if ((full = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_from))) {
switch_channel_set_variable(channel, "sip_full_from", full);
- su_free(nh->nh_home, full);
+ su_free(nua_handle_get_home(nh), full);
}
}
if (p != sip->sip_to->a_display) free(p);
- if ((full = sip_header_as_string(nh->nh_home, (void *) sip->sip_to))) {
+ if ((full = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_to))) {
switch_channel_set_variable(channel, "sip_full_to", full);
- su_free(nh->nh_home, full);
+ su_free(nua_handle_get_home(nh), full);
}
}
if (sip_header) {
char *full;
- if ((full = sip_header_as_string(nh->nh_home, sip_header))) {
+ if ((full = sip_header_as_string(nua_handle_get_home(nh), sip_header))) {
switch_channel_set_variable(channel, var, full);
- su_free(nh->nh_home, full);
+ su_free(nua_handle_get_home(nh), full);
}
}
}
if (sip->sip_via) {
sip_via_t *vp;
for (vp = sip->sip_via; vp; vp = vp->v_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_via", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
if (sip->sip_record_route) {
sip_record_route_t *rrp;
for (rrp = sip->sip_record_route; rrp; rrp = rrp->r_next) {
- char *rr = sip_header_as_string(nh->nh_home, (void *) rrp);
+ char *rr = sip_header_as_string(nua_handle_get_home(nh), (void *) rrp);
switch_channel_add_variable_var_check(channel, "sip_i_record_route", rr, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, rr);
+ su_free(nua_handle_get_home(nh), rr);
}
}
if (sip->sip_proxy_authorization) {
sip_proxy_authorization_t *vp;
for (vp = sip->sip_proxy_authorization; vp; vp = vp->au_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_proxy_authorization", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
if (sip->sip_call_info) {
sip_call_info_t *vp;
for (vp = sip->sip_call_info; vp; vp = vp->ci_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_call_info", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
if (sip->sip_accept) {
sip_accept_t *vp;
for (vp = sip->sip_accept; vp; vp = vp->ac_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_accept", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
if (sip->sip_authorization) {
sip_authorization_t *vp;
for (vp = sip->sip_authorization; vp; vp = vp->au_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_authorization", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
if ((alert_info = sip_alert_info(sip))) {
sip_alert_info_t *vp;
for (vp = alert_info; vp; vp = vp->ai_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_alert_info", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
if ((passerted = sip_p_asserted_identity(sip))) {
sip_p_asserted_identity_t *vp;
for (vp = passerted; vp; vp = vp->paid_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_p_asserted_identity", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
if ((ppreferred = sip_p_preferred_identity(sip))) {
sip_p_preferred_identity_t *vp;
for (vp = ppreferred; vp; vp = vp->ppid_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_p_preferred_identity", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
if ((rpid = sip_remote_party_id(sip))) {
sip_remote_party_id_t *vp;
for (vp = rpid; vp; vp = vp->rpid_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_remote_party_id", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
if ((reply_to = sip_reply_to(sip))) {
sip_reply_to_t *vp;
for (vp = reply_to; vp; vp = vp->rplyto_next) {
- char *v = sip_header_as_string(nh->nh_home, (void *) vp);
+ char *v = sip_header_as_string(nua_handle_get_home(nh), (void *) vp);
switch_channel_add_variable_var_check(channel, "sip_i_reply_to", v, SWITCH_FALSE, SWITCH_STACK_PUSH);
- su_free(nh->nh_home, v);
+ su_free(nua_handle_get_home(nh), v);
}
}
call_info = switch_channel_get_variable(channel, "presence_call_info_full");
if (sip->sip_reason) {
- char *reason_header = sip_header_as_string(nh->nh_home, (void *) sip->sip_reason);
+ char *reason_header = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_reason);
if (!zstr(reason_header)) {
switch_channel_set_variable(channel, "sip_reason", reason_header);
if (sip && sip->sip_payload && sip->sip_payload->pl_data) {
if (sip->sip_payload->pl_len != strlen(sip->sip_payload->pl_data)) {
- sip->sip_payload->pl_data = su_strndup(nh->nh_home, sip->sip_payload->pl_data, sip->sip_payload->pl_len);
+ sip->sip_payload->pl_data = su_strndup(nua_handle_get_home(nh), sip->sip_payload->pl_data, sip->sip_payload->pl_len);
}
}
switch_channel_set_variable(channel, "sip_invite_failure_phrase", "CANCEL");
if (sip->sip_reason) {
- char *reason_header = sip_header_as_string(nh->nh_home, (void *) sip->sip_reason);
+ char *reason_header = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_reason);
if (!zstr(reason_header)) {
switch_channel_set_variable(channel, "sip_reason", reason_header);
contact_str = sofia_glue_gen_contact_str(profile, sip, nh, de, &np);
call_id = sip->sip_call_id ? sip->sip_call_id->i_id : "";
- full_from = sip_header_as_string(nh->nh_home, (void *) sip->sip_from);
- full_to = sip_header_as_string(nh->nh_home, (void *) sip->sip_to);
- full_via = sip_header_as_string(nh->nh_home, (void *) sip->sip_via);
+ full_from = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_from);
+ full_to = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_to);
+ full_via = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_via);
- full_agent = sip_header_as_string(nh->nh_home, (void *) sip->sip_user_agent);
+ full_agent = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_user_agent);
switch_stun_random_string(to_tag, 12, NULL);
sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE);
- sip_to_tag(nh->nh_home, sip->sip_to, to_tag);
+ sip_to_tag(nua_handle_get_home(nh), sip->sip_to, to_tag);
}
nua_respond(nh, SIP_202_ACCEPTED, SIPTAG_TO(sip->sip_to), NUTAG_WITH_THIS_MSG(de->data->e_msg), TAG_END());
de->nh, sofia_private, de->sip, de, (tagi_t *) de->data->e_tags);
nua_destroy_event(de->event);
- su_free(nh->nh_home, de);
+ su_free(nua_handle_get_home(nh), de);
switch_mutex_lock(profile->flag_mutex);
profile->queued_events--;
switch_mutex_unlock(profile->flag_mutex);
nua_handle_unref(nh);
- nua_stack_unref(nua);
+ nua_unref(nua);
}
profile->queued_events++;
switch_mutex_unlock(profile->flag_mutex);
- de = su_alloc(nh->nh_home, sizeof(*de));
+ de = su_alloc(nua_handle_get_home(nh), sizeof(*de));
memset(de, 0, sizeof(*de));
nua_save_event(nua, de->event);
de->nh = nua_handle_ref(nh);
de->data = nua_event_data(de->event);
de->sip = sip_object(de->data->e_msg);
de->profile = profile;
- de->nua = nua_stack_ref(nua);
+ de->nua = (nua_t *)su_home_ref(nua_get_home(nua));
if (event == nua_i_invite && !sofia_private) {
switch_core_session_t *session;
private_object_t *tech_pvt = NULL;
- if (!(sofia_private = su_alloc(nh->nh_home, sizeof(*sofia_private)))) {
+ if (!(sofia_private = su_alloc(nua_handle_get_home(nh), sizeof(*sofia_private)))) {
abort();
}
if (!sip || !sip->sip_call_id || zstr(sip->sip_call_id->i_id)) {
nua_respond(nh, 503, "INVALID INVITE", TAG_END());
nua_destroy_event(de->event);
- su_free(nh->nh_home, de);
+ su_free(nua_handle_get_home(nh), de);
switch_mutex_lock(profile->flag_mutex);
profile->queued_events--;
switch_mutex_unlock(profile->flag_mutex);
nua_handle_unref(nh);
- nua_stack_unref(nua);
+ nua_unref(nua);
goto end;
}
} else {
nua_respond(nh, 503, "Maximum Calls In Progress", SIPTAG_RETRY_AFTER_STR("300"), TAG_END());
nua_destroy_event(de->event);
- su_free(nh->nh_home, de);
+ su_free(nua_handle_get_home(nh), de);
switch_mutex_lock(profile->flag_mutex);
profile->queued_events--;
switch_mutex_unlock(profile->flag_mutex);
nua_handle_unref(nh);
- nua_stack_unref(nua);
+ nua_unref(nua);
goto end;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set params for %s\n", profile->name);
if (sofia_test_pflag(profile, PFLAG_AUTO_ASSIGN_PORT) || sofia_test_pflag(profile, PFLAG_AUTO_ASSIGN_TLS_PORT)) {
- sip_via_t *vias = nta_agent_via(profile->nua->nua_nta);
+ sip_via_t *vias = nta_agent_via(nua_get_agent(profile->nua));
sip_via_t *via = NULL;
for (via = vias; via; via = via->v_next) {
}
nua_message(other_tech_pvt->nh,
- TAG_IF(ct, SIPTAG_CONTENT_TYPE_STR(su_strdup(other_tech_pvt->nh->nh_home, ct))),
+ TAG_IF(ct, SIPTAG_CONTENT_TYPE_STR(su_strdup(nua_handle_get_home(other_tech_pvt->nh), ct))),
TAG_IF(!zstr(other_tech_pvt->user_via), SIPTAG_VIA_STR(other_tech_pvt->user_via)),
- TAG_IF(pl, SIPTAG_PAYLOAD_STR(su_strdup(other_tech_pvt->nh->nh_home, pl))),
+ TAG_IF(pl, SIPTAG_PAYLOAD_STR(su_strdup(nua_handle_get_home(other_tech_pvt->nh), pl))),
TAG_IF(!zstr(session_id_header), SIPTAG_HEADER_STR(session_id_header)),
TAG_END());
}
}
nua_info(other_tech_pvt->nh,
- TAG_IF(ct, SIPTAG_CONTENT_TYPE_STR(su_strdup(other_tech_pvt->nh->nh_home, ct))),
+ TAG_IF(ct, SIPTAG_CONTENT_TYPE_STR(su_strdup(nua_handle_get_home(other_tech_pvt->nh), ct))),
TAG_IF(!zstr(other_tech_pvt->user_via), SIPTAG_VIA_STR(other_tech_pvt->user_via)),
- TAG_IF(pl, SIPTAG_PAYLOAD_STR(su_strdup(other_tech_pvt->nh->nh_home, pl))),
+ TAG_IF(pl, SIPTAG_PAYLOAD_STR(su_strdup(nua_handle_get_home(other_tech_pvt->nh), pl))),
TAG_IF(!zstr(session_id_header), SIPTAG_HEADER_STR(session_id_header)),
TAG_END());
}
if ((rpid = sip_remote_party_id(sip))) {
if (rpid->rpid_url->url_user) {
- char *full_rpid_header = sip_header_as_string(nh->nh_home, (void *) rpid);
+ char *full_rpid_header = sip_header_as_string(nua_handle_get_home(nh), (void *) rpid);
from_user = rpid->rpid_url->url_user;
if (!zstr(full_rpid_header)) {
switch_channel_set_variable(channel, "sip_Remote-Party-ID", full_rpid_header);
if ((passerted = sip_p_asserted_identity(sip))) {
if (passerted->paid_url->url_user) {
- char *full_paid_header = sip_header_as_string(nh->nh_home, (void *) passerted);
+ char *full_paid_header = sip_header_as_string(nua_handle_get_home(nh), (void *) passerted);
//char *full_paid_header = (char *)(passerted->paid_common->h_data);
from_user = passerted->paid_url->url_user;
if (!zstr(full_paid_header)) {
if ((ppreferred = sip_p_preferred_identity(sip))) {
if (ppreferred->ppid_url->url_user) {
- char *full_ppid_header = sip_header_as_string(nh->nh_home, (void *) ppreferred);
+ char *full_ppid_header = sip_header_as_string(nua_handle_get_home(nh), (void *) ppreferred);
from_user = ppreferred->ppid_url->url_user;
if (!zstr(full_ppid_header)) {
switch_channel_set_variable(channel, "sip_P-Preferred-Identity", full_ppid_header);
}
if ((alert_info = sip_alert_info(sip))) {
- char *tmp = sip_header_as_string(nh->nh_home, (void *) alert_info);
+ char *tmp = sip_header_as_string(nua_handle_get_home(nh), (void *) alert_info);
switch_channel_set_variable(channel, "alert_info", tmp);
- su_free(nh->nh_home, tmp);
+ su_free(nua_handle_get_home(nh), tmp);
}
if ((call_info = sip_call_info(sip))) {
- call_info_str = sip_header_as_string(nh->nh_home, (void *) call_info);
+ call_info_str = sip_header_as_string(nua_handle_get_home(nh), (void *) call_info);
if (sofia_test_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE) && switch_stristr("appearance", call_info_str)) {
char *p;
call_info = call_info->ci_next;
while (call_info) {
- call_info_str = sip_header_as_string(nh->nh_home, (void *) call_info);
+ call_info_str = sip_header_as_string(nua_handle_get_home(nh), (void *) call_info);
switch_channel_add_variable_var_check(channel, "sip_call_info", call_info_str, SWITCH_FALSE, SWITCH_STACK_PUSH);
call_info = call_info->ci_next;
}
}
if ((privacy = sip_privacy(sip))) {
- char *full_priv_header = sip_header_as_string(nh->nh_home, (void *) privacy);
+ char *full_priv_header = sip_header_as_string(nua_handle_get_home(nh), (void *) privacy);
if (!zstr(full_priv_header)) {
switch_channel_set_variable(channel, "sip_Privacy", full_priv_header);
}
if (is_blocking) {
sanity = 200;
- while(!mstatus && --sanity && !msg_nh->nh_destroyed) {
+ while(!mstatus && --sanity && !nua_handle_is_destroyed(msg_nh)) {
switch_yield(100000);
}
}
nh = nua_handle(profile->nua, NULL, NUTAG_URL(contact), SIPTAG_CONTACT_STR(contact_str), TAG_END());
- cseq = sip_cseq_create(nh->nh_home, callsequence, SIP_METHOD_NOTIFY);
+ cseq = sip_cseq_create(nua_handle_get_home(nh), callsequence, SIP_METHOD_NOTIFY);
nua_handle_bind(nh, &mod_sofia_globals.destroy_private);
contact_user = sip->sip_contact->m_url->url_user;
}
- full_agent = sip_header_as_string(nh->nh_home, (void *) sip->sip_user_agent);
+ full_agent = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_user_agent);
//tl_gets(tags, NUTAG_SUBSTATE_REF(sub_state), TAG_END());
}
}
- event = sip_header_as_string(nh->nh_home, (void *) sip->sip_event);
+ event = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_event);
if (to) {
to_str = switch_mprintf("sip:%s@%s", to->a_url->url_user, to->a_url->url_host);
}
call_id = sip->sip_call_id->i_id;
- full_from = sip_header_as_string(nh->nh_home, (void *) sip->sip_from);
- full_to = sip_header_as_string(nh->nh_home, (void *) sip->sip_to);
- full_via = sip_header_as_string(nh->nh_home, (void *) sip->sip_via);
+ full_from = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_from);
+ full_to = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_to);
+ full_via = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_via);
if (sip->sip_expires && sip->sip_expires->ex_delta > 31536000) {
}
- if (nh && nh->nh_ds->ds_usage) {
+ if (nh) {
/* nua_dialog_usage_set_refresh_range(nh->nh_ds->ds_usage, exp_delta + SUB_OVERLAP, exp_delta + SUB_OVERLAP); */
- nua_dialog_usage_set_refresh_range(nh->nh_ds->ds_usage, exp_delta, exp_delta);
+ nua_handle_dialog_usage_set_refresh_range(nh, exp_delta, exp_delta);
}
if (contactstr && (p = strchr(contactstr, '@'))) {
}
if (nh) {
- sip_to_tag(nh->nh_home, sip->sip_to, use_to_tag);
+ sip_to_tag(nua_handle_get_home(nh), sip->sip_to, use_to_tag);
}
if (mod_sofia_globals.debug_presence > 0) {
if (zstr(full_agent) || (*full_agent != 'z' && *full_agent != 'Z')) {
/* supress endless loop bug with zoiper */
callsequence = sofia_presence_get_cseq(profile);
- cseq = sip_cseq_create(nh->nh_home, callsequence, SIP_METHOD_NOTIFY);
+ cseq = sip_cseq_create(nua_handle_get_home(nh), callsequence, SIP_METHOD_NOTIFY);
nua_notify(nh,
SIPTAG_EXPIRES_STR("0"),
SIPTAG_SUBSCRIPTION_STATE_STR(sstr),
char *p = NULL;
if (sip->sip_call_info) {
- full_call_info = sip_header_as_string(nh->nh_home, (void *) sip->sip_call_info);
+ full_call_info = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_call_info);
if ((p = strchr(full_call_info, ';'))) {
p++;
}
sync_sla(profile, to_user, to_host, SWITCH_FALSE, SWITCH_FALSE, NULL);
}
- su_free(nh->nh_home, full_call_info);
+ su_free(nua_handle_get_home(nh), full_call_info);
}
switch_time_t now;
if (sip->sip_call_info) {
- full_call_info = sip_header_as_string(nh->nh_home, (void *) sip->sip_call_info);
+ full_call_info = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_call_info);
if ((p = strchr(full_call_info, ';'))) {
p++;
}
callsequence = sofia_presence_get_cseq(profile);
- cseq = sip_cseq_create(nh->nh_home, callsequence, SIP_METHOD_NOTIFY);
+ cseq = sip_cseq_create(nua_handle_get_home(nh), callsequence, SIP_METHOD_NOTIFY);
nua_notify(nh,
SIPTAG_FROM(sip->sip_to),
SIPTAG_TO(sip->sip_from),
sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE);
sync_sla(profile, to_user, to_host, SWITCH_FALSE, SWITCH_FALSE, NULL);
- su_free(nh->nh_home, full_call_info);
+ su_free(nua_handle_get_home(nh), full_call_info);
}
} else if (!strcasecmp(event, "call-info")) {
sync_sla(profile, to_user, to_host, SWITCH_FALSE, SWITCH_FALSE, call_id);
}
if (event) {
- su_free(nh->nh_home, event);
+ su_free(nua_handle_get_home(nh), event);
}
if (full_from) {
- su_free(nh->nh_home, full_from);
+ su_free(nua_handle_get_home(nh), full_from);
}
if (full_to) {
- su_free(nh->nh_home, full_to);
+ su_free(nua_handle_get_home(nh), full_to);
}
if (full_via) {
- su_free(nh->nh_home, full_via);
+ su_free(nua_handle_get_home(nh), full_via);
}
if (full_agent) {
- su_free(nh->nh_home, full_agent);
+ su_free(nua_handle_get_home(nh), full_agent);
}
switch_safe_free(d_user);
char *open_closed = "", *note_txt = "";
if (sip->sip_user_agent) {
- full_agent = sip_header_as_string(nh->nh_home, (void *) sip->sip_user_agent);
+ full_agent = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_user_agent);
}
if ((tuple = switch_xml_child(xml, "tuple")) && (status = switch_xml_child(tuple, "status"))
}
}
- event_type = sip_header_as_string(nh->nh_home, (void *) sip->sip_event);
+ event_type = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_event);
if (count) {
if ((sql = switch_mprintf("delete from sip_presence where sip_user='%q' and sip_host='%q' "
}
if (event_type) {
- su_free(nh->nh_home, event_type);
+ su_free(nua_handle_get_home(nh), event_type);
}
if (full_agent) {
- su_free(nh->nh_home, full_agent);
+ su_free(nua_handle_get_home(nh), full_agent);
}
switch_xml_free(xml);
sip_unknown_t *un;
int first_history_info = 1;
- full_from = sip_header_as_string(nh->nh_home, (void *) sip->sip_from);
+ full_from = sip_header_as_string(nua_handle_get_home(nh), (void *) sip->sip_from);
if ((p = strchr(to_user, '+')) && p != to_user) {
switch_copy_string(proto, to_user, sizeof(proto));
switch_safe_free(from_addr);
if (full_from) {
- su_free(nh->nh_home, full_from);
+ su_free(nua_handle_get_home(nh), full_from);
}
}
}