rec->path, (uint8_t) 1, conference->rate, SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT,
rec->pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening File [%s]\n", rec->path);
+
+
+ if (test_eflag(conference, EFLAG_RECORD) &&
+ switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
+ conference_add_event_data(conference, event);
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "start-recording");
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Path", rec->path);
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Error", "File could not be opened for recording");
+ switch_event_fire(&event);
+ }
+
goto end;
}