Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static switch_status_t enviar_mensaje(switch_core_session_t *session, svb_routing_data_t *rt, const char *usuario_dispositivo, const char *host, const char *mensaje)
- {
- switch_event_t *event;
- if (switch_event_create(&event, SWITCH_EVENT_SEND_MESSAGE) == SWITCH_STATUS_SUCCESS) {
- switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "user", usuario_dispositivo);
- switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "host", host);
- switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "profile", "internal");
- switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "content-type", "text/plain");
- switch_event_add_body(event, "%s", mensaje);
- switch_event_fire(&event);
- }
- return SWITCH_STATUS_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement