mod_rayo remove hack for stopping fax

This commit is contained in:
Chris Rienzo 2014-01-08 04:28:14 -05:00
parent 2cb5f430b2
commit 32bbe11d6b
2 changed files with 2 additions and 15 deletions

View File

@ -3320,16 +3320,6 @@ static switch_status_t rayo_call_on_read_frame(switch_core_session_t *session, s
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Ending abandoned call. idle_duration_ms = %i ms\n", idle_duration_ms);
switch_channel_hangup(channel, RAYO_CAUSE_HANGUP);
}
/* check for break request */
{
const char *break_jid = switch_channel_get_variable(channel, "rayo_read_frame_interrupt");
struct rayo_actor *actor;
if (break_jid && (actor = RAYO_LOCATE(break_jid))) {
RAYO_UNLOCK(actor);
return SWITCH_STATUS_FALSE;
}
}
}
return SWITCH_STATUS_SUCCESS;
}

View File

@ -206,7 +206,6 @@ static iks *start_sendfax_component(struct rayo_actor *call, struct rayo_message
switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "call-command", "execute");
switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-name", "txfax");
switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-arg", fax_document);
switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "event-lock", "true");
if (!switch_channel_test_flag(channel, CF_PROXY_MODE)) {
switch_channel_set_flag(channel, CF_BLOCK_BROADCAST_UNTIL_MEDIA);
}
@ -309,7 +308,6 @@ static iks *start_receivefax_component(struct rayo_actor *call, struct rayo_mess
switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "call-command", "execute");
switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-name", "rxfax");
switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-arg", receivefax_component->local_filename);
switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "event-lock", "true");
if (!switch_channel_test_flag(channel, CF_PROXY_MODE)) {
switch_channel_set_flag(channel, CF_BLOCK_BROADCAST_UNTIL_MEDIA);
}
@ -341,12 +339,11 @@ static iks *stop_fax_component(struct rayo_actor *component, struct rayo_message
{
iks *iq = msg->payload;
switch_core_session_t *session = switch_core_session_locate(RAYO_COMPONENT(component)->parent->id);
FAX_COMPONENT(component)->stop = 1;
if (session) {
/* fail on read frame until component is destroyed */
switch_channel_set_variable(switch_core_session_get_channel(session), "rayo_read_frame_interrupt", RAYO_JID(component));
switch_core_session_execute_application_async(session, "stopfax", "");
switch_core_session_rwunlock(session);
}
FAX_COMPONENT(component)->stop = 1;
return iks_new_iq_result(iq);
}