提交 d36f5932 authored 作者: Anthony Minessale's avatar Anthony Minessale

fire failed sms events

上级 ca4c800f
...@@ -579,13 +579,22 @@ static switch_status_t do_chat_send(switch_event_t *message_event) ...@@ -579,13 +579,22 @@ static switch_status_t do_chat_send(switch_event_t *message_event)
} }
if (!do_skip && !switch_stristr("GLOBAL", dest_proto)) { if (!do_skip && !switch_stristr("GLOBAL", dest_proto)) {
if (!(ci = switch_loadable_module_get_chat_interface(dest_proto)) || !ci->chat_send) { if ((ci = switch_loadable_module_get_chat_interface(dest_proto)) && ci->chat_send) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid chat interface [%s]!\n", dest_proto);
return SWITCH_STATUS_FALSE;
}
status = ci->chat_send(message_event); status = ci->chat_send(message_event);
UNPROTECT_INTERFACE(ci); UNPROTECT_INTERFACE(ci);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid chat interface [%s]!\n", dest_proto);
status = SWITCH_STATUS_FALSE;
} }
}
if (status != SWITCH_STATUS_SUCCESS) {
switch_event_t *dup;
switch_event_dup(&dup, message_event);
switch_event_add_header_string(dup, SWITCH_STACK_BOTTOM, "Delivery-Failure", "true");
switch_event_fire(&dup);
}
return status; return status;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论