mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-27 16:07:15 -07:00
Display a list of channel variables in each channel-oriented event.
(Closes AST-33) Reviewboard: https://reviewboard.asterisk.org/r/368/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+3
-2
@@ -513,6 +513,7 @@ static int channel_spy(struct ast_channel *chan, struct ast_autochan *spyee_auto
|
||||
struct ast_silence_generator *silgen = NULL;
|
||||
struct ast_autochan *spyee_bridge_autochan = NULL;
|
||||
const char *spyer_name;
|
||||
struct ast_channel *chans[] = { chan, spyee_autochan->chan };
|
||||
|
||||
ast_channel_lock(chan);
|
||||
spyer_name = ast_strdupa(chan->name);
|
||||
@@ -529,7 +530,7 @@ static int channel_spy(struct ast_channel *chan, struct ast_autochan *spyee_auto
|
||||
ast_channel_unlock(spyee_autochan->chan);
|
||||
|
||||
ast_verb(2, "Spying on channel %s\n", name);
|
||||
manager_event(EVENT_FLAG_CALL, "ChanSpyStart",
|
||||
ast_manager_event_multichan(EVENT_FLAG_CALL, "ChanSpyStart", 2, chans,
|
||||
"SpyerChannel: %s\r\n"
|
||||
"SpyeeChannel: %s\r\n",
|
||||
spyer_name, name);
|
||||
@@ -697,7 +698,7 @@ static int channel_spy(struct ast_channel *chan, struct ast_autochan *spyee_auto
|
||||
}
|
||||
|
||||
ast_verb(2, "Done Spying on channel %s\n", name);
|
||||
manager_event(EVENT_FLAG_CALL, "ChanSpyStop", "SpyeeChannel: %s\r\n", name);
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "ChanSpyStop", "SpyeeChannel: %s\r\n", name);
|
||||
|
||||
return running;
|
||||
}
|
||||
|
||||
+4
-3
@@ -722,7 +722,8 @@ static const char *get_cid_name(char *name, int namelen, struct ast_channel *cha
|
||||
|
||||
static void senddialevent(struct ast_channel *src, struct ast_channel *dst, const char *dialstring)
|
||||
{
|
||||
manager_event(EVENT_FLAG_CALL, "Dial",
|
||||
struct ast_channel *chans[] = { src, dst };
|
||||
ast_manager_event_multichan(EVENT_FLAG_CALL, "Dial", 2, chans,
|
||||
"SubEvent: Begin\r\n"
|
||||
"Channel: %s\r\n"
|
||||
"Destination: %s\r\n"
|
||||
@@ -736,9 +737,9 @@ static void senddialevent(struct ast_channel *src, struct ast_channel *dst, cons
|
||||
dst->uniqueid, dialstring ? dialstring : "");
|
||||
}
|
||||
|
||||
static void senddialendevent(const struct ast_channel *src, const char *dialstatus)
|
||||
static void senddialendevent(struct ast_channel *src, const char *dialstatus)
|
||||
{
|
||||
manager_event(EVENT_FLAG_CALL, "Dial",
|
||||
ast_manager_event(src, EVENT_FLAG_CALL, "Dial",
|
||||
"SubEvent: End\r\n"
|
||||
"Channel: %s\r\n"
|
||||
"UniqueID: %s\r\n"
|
||||
|
||||
+1
-1
@@ -248,7 +248,7 @@ static void phase_e_handler(t30_state_t *f, void *user_data, int result)
|
||||
ast_debug(1, " Image resolution: %d x %d\n", stat.x_resolution, stat.y_resolution);
|
||||
ast_debug(1, " Transfer Rate: %d\n", stat.bit_rate);
|
||||
|
||||
manager_event(EVENT_FLAG_CALL,
|
||||
ast_manager_event(s->chan, EVENT_FLAG_CALL,
|
||||
s->direction ? "FaxSent" : "FaxReceived",
|
||||
"Channel: %s\r\n"
|
||||
"Exten: %s\r\n"
|
||||
|
||||
+8
-8
@@ -2508,7 +2508,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
||||
ast_debug(1, "Placed channel %s in DAHDI conf %d\n", chan->name, conf->dahdiconf);
|
||||
|
||||
if (!sent_event) {
|
||||
manager_event(EVENT_FLAG_CALL, "MeetmeJoin",
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeJoin",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n"
|
||||
"Meetme: %s\r\n"
|
||||
@@ -2837,7 +2837,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
||||
break;
|
||||
}
|
||||
|
||||
manager_event(EVENT_FLAG_CALL, "MeetmeMute",
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeMute",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n"
|
||||
"Meetme: %s\r\n"
|
||||
@@ -2855,7 +2855,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
||||
break;
|
||||
}
|
||||
|
||||
manager_event(EVENT_FLAG_CALL, "MeetmeMute",
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeMute",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n"
|
||||
"Meetme: %s\r\n"
|
||||
@@ -2868,7 +2868,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
||||
(user->adminflags & ADMINFLAG_T_REQUEST) && !(talkreq_manager)) {
|
||||
talkreq_manager = 1;
|
||||
|
||||
manager_event(EVENT_FLAG_CALL, "MeetmeTalkRequest",
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeTalkRequest",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n"
|
||||
"Meetme: %s\r\n"
|
||||
@@ -2881,7 +2881,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
||||
if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) &&
|
||||
!(user->adminflags & ADMINFLAG_T_REQUEST) && (talkreq_manager)) {
|
||||
talkreq_manager = 0;
|
||||
manager_event(EVENT_FLAG_CALL, "MeetmeTalkRequest",
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeTalkRequest",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n"
|
||||
"Meetme: %s\r\n"
|
||||
@@ -2949,7 +2949,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
||||
if (!user->talking && totalsilence < MEETME_DELAYDETECTTALK) {
|
||||
user->talking = 1;
|
||||
if (confflags & CONFFLAG_MONITORTALKER)
|
||||
manager_event(EVENT_FLAG_CALL, "MeetmeTalking",
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeTalking",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n"
|
||||
"Meetme: %s\r\n"
|
||||
@@ -2960,7 +2960,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
||||
if (user->talking && totalsilence > MEETME_DELAYDETECTENDTALK) {
|
||||
user->talking = 0;
|
||||
if (confflags & CONFFLAG_MONITORTALKER) {
|
||||
manager_event(EVENT_FLAG_CALL, "MeetmeTalking",
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeTalking",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n"
|
||||
"Meetme: %s\r\n"
|
||||
@@ -3384,7 +3384,7 @@ bailoutandtrynormal:
|
||||
sec = (now.tv_sec - user->jointime) % 60;
|
||||
|
||||
if (sent_event) {
|
||||
manager_event(EVENT_FLAG_CALL, "MeetmeLeave",
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeLeave",
|
||||
"Channel: %s\r\n"
|
||||
"Uniqueid: %s\r\n"
|
||||
"Meetme: %s\r\n"
|
||||
|
||||
+1
-1
@@ -1806,7 +1806,7 @@ static int notify_new_message(struct ast_channel *chan, const char *templatename
|
||||
res = sendmail(etemplate, vmu, cidnum, cidname, filename, messageformat, duration, etemplate->attachment, MVM_MESSAGE_PAGE, counter);
|
||||
}
|
||||
|
||||
manager_event(EVENT_FLAG_CALL, "MiniVoiceMail", "Action: SentNotification\rn\nMailbox: %s@%s\r\nCounter: %s\r\n", vmu->username, vmu->domain, counter);
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MiniVoiceMail", "Action: SentNotification\rn\nMailbox: %s@%s\r\nCounter: %s\r\n", vmu->username, vmu->domain, counter);
|
||||
|
||||
run_externnotify(chan, vmu); /* Run external notification */
|
||||
|
||||
|
||||
+2
-2
@@ -2245,7 +2245,7 @@ static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *
|
||||
ast_copy_string(qe->context, q->context, sizeof(qe->context));
|
||||
q->count++;
|
||||
res = 0;
|
||||
manager_event(EVENT_FLAG_CALL, "Join",
|
||||
ast_manager_event(qe->chan, EVENT_FLAG_CALL, "Join",
|
||||
"Channel: %s\r\nCallerIDNum: %s\r\nCallerIDName: %s\r\nQueue: %s\r\nPosition: %d\r\nCount: %d\r\nUniqueid: %s\r\n",
|
||||
qe->chan->name,
|
||||
S_OR(qe->chan->cid.cid_num, "unknown"), /* XXX somewhere else it is <unknown> */
|
||||
@@ -2498,7 +2498,7 @@ static void leave_queue(struct queue_ent *qe)
|
||||
q->count--;
|
||||
|
||||
/* Take us out of the queue */
|
||||
manager_event(EVENT_FLAG_CALL, "Leave",
|
||||
ast_manager_event(qe->chan, EVENT_FLAG_CALL, "Leave",
|
||||
"Channel: %s\r\nQueue: %s\r\nCount: %d\r\nPosition: %d\r\nUniqueid: %s\r\n",
|
||||
qe->chan->name, q->name, q->count, qe->pos, qe->chan->uniqueid);
|
||||
ast_debug(1, "Queue '%s' Leave, Channel '%s'\n", q->name, qe->chan->name );
|
||||
|
||||
@@ -6558,7 +6558,7 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
|
||||
|
||||
queue_mwi_event(ext_context, urgentmsgs, newmsgs, oldmsgs);
|
||||
|
||||
manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s@%s\r\nWaiting: %d\r\nNew: %d\r\nOld: %d\r\n", vmu->mailbox, vmu->context, ast_app_has_voicemail(ext_context, NULL), newmsgs, oldmsgs);
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s@%s\r\nWaiting: %d\r\nNew: %d\r\nOld: %d\r\n", vmu->mailbox, vmu->context, ast_app_has_voicemail(ext_context, NULL), newmsgs, oldmsgs);
|
||||
run_externnotify(vmu->context, vmu->mailbox, flag);
|
||||
|
||||
#ifdef IMAP_STORAGE
|
||||
@@ -9767,7 +9767,7 @@ out:
|
||||
if (valid) {
|
||||
int new = 0, old = 0, urgent = 0;
|
||||
snprintf(ext_context, sizeof(ext_context), "%s@%s", vms.username, vmu->context);
|
||||
manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s\r\nWaiting: %d\r\n", ext_context, has_voicemail(ext_context, NULL));
|
||||
ast_manager_event(chan, EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s\r\nWaiting: %d\r\n", ext_context, has_voicemail(ext_context, NULL));
|
||||
/* Urgent flag not passwd to externnotify here */
|
||||
run_externnotify(vmu->context, vmu->mailbox, NULL);
|
||||
ast_app_inboxcount2(ext_context, &urgent, &new, &old);
|
||||
|
||||
Reference in New Issue
Block a user