mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-17 01:02:12 +00:00
FS-4079 possible fix
This commit is contained in:
parent
b735735ea1
commit
56325e8c71
@ -2339,6 +2339,19 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SWITCH_MESSAGE_INDICATE_RESPOND:
|
case SWITCH_MESSAGE_INDICATE_RESPOND:
|
||||||
|
{
|
||||||
|
int status = 0;
|
||||||
|
|
||||||
|
if (tech_pvt->nh && tech_pvt->nh->nh_ds && tech_pvt->nh->nh_ds->ds_sr && nua_server_request_is_pending(tech_pvt->nh->nh_ds->ds_sr)) {
|
||||||
|
status = tech_pvt->nh->nh_ds->ds_sr->sr_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status == 0 || status > 199 || tech_pvt->nh->nh_destroyed) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "%s Cannot call respond on handle at status %d\n",
|
||||||
|
switch_channel_get_name(channel), status);
|
||||||
|
goto end_lock;
|
||||||
|
}
|
||||||
|
|
||||||
if (msg->numeric_arg || msg->string_arg) {
|
if (msg->numeric_arg || msg->string_arg) {
|
||||||
int code = msg->numeric_arg;
|
int code = msg->numeric_arg;
|
||||||
const char *reason = NULL;
|
const char *reason = NULL;
|
||||||
@ -2485,6 +2498,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SWITCH_MESSAGE_INDICATE_RINGING:
|
case SWITCH_MESSAGE_INDICATE_RINGING:
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user