mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 16:58:35 +00:00
FS-4336 --resolve
This commit is contained in:
parent
2171e5830d
commit
ecb84bd126
@ -42,7 +42,17 @@ SWITCH_MODULE_DEFINITION(mod_sms, mod_sms_load, mod_sms_shutdown, NULL);
|
|||||||
static void event_handler(switch_event_t *event)
|
static void event_handler(switch_event_t *event)
|
||||||
{
|
{
|
||||||
const char *dest_proto = switch_event_get_header(event, "dest_proto");
|
const char *dest_proto = switch_event_get_header(event, "dest_proto");
|
||||||
|
const char *check_failure = switch_event_get_header(event, "Delivery-Failure");
|
||||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "skip_global_process", "true");
|
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "skip_global_process", "true");
|
||||||
|
|
||||||
|
if (switch_true(check_failure)) {
|
||||||
|
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Delivery Failure\n");
|
||||||
|
DUMP_EVENT(event);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch_core_chat_send(dest_proto, event);
|
switch_core_chat_send(dest_proto, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -563,7 +563,6 @@ static switch_status_t do_chat_send(switch_event_t *message_event)
|
|||||||
if ((ci = (switch_chat_interface_t *) val)) {
|
if ((ci = (switch_chat_interface_t *) val)) {
|
||||||
if (ci->chat_send && !strncasecmp(ci->interface_name, "GLOBAL_", 7)) {
|
if (ci->chat_send && !strncasecmp(ci->interface_name, "GLOBAL_", 7)) {
|
||||||
status = ci->chat_send(message_event);
|
status = ci->chat_send(message_event);
|
||||||
|
|
||||||
if (status == SWITCH_STATUS_BREAK) {
|
if (status == SWITCH_STATUS_BREAK) {
|
||||||
do_skip = 1;
|
do_skip = 1;
|
||||||
}
|
}
|
||||||
@ -581,6 +580,8 @@ 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) {
|
||||||
status = ci->chat_send(message_event);
|
status = ci->chat_send(message_event);
|
||||||
|
printf("FRICK\n");
|
||||||
|
|
||||||
UNPROTECT_INTERFACE(ci);
|
UNPROTECT_INTERFACE(ci);
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid chat interface [%s]!\n", dest_proto);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid chat interface [%s]!\n", dest_proto);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user