add execute_on_media_timeout var
This commit is contained in:
parent
1f5f9408a0
commit
7eafa85de5
|
@ -1095,6 +1095,16 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
|
|||
switch_channel_clear_flag(channel, CF_LEG_HOLDING);
|
||||
}
|
||||
|
||||
if (switch_channel_get_variable(tech_pvt->channel, "execute_on_media_timeout")) {
|
||||
*frame = &tech_pvt->read_frame;
|
||||
switch_set_flag((*frame), SFF_CNG);
|
||||
(*frame)->datalen = tech_pvt->read_impl.encoded_bytes_per_packet;
|
||||
memset((*frame)->data, 0, (*frame)->datalen);
|
||||
switch_channel_execute_on(tech_pvt->channel, "execute_on_media_timeout");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_MEDIA_TIMEOUT);
|
||||
}
|
||||
return status;
|
||||
|
|
Loading…
Reference in New Issue