mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 16:58:35 +00:00
add SOCKET_EVENT event
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16135 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8a877fb87a
commit
3cb315d6d4
@ -834,6 +834,9 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
|
|||||||
|
|
||||||
if (!revent) {
|
if (!revent) {
|
||||||
esl_event_create(&revent, ESL_EVENT_CLONE);
|
esl_event_create(&revent, ESL_EVENT_CLONE);
|
||||||
|
revent->event_id = ESL_EVENT_SOCKET_DATA;
|
||||||
|
esl_event_add_header_string(revent, ESL_STACK_BOTTOM, "Event-Name", "SOCKET_DATA");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hname = beg;
|
hname = beg;
|
||||||
|
@ -130,6 +130,7 @@ static const char *EVENT_NAMES[] = {
|
|||||||
"RECORD_STOP",
|
"RECORD_STOP",
|
||||||
"CALL_UPDATE",
|
"CALL_UPDATE",
|
||||||
"FAILURE",
|
"FAILURE",
|
||||||
|
"SOCKET_DATA",
|
||||||
"ALL"
|
"ALL"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,6 +118,7 @@ typedef enum {
|
|||||||
ESL_EVENT_RECORD_STOP,
|
ESL_EVENT_RECORD_STOP,
|
||||||
ESL_EVENT_CALL_UPDATE,
|
ESL_EVENT_CALL_UPDATE,
|
||||||
ESL_EVENT_FAILURE,
|
ESL_EVENT_FAILURE,
|
||||||
|
ESL_EVENT_SOCKET_DATA,
|
||||||
ESL_EVENT_ALL
|
ESL_EVENT_ALL
|
||||||
} esl_event_types_t;
|
} esl_event_types_t;
|
||||||
|
|
||||||
|
@ -1338,6 +1338,7 @@ typedef enum {
|
|||||||
SWITCH_EVENT_RECORD_STOP,
|
SWITCH_EVENT_RECORD_STOP,
|
||||||
SWITCH_EVENT_CALL_UPDATE,
|
SWITCH_EVENT_CALL_UPDATE,
|
||||||
SWITCH_EVENT_FAILURE,
|
SWITCH_EVENT_FAILURE,
|
||||||
|
SWITCH_EVENT_SOCKET_DATA,
|
||||||
SWITCH_EVENT_ALL
|
SWITCH_EVENT_ALL
|
||||||
} switch_event_types_t;
|
} switch_event_types_t;
|
||||||
|
|
||||||
|
@ -1084,7 +1084,7 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
|
|||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
switch_event_create(event, SWITCH_EVENT_COMMAND);
|
switch_event_create(event, SWITCH_EVENT_SOCKET_DATA);
|
||||||
switch_event_add_header_string(*event, SWITCH_STACK_BOTTOM, "Command", mbuf);
|
switch_event_add_header_string(*event, SWITCH_STACK_BOTTOM, "Command", mbuf);
|
||||||
} else if (cur) {
|
} else if (cur) {
|
||||||
char *var, *val;
|
char *var, *val;
|
||||||
|
@ -186,6 +186,7 @@ static char *EVENT_NAMES[] = {
|
|||||||
"RECORD_STOP",
|
"RECORD_STOP",
|
||||||
"CALL_UPDATE",
|
"CALL_UPDATE",
|
||||||
"FAILURE",
|
"FAILURE",
|
||||||
|
"SOCKET_DATA",
|
||||||
"ALL"
|
"ALL"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user