diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_chanspy.c | 18 | ||||
-rw-r--r-- | apps/app_confbridge.c | 62 | ||||
-rw-r--r-- | apps/app_dial.c | 24 | ||||
-rw-r--r-- | apps/app_meetme.c | 105 | ||||
-rw-r--r-- | apps/app_queue.c | 293 | ||||
-rw-r--r-- | apps/app_stack.c | 8 | ||||
-rw-r--r-- | apps/app_userevent.c | 11 | ||||
-rw-r--r-- | apps/app_voicemail.c | 30 |
8 files changed, 542 insertions, 9 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index bf7b89416..185cb724a 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -539,6 +539,16 @@ 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); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a channel has started spying on another channel.</synopsis> + <see-also> + <ref type="application">ChanSpy</ref> + <ref type="application">ExtenSpy</ref> + <ref type="managerEvent">ChanSpyStop</ref> + </see-also> + </managerEventInstance> + ***/ ast_manager_event_multichan(EVENT_FLAG_CALL, "ChanSpyStart", 2, chans, "SpyerChannel: %s\r\n" "SpyeeChannel: %s\r\n", @@ -727,6 +737,14 @@ static int channel_spy(struct ast_channel *chan, struct ast_autochan *spyee_auto } ast_verb(2, "Done Spying on channel %s\n", name); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a channel has stopped spying on another channel.</synopsis> + <see-also> + <ref type="managerEvent">ChanSpyStart</ref> + </see-also> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "ChanSpyStop", "SpyeeChannel: %s\r\n", name); return running; diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index 88c85a165..9b1df3404 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -529,16 +529,53 @@ static int conf_start_record(struct conference_bridge *conference_bridge) static void send_conf_start_event(const char *conf_name) { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a conference starts.</synopsis> + <syntax> + <parameter name="Conference"> + <para>The name of the Confbridge conference.</para> + </parameter> + </syntax> + <see-also> + <ref type="managerEvent">ConfbridgeEnd</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_CALL, "ConfbridgeStart", "Conference: %s\r\n", conf_name); } static void send_conf_end_event(const char *conf_name) { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a conference ends.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" /> + </syntax> + <see-also> + <ref type="managerEvent">ConfbridgeStart</ref> + <ref type="application">ConfBridge</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_CALL, "ConfbridgeEnd", "Conference: %s\r\n", conf_name); } static void send_join_event(struct ast_channel *chan, const char *conf_name) { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a channel joins a Confbridge conference.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" /> + </syntax> + <see-also> + <ref type="managerEvent">ConfbridgeLeave</ref> + <ref type="application">ConfBridge</ref> + </see-also> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "ConfbridgeJoin", "Channel: %s\r\n" "Uniqueid: %s\r\n" @@ -555,6 +592,17 @@ static void send_join_event(struct ast_channel *chan, const char *conf_name) static void send_leave_event(struct ast_channel *chan, const char *conf_name) { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a channel leaves a Confbridge conference.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" /> + </syntax> + <see-also> + <ref type="managerEvent">ConfbridgeJoin</ref> + </see-also> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "ConfbridgeLeave", "Channel: %s\r\n" "Uniqueid: %s\r\n" @@ -1242,6 +1290,20 @@ static void conf_handle_talker_cb(struct ast_bridge *bridge, struct ast_bridge_c } /* notify AMI someone is has either started or stopped talking */ + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a conference participant has started or stopped talking.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" /> + <parameter name="TalkingStatus"> + <enumlist> + <enum name="on"/> + <enum name="off"/> + </enumlist> + </parameter> + </syntax> + </managerEventInstance> + ***/ ast_manager_event(bridge_channel->chan, EVENT_FLAG_CALL, "ConfbridgeTalking", "Channel: %s\r\n" "Uniqueid: %s\r\n" diff --git a/apps/app_dial.c b/apps/app_dial.c index 886f63c36..281204847 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -820,6 +820,20 @@ 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) { struct ast_channel *chans[] = { src, dst }; + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a dial action has started.</synopsis> + <syntax> + <parameter name="SubEvent"> + <enumlist> + <enum name="Begin"/> + <enum name="End"/> + </enumlist> + <para>A sub event type, specifying whether the dial action has begun or ended.</para> + </parameter> + </syntax> + </managerEventInstance> + ***/ ast_manager_event_multichan(EVENT_FLAG_CALL, "Dial", 2, chans, "SubEvent: Begin\r\n" "Channel: %s\r\n" @@ -842,6 +856,16 @@ static void senddialevent(struct ast_channel *src, struct ast_channel *dst, cons static void senddialendevent(struct ast_channel *src, const char *dialstatus) { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a dial action has ended.</synopsis> + <syntax> + <parameter name="DialStatus"> + <para>The value of the <variable>DIALSTATUS</variable> channel variable.</para> + </parameter> + </syntax> + </managerEventInstance> + ***/ ast_manager_event(src, EVENT_FLAG_CALL, "Dial", "SubEvent: End\r\n" "Channel: %s\r\n" diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 6783ce4de..95805003d 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -1845,6 +1845,17 @@ static int conf_free(struct ast_conference *conf) struct announce_listitem *item; AST_LIST_REMOVE(&confs, conf, list); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a MeetMe conference ends.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='MeetmeJoin']/managerEventInstance/syntax/parameter[@name='Meetme'])" /> + </syntax> + <see-also> + <ref type="managerEvent">MeetmeJoin</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_CALL, "MeetmeEnd", "Meetme: %s\r\n", conf->confno); if (conf->recording == MEETME_RECORD_ACTIVE) { @@ -2179,13 +2190,30 @@ static int can_write(struct ast_channel *chan, struct ast_flags64 *confflags) static void send_talking_event(struct ast_channel *chan, struct ast_conference *conf, struct ast_conf_user *user, int talking) { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a MeetMe user begins or ends talking.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='MeetmeJoin']/managerEventInstance/syntax/parameter[@name='Meetme'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='MeetmeJoin']/managerEventInstance/syntax/parameter[@name='Usernum'])" /> + <parameter name="Status"> + <enumlist> + <enum name="on"/> + <enum name="off"/> + </enumlist> + </parameter> + </syntax> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeTalking", "Channel: %s\r\n" "Uniqueid: %s\r\n" "Meetme: %s\r\n" "Usernum: %d\r\n" "Status: %s\r\n", - ast_channel_name(chan), ast_channel_uniqueid(chan), conf->confno, user->user_no, talking ? "on" : "off"); + ast_channel_name(chan), ast_channel_uniqueid(chan), + conf->confno, + user->user_no, talking ? "on" : "off"); } static void set_user_talking(struct ast_channel *chan, struct ast_conference *conf, struct ast_conf_user *user, int talking, int monitor) @@ -2777,6 +2805,23 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc ast_debug(1, "Placed channel %s in DAHDI conf %d\n", ast_channel_name(chan), conf->dahdiconf); if (!sent_event) { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a user joins a MeetMe conference.</synopsis> + <syntax> + <parameter name="Meetme"> + <para>The identifier for the MeetMe conference.</para> + </parameter> + <parameter name="Usernum"> + <para>The identifier of the MeetMe user who joined.</para> + </parameter> + </syntax> + <see-also> + <ref type="managerEvent">MeetmeLeave</ref> + <ref type="application">MeetMe</ref> + </see-also> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeJoin", "Channel: %s\r\n" "Uniqueid: %s\r\n" @@ -3142,7 +3187,21 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc if (ast_test_flag64(confflags, (CONFFLAG_MONITORTALKER | CONFFLAG_OPTIMIZETALKER))) { set_user_talking(chan, conf, user, -1, ast_test_flag64(confflags, CONFFLAG_MONITORTALKER)); } - + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a MeetMe user is muted.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='MeetmeJoin']/managerEventInstance/syntax/parameter[@name='Meetme'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='MeetmeJoin']/managerEventInstance/syntax/parameter[@name='Usernum'])" /> + <parameter name="Status"> + <enumlist> + <enum name="on"/> + <enum name="off"/> + </enumlist> + </parameter> + </syntax> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeMute", "Channel: %s\r\n" "Uniqueid: %s\r\n" @@ -3160,7 +3219,11 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc ret = -1; break; } - + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a MeetMe user is unmuted.</synopsis> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeMute", "Channel: %s\r\n" "Uniqueid: %s\r\n" @@ -3174,6 +3237,21 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc (user->adminflags & ADMINFLAG_T_REQUEST) && !(talkreq_manager)) { talkreq_manager = 1; + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a MeetMe user has started talking.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='MeetmeJoin']/managerEventInstance/syntax/parameter[@name='Meetme'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='MeetmeJoin']/managerEventInstance/syntax/parameter[@name='Usernum'])" /> + <parameter name="Status"> + <enumlist> + <enum name="on"/> + <enum name="off"/> + </enumlist> + </parameter> + </syntax> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeTalkRequest", "Channel: %s\r\n" "Uniqueid: %s\r\n" @@ -3183,10 +3261,14 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc ast_channel_name(chan), ast_channel_uniqueid(chan), conf->confno, user->user_no); } - if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) && !(user->adminflags & ADMINFLAG_T_REQUEST) && (talkreq_manager)) { talkreq_manager = 0; + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a MeetMe user has finished talking.</synopsis> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeTalkRequest", "Channel: %s\r\n" "Uniqueid: %s\r\n" @@ -3850,6 +3932,21 @@ bailoutandtrynormal: now = ast_tvnow(); if (sent_event) { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a user leaves a MeetMe conference.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='MeetmeJoin']/managerEventInstance/syntax/parameter[@name='Meetme'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='MeetmeJoin']/managerEventInstance/syntax/parameter[@name='Usernum'])" /> + <parameter name="Duration"> + <para>The length of time in seconds that the Meetme user was in the conference.</para> + </parameter> + </syntax> + <see-also> + <ref type="managerEvent">MeetmeJoin</ref> + </see-also> + </managerEventInstance> + ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "MeetmeLeave", "Channel: %s\r\n" "Uniqueid: %s\r\n" diff --git a/apps/app_queue.c b/apps/app_queue.c index 573a90811..4acd799f1 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1579,6 +1579,50 @@ static int update_status(struct call_queue *q, struct member *m, const int statu return 0; } + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a Queue member's status has changed.</synopsis> + <syntax> + <parameter name="Queue"> + <para>The name of the queue.</para> + </parameter> + <parameter name="Location"> + <para>The queue member's channel technology or location.</para> + </parameter> + <parameter name="MemberName"> + <para>The name of the queue member.</para> + </parameter> + <parameter name="StateInterface"> + <para>Channel technology or location from which to read device state changes.</para> + </parameter> + <parameter name="Membership"> + <enumlist> + <enum name="dynamic"/> + <enum name="realtime"/> + <enum name="static"/> + </enumlist> + </parameter> + <parameter name="Penalty"> + <para>The penalty associated with the queue member.</para> + </parameter> + <parameter name="CallsTaken"> + <para>The number of calls this queue member has serviced.</para> + </parameter> + <parameter name="LastCall"> + <para>The time this member last took call, expressed in seconds since 00:00, Jan 1, 1970 UTC.</para> + </parameter> + <parameter name="Status"> + <para>The status of the queue member. This will be a device state value.</para> + </parameter> + <parameter name="Paused"> + <enumlist> + <enum name="0"/> + <enum name="1"/> + </enumlist> + </parameter> + </syntax> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "QueueMemberStatus", "Queue: %s\r\n" "Location: %s\r\n" @@ -2746,6 +2790,24 @@ 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; + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a channel joins a Queue.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <parameter name="Position"> + <para>This channel's current position in the queue.</para> + </parameter> + <parameter name="Count"> + <para>The total number of channels in the queue.</para> + </parameter> + </syntax> + <see-also> + <ref type="managerEvent">Leave</ref> + <ref type="application">Queue</ref> + </see-also> + </managerEventInstance> + ***/ ast_manager_event(qe->chan, EVENT_FLAG_CALL, "Join", "Channel: %s\r\n" "CallerIDNum: %s\r\n" @@ -3033,6 +3095,19 @@ static void leave_queue(struct queue_ent *qe) q->count--; /* Take us out of the queue */ + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a channel leaves a Queue.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='Join']/managerEventInstance/syntax/parameter[@name='Count'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='Join']/managerEventInstance/syntax/parameter[@name='Position'])" /> + </syntax> + <see-also> + <ref type="managerEvent">Join</ref> + </see-also> + </managerEventInstance> + ***/ 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", ast_channel_name(qe->chan), q->name, q->count, qe->pos, ast_channel_uniqueid(qe->chan)); @@ -3435,6 +3510,28 @@ static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies ast_channel_lock_both(tmp->chan, qe->chan); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when an Agent is notified of a member in the queue.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <parameter name="AgentCalled"> + <para>The agent's technology or location.</para> + </parameter> + <parameter name="AgentName"> + <para>The name of the agent.</para> + </parameter> + <parameter name="Variable" required="no" multiple="yes"> + <para>Optional channel variables from the ChannelCalling channel</para> + </parameter> + </syntax> + <see-also> + <ref type="managerEvent">AgentRingNoAnswer</ref> + <ref type="managerEvent">AgentComplete</ref> + <ref type="managerEvent">AgentConnect</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "AgentCalled", "Queue: %s\r\n" "AgentCalled: %s\r\n" @@ -3644,6 +3741,21 @@ static void record_abandoned(struct queue_ent *qe) { set_queue_variables(qe->parent, qe->chan); ao2_lock(qe->parent); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when an caller abandons the queue.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='Join']/managerEventInstance/syntax/parameter[@name='Position'])" /> + <parameter name="OriginalPosition"> + <para>The channel's original position in the queue.</para> + </parameter> + <parameter name="HoldTime"> + <para>The time the channel was in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.</para> + </parameter> + </syntax> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "QueueCallerAbandon", "Queue: %s\r\n" "Uniqueid: %s\r\n" @@ -3669,14 +3781,32 @@ static void rna(int rnatime, struct queue_ent *qe, char *interface, char *member if (qe->parent->eventwhencalled) { char vars[2048]; - + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when an agent is notified of a member in the queue and fails to answer.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='AgentCalled']/managerEventInstance/syntax/parameter[@name='Variable'])" /> + <parameter name="Member"> + <para>The queue member's channel technology or location.</para> + </parameter> + <parameter name="RingTime"> + <para>The time the agent was rung, expressed in seconds since 00:00, Jan 1, 1970 UTC.</para> + </parameter> + </syntax> + <see-also> + <ref type="managerEvent">AgentCalled</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "AgentRingNoAnswer", "Queue: %s\r\n" "Uniqueid: %s\r\n" "Channel: %s\r\n" "Member: %s\r\n" "MemberName: %s\r\n" - "Ringtime: %d\r\n" + "RingTime: %d\r\n" "%s", qe->parent->name, ast_channel_uniqueid(qe->chan), @@ -4543,6 +4673,32 @@ static void send_agent_complete(const struct queue_ent *qe, const char *queuenam break; } + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when an agent has finished servicing a member in the queue.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='AgentRingNoAnswer']/managerEventInstance/syntax/parameter[@name='Member'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueCallerAbandon']/managerEventInstance/syntax/parameter[@name='HoldTime'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='AgentCalled']/managerEventInstance/syntax/parameter[@name='Variable'])" /> + <parameter name="TalkTime"> + <para>The time the agent talked with the member in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.</para> + </parameter> + <parameter name="Reason"> + <enumlist> + <enum name="caller"/> + <enum name="agent"/> + <enum name="transfer"/> + </enumlist> + </parameter> + </syntax> + <see-also> + <ref type="managerEvent">AgentCalled</ref> + <ref type="managerEvent">AgentConnect</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "AgentComplete", "Queue: %s\r\n" "Uniqueid: %s\r\n" @@ -5086,6 +5242,21 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char * ast_log(LOG_WARNING, "Agent on %s hungup on the customer.\n", ast_channel_name(peer)); ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "AGENTDUMP", "%s", ""); if (qe->parent->eventwhencalled) + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when an agent hangs up on a member in the queue.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='AgentRingNoAnswer']/managerEventInstance/syntax/parameter[@name='Member'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='AgentCalled']/managerEventInstance/syntax/parameter[@name='Variable'])" /> + </syntax> + <see-also> + <ref type="managerEvent">AgentCalled</ref> + <ref type="managerEvent">AgentConnect</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "AgentDump", "Queue: %s\r\n" "Uniqueid: %s\r\n" @@ -5401,15 +5572,33 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char * } if (qe->parent->eventwhencalled) + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when an agent answers and is bridged to a member in the queue.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='AgentRingNoAnswer']/managerEventInstance/syntax/parameter[@name='Member'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='AgentRingNoAnswer']/managerEventInstance/syntax/parameter[@name='RingTime'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueCallerAbandon']/managerEventInstance/syntax/parameter[@name='HoldTime'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='AgentCalled']/managerEventInstance/syntax/parameter[@name='Variable'])" /> + </syntax> + <see-also> + <ref type="managerEvent">AgentCalled</ref> + <ref type="managerEvent">AgentComplete</ref> + <ref type="managerEvent">AgentDump</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "AgentConnect", "Queue: %s\r\n" "Uniqueid: %s\r\n" "Channel: %s\r\n" "Member: %s\r\n" "MemberName: %s\r\n" - "Holdtime: %ld\r\n" + "HoldTime: %ld\r\n" "BridgedChannel: %s\r\n" - "Ringtime: %ld\r\n" + "RingTime: %ld\r\n" "%s", queuename, ast_channel_uniqueid(qe->chan), ast_channel_name(peer), member->interface, member->membername, (long) time(NULL) - qe->start, ast_channel_uniqueid(peer), (long)(orig - to > 0 ? (orig - to) / 1000 : 0), @@ -5609,6 +5798,20 @@ static int remove_from_queue(const char *queuename, const char *interface) queue_t_unref(q, "Interface wasn't dynamic, expiring temporary reference"); return RES_NOT_DYNAMIC; } + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a member is removed from the queue.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Location'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" /> + </syntax> + <see-also> + <ref type="managerEvent">QueueMemberAdded</ref> + <ref type="application">RemoveQueueMember</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "QueueMemberRemoved", "Queue: %s\r\n" "Location: %s\r\n" @@ -5657,6 +5860,27 @@ static int add_to_queue(const char *queuename, const char *interface, const char new_member->ringinuse = q->ringinuse; new_member->dynamic = 1; ao2_link(q->members, new_member); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a member is added to the queue.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Location'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='StateInterface'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Membership'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Penalty'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='CallsTaken'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='LastCall'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Status'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Paused'])" /> + </syntax> + <see-also> + <ref type="managerEvent">QueueMemberRemoved</ref> + <ref type="application">AddQueueMember</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "QueueMemberAdded", "Queue: %s\r\n" "Location: %s\r\n" @@ -5737,6 +5961,21 @@ static int set_member_paused(const char *queuename, const char *interface, const ast_queue_log(q->name, "NONE", mem->membername, (paused ? "PAUSE" : "UNPAUSE"), "%s", S_OR(reason, "")); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a member is paused/unpaused in the queue with a reason.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Location'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Paused'])" /> + </syntax> + <see-also> + <ref type="application">PauseQueueMember</ref> + <ref type="application">UnPauseQueueMember</ref> + </see-also> + </managerEventInstance> + ***/ if (!ast_strlen_zero(reason)) { manager_event(EVENT_FLAG_AGENT, "QueueMemberPaused", "Queue: %s\r\n" @@ -5746,6 +5985,21 @@ static int set_member_paused(const char *queuename, const char *interface, const "Reason: %s\r\n", q->name, mem->interface, mem->membername, paused, reason); } else { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a member is paused/unpaused in the queue without a reason.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Location'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Paused'])" /> + </syntax> + <see-also> + <ref type="application">PauseQueueMember</ref> + <ref type="application">UnPauseQueueMember</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "QueueMemberPaused", "Queue: %s\r\n" "Location: %s\r\n" @@ -5796,6 +6050,19 @@ static int set_member_penalty_help_members(struct call_queue *q, const char *int update_realtime_member_field(mem, q->name, "penalty", rtpenalty); } ast_queue_log(q->name, "NONE", interface, "PENALTY", "%d", penalty); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a member's penalty is changed.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Location'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Penalty'])" /> + </syntax> + <see-also> + <ref type="function">QUEUE_MEMBER</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "QueueMemberPenalty", "Queue: %s\r\n" "Location: %s\r\n" @@ -5824,6 +6091,24 @@ static int set_member_ringinuse_help_members(struct call_queue *q, const char *i update_realtime_member_field(mem, q->name, realtime_ringinuse_field, rtringinuse); } ast_queue_log(q->name, "NONE", interface, "RINGINUSE", "%d", ringinuse); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a member's ringinuse setting is changed.</synopsis> + <syntax> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" /> + <xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Location'])" /> + <parameter name="Ringinuse"> + <enumlist> + <enum name="0"/> + <enum name="1"/> + </enumlist> + </parameter> + </syntax> + <see-also> + <ref type="function">QUEUE_MEMBER</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_AGENT, "QueueMemberRinginuse", "Queue: %s\r\n" "Location: %s\r\n" diff --git a/apps/app_stack.c b/apps/app_stack.c index 70fb7282d..66d39b3c9 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -247,6 +247,14 @@ static int frame_set_var(struct ast_channel *chan, struct gosub_stack_frame *fra pbx_builtin_setvar_helper(chan, var, value); } + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a LOCAL channel variable is set due to a subroutine call.</synopsis> + <see-also> + <ref type="application">GoSub</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_DIALPLAN, "VarSet", "Channel: %s\r\n" "Variable: LOCAL(%s)\r\n" diff --git a/apps/app_userevent.c b/apps/app_userevent.c index 3ebf33289..de196f831 100644 --- a/apps/app_userevent.c +++ b/apps/app_userevent.c @@ -89,6 +89,17 @@ static int userevent_exec(struct ast_channel *chan, const char *data) ast_str_append(&body, 0, "%s\r\n", args.extra[x]); } + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>A user defined event raised from the dialplan.</synopsis> + <parameter name="UserEvent"> + <para>The event name, as specified in the dialplan.</para> + </parameter> + <see-also> + <ref type="application">UserEvent</ref> + </see-also> + </managerEventInstance> + ***/ manager_event(EVENT_FLAG_USER, "UserEvent", "UserEvent: %s\r\n" "Uniqueid: %s\r\n" diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 1a9f73810..c9d2f7199 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -7753,7 +7753,30 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu, queue_mwi_event(ext_context, urgentmsgs, 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); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a new message has been left in a voicemail mailbox.</synopsis> + <syntax> + <parameter name="Mailbox"> + <para>The mailbox with the new message, specified as <emphasis>mailbox</emphasis>@<emphasis>context</emphasis></para> + </parameter> + <parameter name="Waiting"> + <para>Whether or not the mailbox has access to a voicemail application.</para> + </parameter> + <parameter name="New"> + <para>The number of new messages.</para> + </parameter> + <parameter name="Old"> + <para>The number of old messages.</para> + </parameter> + </syntax> + </managerEventInstance> + ***/ + ast_manager_event(chan, EVENT_FLAG_CALL, "MessageWaiting", + "Mailbox: %s@%s\r\n" + "Waiting: %d\r\n" + "New: %d\r\n" + "Old: %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 @@ -11396,6 +11419,11 @@ out: if (valid) { int new = 0, old = 0, urgent = 0; snprintf(ext_context, sizeof(ext_context), "%s@%s", vms.username, vmu->context); + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a user has finished listening to their messages.</synopsis> + </managerEventInstance> + ***/ 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); |