return SWITCH_STATUS_SUCCESS;
}
+#define UUID_RECOVERY_REFRESH_SYNTAX "<uuid> <uri>"
+SWITCH_STANDARD_API(uuid_recovery_refresh)
+{
+ switch_core_session_t *tsession = NULL;
+ char *uuid = NULL, *text = NULL;
+
+ if (!zstr(cmd) && (uuid = strdup(cmd))) {
+ if ((text = strchr(uuid, ' '))) {
+ *text++ = '\0';
+ }
+ }
+
+ if (zstr(uuid) || zstr(text)) {
+ stream->write_function(stream, "-USAGE: %s\n", UUID_RECOVERY_REFRESH_SYNTAX);
+ } else {
+ if ((tsession = switch_core_session_locate(uuid))) {
+ switch_core_session_message_t msg = { 0 };
+
+ /* Tell the channel to recovery_refresh the call */
+ msg.from = __FILE__;
+ msg.string_arg = text;
+ msg.message_id = SWITCH_MESSAGE_INDICATE_RECOVERY_REFRESH;
+ switch_core_session_receive_message(tsession, &msg);
+ stream->write_function(stream, "+OK:%s\n", msg.string_reply);
+ switch_core_session_rwunlock(tsession);
+ } else {
+ stream->write_function(stream, "-ERR No Such Channel %s!\n", uuid);
+ }
+ }
+
+ switch_safe_free(uuid);
+ return SWITCH_STATUS_SUCCESS;
+}
+
#define SCHED_TRANSFER_SYNTAX "[+]<time> <uuid> <extension> [<dialplan>] [<context>]"
SWITCH_STANDARD_API(sched_transfer_function)
{
SWITCH_ADD_API(commands_api_interface, "uuid_phone_event", "Send and event to the phone", uuid_phone_event_function, PHONE_EVENT_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "uuid_preprocess", "Pre-process Channel", preprocess_function, PREPROCESS_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "uuid_record", "session record", session_record_function, SESS_REC_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "uuid_recovery_refresh", "Send a recovery_refresh", uuid_recovery_refresh, UUID_RECOVERY_REFRESH_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "uuid_recv_dtmf", "receive dtmf digits", uuid_recv_dtmf_function, UUID_RECV_DTMF_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "uuid_send_dtmf", "send dtmf digits", uuid_send_dtmf_function, UUID_SEND_DTMF_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "uuid_session_heartbeat", "uuid_session_heartbeat", uuid_session_heartbeat_function, HEARTBEAT_SYNTAX);
switch_console_set_complete("add uuid_phone_event ::console::list_uuid hold");
switch_console_set_complete("add uuid_preprocess ::console::list_uuid");
switch_console_set_complete("add uuid_record ::console::list_uuid ::[start:stop");
+ switch_console_set_complete("add uuid_recovery_refresh ::console::list_uuid");
switch_console_set_complete("add uuid_recv_dtmf ::console::list_uuid");
switch_console_set_complete("add uuid_send_dtmf ::console::list_uuid");
switch_console_set_complete("add uuid_session_heartbeat ::console::list_uuid");
switch_event_t *params = NULL;
conference_obj_t *new_conference = NULL;
int locked = 0;
+ switch_core_session_message_t msg = { 0 };
switch_assert(conference != NULL);
switch_assert(stream != NULL);
switch_channel_set_variable(channel, "last_transfered_conference", argv[2]);
+ /* Sync the recovery data */
+ msg.from = __FILE__;
+ msg.message_id = SWITCH_MESSAGE_INDICATE_RECOVERY_REFRESH;
+ switch_core_session_receive_message(member->session, &msg);
+
unlock_member(member);
stream->write_function(stream, "OK Member '%d' sent to conference %s.\n", member->id, argv[2]);
switch_core_session_receive_message(session, &msg);
}
+SWITCH_STANDARD_APP(recovery_refresh_function)
+{
+ switch_core_session_message_t msg = { 0 };
+
+ /* Tell the channel to recovery_refresh the call */
+ msg.from = __FILE__;
+ msg.string_arg = data;
+ msg.message_id = SWITCH_MESSAGE_INDICATE_RECOVERY_REFRESH;
+ switch_core_session_receive_message(session, &msg);
+}
+
SWITCH_STANDARD_APP(sched_cancel_function)
{
SWITCH_ADD_APP(app_interface, "respond", "Send session respond", "Send a respond message to a session.", respond_function, "<respond_data>",
SAF_SUPPORT_NOMEDIA);
SWITCH_ADD_APP(app_interface, "deflect", "Send call deflect", "Send a call deflect.", deflect_function, "<deflect_data>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "recovery_refresh", "Send call recovery_refresh", "Send a call recovery_refresh.", recovery_refresh_function, "", SAF_SUPPORT_NOMEDIA);
SWITCH_ADD_APP(app_interface, "queue_dtmf", "Queue dtmf to be sent", "Queue dtmf to be sent from a session", queue_dtmf_function, "<dtmf_data>",
SAF_SUPPORT_NOMEDIA);
SWITCH_ADD_APP(app_interface, "send_dtmf", "Send dtmf to be sent", "Send dtmf to be sent from a session", send_dtmf_function, "<dtmf_data>",