mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 16:58:35 +00:00
add channel_originate event
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5886 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9bb1534901
commit
e5b16c4374
@ -851,6 +851,7 @@ typedef enum {
|
|||||||
SWITCH_EVENT_CHANNEL_PARK - A channel has been parked
|
SWITCH_EVENT_CHANNEL_PARK - A channel has been parked
|
||||||
SWITCH_EVENT_CHANNEL_UNPARK - A channel has been unparked
|
SWITCH_EVENT_CHANNEL_UNPARK - A channel has been unparked
|
||||||
SWITCH_EVENT_CHANNEL_APPLICATION- A channel has called and event from an application
|
SWITCH_EVENT_CHANNEL_APPLICATION- A channel has called and event from an application
|
||||||
|
SWITCH_EVENT_CHANNEL_ORIGINATE - A channel has been originated
|
||||||
SWITCH_EVENT_API - An API call has been executed
|
SWITCH_EVENT_API - An API call has been executed
|
||||||
SWITCH_EVENT_LOG - A LOG event has been triggered
|
SWITCH_EVENT_LOG - A LOG event has been triggered
|
||||||
SWITCH_EVENT_INBOUND_CHAN - A new inbound channel has been created
|
SWITCH_EVENT_INBOUND_CHAN - A new inbound channel has been created
|
||||||
@ -902,6 +903,7 @@ typedef enum {
|
|||||||
SWITCH_EVENT_CHANNEL_PARK,
|
SWITCH_EVENT_CHANNEL_PARK,
|
||||||
SWITCH_EVENT_CHANNEL_UNPARK,
|
SWITCH_EVENT_CHANNEL_UNPARK,
|
||||||
SWITCH_EVENT_CHANNEL_APPLICATION,
|
SWITCH_EVENT_CHANNEL_APPLICATION,
|
||||||
|
SWITCH_EVENT_CHANNEL_ORIGINATE,
|
||||||
SWITCH_EVENT_API,
|
SWITCH_EVENT_API,
|
||||||
SWITCH_EVENT_LOG,
|
SWITCH_EVENT_LOG,
|
||||||
SWITCH_EVENT_INBOUND_CHAN,
|
SWITCH_EVENT_INBOUND_CHAN,
|
||||||
|
@ -120,6 +120,7 @@ static char *EVENT_NAMES[] = {
|
|||||||
"CHANNEL_PARK",
|
"CHANNEL_PARK",
|
||||||
"CHANNEL_UNPARK",
|
"CHANNEL_UNPARK",
|
||||||
"CHANNEL_APPLICATION",
|
"CHANNEL_APPLICATION",
|
||||||
|
"CHANNEL_ORIGINATE",
|
||||||
"API",
|
"API",
|
||||||
"LOG",
|
"LOG",
|
||||||
"INBOUND_CHAN",
|
"INBOUND_CHAN",
|
||||||
|
@ -536,11 +536,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
assert(peer_channels[i] != NULL);
|
assert(peer_channels[i] != NULL);
|
||||||
|
|
||||||
if (var_event) {
|
if (var_event) {
|
||||||
|
switch_event_t *event;
|
||||||
switch_event_header_t *header;
|
switch_event_header_t *header;
|
||||||
/* install the vars from the {} params */
|
/* install the vars from the {} params */
|
||||||
for (header = var_event->headers; header; header = header->next) {
|
for (header = var_event->headers; header; header = header->next) {
|
||||||
switch_channel_set_variable(peer_channels[i], header->name, header->value);
|
switch_channel_set_variable(peer_channels[i], header->name, header->value);
|
||||||
}
|
}
|
||||||
|
switch_event_create(&event, SWITCH_EVENT_CHANNEL_ORIGINATE);
|
||||||
|
assert(event);
|
||||||
|
switch_channel_event_set_data(peer_channels[i], event);
|
||||||
|
switch_event_fire(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!table) {
|
if (!table) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user