error:
- if (sip->sip_event && sip->sip_event->o_type && !strcasecmp(sip->sip_event->o_type, "message-summary")) {
+ if (sip && sip->sip_event && sip->sip_event->o_type && !strcasecmp(sip->sip_event->o_type, "message-summary")) {
/* unsolicited mwi, just say ok */
nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END());
} else {
switch_event_destroy(&auth_params);
}
- return r;
+ return (uint8_t)r;
}
if (session) {
private_object_t *tech_pvt;
- switch_channel_t *channel = switch_core_session_get_channel(session);
if ((tech_pvt = switch_core_session_get_private(session)) && sofia_test_flag(tech_pvt, TFLAG_REFER)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Received reply from REFER\n");
goto end;
}
- gw_name = switch_channel_get_variable(channel, "sip_use_gateway");
+ gw_name = switch_channel_get_variable(switch_core_session_get_channel(session), "sip_use_gateway");
}