[asterisk-commits] mjordan: trunk r369905 - in /trunk: channels/ doc/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 10 17:26:35 CDT 2012


Author: mjordan
Date: Tue Jul 10 17:26:27 2012
New Revision: 369905

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369905
Log:
Add some additional documentation for core AMI events

This patch adds some basic documentation for a number of modules.  This
includes core source files in Asterisk (those in main), as well as
chan_agent, chan_dahdi, chan_local, sig_analog, and sig_pri.  The DTD
has also been updated to allow referencing of AMI commands.

Modified:
    trunk/channels/chan_agent.c
    trunk/channels/chan_dahdi.c
    trunk/channels/chan_local.c
    trunk/channels/sig_analog.c
    trunk/channels/sig_pri.c
    trunk/doc/appdocsxml.dtd
    trunk/main/asterisk.c
    trunk/main/cdr.c
    trunk/main/channel.c
    trunk/main/features.c
    trunk/main/loader.c
    trunk/main/logger.c
    trunk/main/manager.c
    trunk/main/pbx.c

Modified: trunk/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_agent.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Tue Jul 10 17:26:27 2012
@@ -2133,6 +2133,20 @@
 							!ast_strlen_zero(p->moh) ? strlen(p->moh) + 1 : 0);
 						if (p->loginstart == 0)
 							time(&p->loginstart);
+						/*** DOCUMENTATION
+							<managerEventInstance>
+								<synopsis>Raised when an Agent has logged in.</synopsis>
+								<syntax>
+									<parameter name="Agent">
+										<para>The name of the agent.</para>
+									</parameter>
+								</syntax>
+								<see-also>
+									<ref type="application">AgentLogin</ref>
+									<ref type="managerEvent">Agentlogoff</ref>
+								</see-also>
+							</managerEventInstance>
+						***/
 						manager_event(EVENT_FLAG_AGENT, "Agentlogin",
 							      "Agent: %s\r\n"
 							      "Channel: %s\r\n"
@@ -2225,6 +2239,17 @@
 						logintime = time(NULL) - p->loginstart;
 						p->loginstart = 0;
 						ast_mutex_unlock(&p->lock);
+						/*** DOCUMENTATION
+							<managerEventInstance>
+								<synopsis>Raised when an Agent has logged off.</synopsis>
+								<syntax>
+									<xi:include xpointer="xpointer(/docs/managerEvent[@name='Agentlogin']/managerEventInstance/syntax/parameter[@name='Agent'])" />
+								</syntax>
+								<see-also>
+									<ref type="managerEvent">Agentlogin</ref>
+								</see-also>
+							</managerEventInstance>
+						***/
 						manager_event(EVENT_FLAG_AGENT, "Agentlogoff",
 							      "Agent: %s\r\n"
 							      "Logintime: %ld\r\n"

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Jul 10 17:26:27 2012
@@ -2175,6 +2175,11 @@
 		/* Real channel */
 		snprintf(ch_name, sizeof(ch_name), "%d", p->channel);
 	}
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a DAHDI channel is created or an underlying technology is associated with a DAHDI channel.</synopsis>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_CALL, "DAHDIChannel",
 		"Channel: %s\r\n"
 		"Uniqueid: %s\r\n"
@@ -3866,10 +3871,20 @@
 
 	if (report_alarms & REPORT_CHANNEL_ALARMS) {
 		ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", p->channel);
+		/*** DOCUMENTATION
+			<managerEventInstance>
+				<synopsis>Raised when an alarm is cleared on a DAHDI channel.</synopsis>
+			</managerEventInstance>
+		***/
 		manager_event(EVENT_FLAG_SYSTEM, "AlarmClear", "Channel: %d\r\n", p->channel);
 	}
 	if (report_alarms & REPORT_SPAN_ALARMS && p->manages_span_alarms) {
 		ast_log(LOG_NOTICE, "Alarm cleared on span %d\n", p->span);
+		/*** DOCUMENTATION
+			<managerEventInstance>
+				<synopsis>Raised when an alarm is cleared on a DAHDI span.</synopsis>
+			</managerEventInstance>
+		***/
 		manager_event(EVENT_FLAG_SYSTEM, "SpanAlarmClear", "Span: %d\r\n", p->span);
 	}
 }
@@ -7972,6 +7987,11 @@
 	alarm_str = alarm2str(alms);
 	if (report_alarms & REPORT_CHANNEL_ALARMS) {
 		ast_log(LOG_WARNING, "Detected alarm on channel %d: %s\n", p->channel, alarm_str);
+		/*** DOCUMENTATION
+			<managerEventInstance>
+				<synopsis>Raised when an alarm is set on a DAHDI channel.</synopsis>
+			</managerEventInstance>
+		***/
 		manager_event(EVENT_FLAG_SYSTEM, "Alarm",
 					  "Alarm: %s\r\n"
 					  "Channel: %d\r\n",
@@ -7980,6 +8000,11 @@
 
 	if (report_alarms & REPORT_SPAN_ALARMS && p->manages_span_alarms) {
 		ast_log(LOG_WARNING, "Detected alarm on span %d: %s\n", p->span, alarm_str);
+		/*** DOCUMENTATION
+			<managerEventInstance>
+				<synopsis>Raised when an alarm is set on a DAHDI span.</synopsis>
+			</managerEventInstance>
+		***/
 		manager_event(EVENT_FLAG_SYSTEM, "SpanAlarm",
 					  "Alarm: %s\r\n"
 					  "Span: %d\r\n",
@@ -10027,6 +10052,19 @@
 	ast_verb(3, "%s DND on channel %d\n",
 			flag? "Enabled" : "Disabled",
 			dahdichan->channel);
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when the Do Not Disturb state is changed on a DAHDI channel.</synopsis>
+			<syntax>
+				<parameter name="Status">
+					<enumlist>
+						<enum name="enabled"/>
+						<enum name="disabled"/>
+					</enumlist>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_SYSTEM, "DNDState",
 			"Channel: DAHDI/%d\r\n"
 			"Status: %s\r\n", dahdichan->channel,

Modified: trunk/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_local.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Tue Jul 10 17:26:27 2012
@@ -955,6 +955,31 @@
 		goto return_cleanup;
 	}
 
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when two halves of a Local Channel form a bridge.</synopsis>
+			<syntax>
+				<parameter name="Channel1">
+					<para>The name of the Local Channel half that bridges to another channel.</para>
+				</parameter>
+				<parameter name="Channel2">
+					<para>The name of the Local Channel half that executes the dialplan.</para>
+				</parameter>
+				<parameter name="Context">
+					<para>The context in the dialplan that Channel2 starts in.</para>
+				</parameter>
+				<parameter name="Exten">
+					<para>The extension in the dialplan that Channel2 starts in.</para>
+				</parameter>
+				<parameter name="LocalOptimization">
+					<enumlist>
+						<enum name="Yes"/>
+						<enum name="No"/>
+					</enumlist>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_CALL, "LocalBridge",
 		      "Channel1: %s\r\n"
 		      "Channel2: %s\r\n"

Modified: trunk/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_analog.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/channels/sig_analog.c (original)
+++ trunk/channels/sig_analog.c Tue Jul 10 17:26:27 2012
@@ -3138,6 +3138,11 @@
 	case ANALOG_EVENT_NOALARM:
 		analog_set_alarm(p, 0);
 		ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", p->channel);
+		/*** DOCUMENTATION
+			<managerEventInstance>
+				<synopsis>Raised when an Alarm is cleared on an Analog channel.</synopsis>
+			</managerEventInstance>
+		***/
 		manager_event(EVENT_FLAG_SYSTEM, "AlarmClear",
 			"Channel: %d\r\n", p->channel);
 		break;
@@ -4013,6 +4018,19 @@
 	ast_verb(3, "%s DND on channel %d\n",
 			flag ? "Enabled" : "Disabled",
 			p->channel);
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when the Do Not Disturb state is changed on an Analog channel.</synopsis>
+			<syntax>
+				<parameter name="Status">
+					<enumlist>
+						<enum name="enabled"/>
+						<enum name="disabled"/>
+					</enumlist>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_SYSTEM, "DNDState",
 			"Channel: DAHDI/%d\r\n"
 			"Status: %s\r\n", p->channel,

Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Tue Jul 10 17:26:27 2012
@@ -5153,6 +5153,19 @@
  */
 static void sig_pri_ami_hold_event(struct ast_channel *chan, int is_held)
 {
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a PRI channel is put on Hold.</synopsis>
+			<syntax>
+				<parameter name="Status">
+					<enumlist>
+						<enum name="On"/>
+						<enum name="Off"/>
+					</enumlist>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_CALL, "Hold",
 		"Status: %s\r\n"
 		"Channel: %s\r\n"

Modified: trunk/doc/appdocsxml.dtd
URL: http://svnview.digium.com/svn/asterisk/trunk/doc/appdocsxml.dtd?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/doc/appdocsxml.dtd (original)
+++ trunk/doc/appdocsxml.dtd Tue Jul 10 17:26:27 2012
@@ -39,7 +39,7 @@
   <!ELEMENT see-also (ref|xi:include)*>
 
   <!ELEMENT ref (#PCDATA)>
-  <!ATTLIST ref type (application|function|astcli|link|manpage|filename|agi|managerEvent) #REQUIRED>
+  <!ATTLIST ref type (application|function|astcli|link|manpage|filename|agi|manager|managerEvent) #REQUIRED>
 
   <!ELEMENT synopsis (#PCDATA)>
 

Modified: trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/asterisk.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Tue Jul 10 17:26:27 2012
@@ -1779,6 +1779,25 @@
 	/* Called on exit */
 	ast_verb(0, "Asterisk %s ending (%d).\n", ast_active_channels() ? "uncleanly" : "cleanly", num);
 	ast_debug(1, "Asterisk ending (%d).\n", num);
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when Asterisk is shutdown or restarted.</synopsis>
+			<syntax>
+				<parameter name="Shutdown">
+					<enumlist>
+						<enum name="Uncleanly"/>
+						<enum name="Cleanly"/>
+					</enumlist>
+				</parameter>
+				<parameter name="Restart">
+					<enumlist>
+						<enum name="True"/>
+						<enum name="False"/>
+					</enumlist>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_SYSTEM, "Shutdown", "Shutdown: %s\r\nRestart: %s\r\n", ast_active_channels() ? "Uncleanly" : "Cleanly", restart ? "True" : "False");
 	if (ast_socket > -1) {
 		pthread_cancel(lthread);
@@ -4105,6 +4124,11 @@
 	}
 
 	ast_set_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED);
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when all Asterisk initialization procedures have finished.</synopsis>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_SYSTEM, "FullyBooted", "Status: Fully Booted\r\n");
 
 	ast_process_pending_reloads();

Modified: trunk/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cdr.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/main/cdr.c (original)
+++ trunk/main/cdr.c Tue Jul 10 17:26:27 2012
@@ -1039,7 +1039,11 @@
 			ast_copy_string(cdr->accountcode, ast_channel_accountcode(chan), sizeof(cdr->accountcode));
 		}
 	}
-
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a CDR's AccountCode is changed.</synopsis>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_CALL, "NewAccountCode",
 			"Channel: %s\r\n"
 			"Uniqueid: %s\r\n"
@@ -1065,7 +1069,11 @@
 			ast_copy_string(cdr->peeraccount, ast_channel_peeraccount(chan), sizeof(cdr->peeraccount));
 		}
 	}
-
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a CDR's PeerAccount is changed.</synopsis>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_CALL, "NewPeerAccount",
 			"Channel: %s\r\n"
 			"Uniqueid: %s\r\n"

Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Tue Jul 10 17:26:27 2012
@@ -1125,6 +1125,15 @@
 	 * a lot of data into this func to do it here!
 	 */
 	if (ast_get_channel_tech(tech) || (tech2 && ast_get_channel_tech(tech2))) {
+		/*** DOCUMENTATION
+			<managerEventInstance>
+				<synopsis>Raised when a new channel is created.</synopsis>
+				<syntax>
+					<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newstate']/managerEventInstance/syntax/parameter[@name='ChannelState'])" />
+					<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newstate']/managerEventInstance/syntax/parameter[@name='ChannelStateDesc'])" />
+				</syntax>
+			</managerEventInstance>
+		***/
 		ast_manager_event(tmp, EVENT_FLAG_CALL, "Newchannel",
 			"Channel: %s\r\n"
 			"ChannelState: %d\r\n"
@@ -1329,7 +1338,11 @@
 	/* Yeah, let's not change a lock-critical value without locking */
 	ast_channel_lock(chan);
 	ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_DEV);
-
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a hangup is requested with no set cause.</synopsis>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_CALL, "HangupRequest",
 		"Channel: %s\r\n"
 		"Uniqueid: %s\r\n",
@@ -1357,7 +1370,14 @@
 	if (cause < 0) {
 		f.data.uint32 = ast_channel_hangupcause(chan);
 	}
-
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a hangup is requested with a specific cause code.</synopsis>
+				<syntax>
+					<xi:include xpointer="xpointer(/docs/managerEvent[@name='Hangup']/managerEventInstance/syntax/parameter[@name='Cause'])" />
+				</syntax>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_CALL, "HangupRequest",
 		"Channel: %s\r\n"
 		"Uniqueid: %s\r\n"
@@ -2545,6 +2565,14 @@
 
 	ast_channel_lock(chan);
 	res = ast_softhangup_nolock(chan, cause);
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a soft hangup is requested with a specific cause code.</synopsis>
+				<syntax>
+					<xi:include xpointer="xpointer(/docs/managerEvent[@name='Hangup']/managerEventInstance/syntax/parameter[@name='Cause'])" />
+				</syntax>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_CALL, "SoftHangupRequest",
 		"Channel: %s\r\n"
 		"Uniqueid: %s\r\n"
@@ -2707,6 +2735,19 @@
 	ast_channel_unlock(chan);
 
 	ast_cc_offer(chan);
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a channel is hung up.</synopsis>
+				<syntax>
+					<parameter name="Cause">
+						<para>A numeric cause code for why the channel was hung up.</para>
+					</parameter>
+					<parameter name="Cause-txt">
+						<para>A description of why the channel was hung up.</para>
+					</parameter>
+				</syntax>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_CALL, "Hangup",
 		"Channel: %s\r\n"
 		"Uniqueid: %s\r\n"
@@ -3522,6 +3563,31 @@
 
 static void send_dtmf_event(struct ast_channel *chan, const char *direction, const char digit, const char *begin, const char *end)
 {
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a DTMF digit has started or ended on a channel.</synopsis>
+				<syntax>
+					<parameter name="Direction">
+						<enumlist>
+							<enum name="Received"/>
+							<enum name="Sent"/>
+						</enumlist>
+					</parameter>
+					<parameter name="Begin">
+						<enumlist>
+							<enum name="Yes"/>
+							<enum name="No"/>
+						</enumlist>
+					</parameter>
+					<parameter name="End">
+						<enumlist>
+							<enum name="Yes"/>
+							<enum name="No"/>
+						</enumlist>
+					</parameter>
+				</syntax>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_DTMF,
 			"DTMF",
 			"Channel: %s\r\n"
@@ -6224,6 +6290,11 @@
  */
 static void __ast_change_name_nolink(struct ast_channel *chan, const char *newname)
 {
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when the name of a channel is changed.</synopsis>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_CALL, "Rename", "Channel: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", ast_channel_name(chan), newname, ast_channel_uniqueid(chan));
 	ast_channel_name_set(chan, newname);
 }
@@ -6471,6 +6542,16 @@
 	int pres;
 
 	pres = ast_party_id_presentation(&ast_channel_caller(chan)->id);
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a channel receives new Caller ID information.</synopsis>
+			<syntax>
+				<parameter name="CID-CallingPres">
+					<para>A description of the Caller ID presentation.</para>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_CALL, "NewCallerid",
 		"Channel: %s\r\n"
 		"CallerIDNum: %s\r\n"
@@ -6665,6 +6746,25 @@
 
 	chans[0] = clonechan;
 	chans[1] = original;
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a masquerade occurs between two channels, wherein the Clone channel's internal information replaces the Original channel's information.</synopsis>
+			<syntax>
+				<parameter name="Clone">
+					<para>The name of the channel whose information will be going into the Original channel.</para>
+				</parameter>
+				<parameter name="CloneState">
+					<para>The current state of the clone channel.</para>
+				</parameter>
+				<parameter name="Original">
+					<para>The name of the channel whose information will be replaced by the Clone channel's information.</para>
+				</parameter>
+				<parameter name="OriginalState">
+					<para>The current state of the original channel.</para>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	ast_manager_event_multichan(EVENT_FLAG_CALL, "Masquerade", 2, chans,
 		"Clone: %s\r\n"
 		"CloneState: %s\r\n"
@@ -7058,6 +7158,31 @@
 	ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, name);
 
 	/* setstate used to conditionally report Newchannel; this is no more */
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a channel's state changes.</synopsis>
+			<syntax>
+				<parameter name="ChannelState">
+					<para>A numeric code for the channel's current state, related to ChannelStateDesc</para>
+				</parameter>
+				<parameter name="ChannelStateDesc">
+					<enumlist>
+						<enum name="Down"/>
+						<enum name="Rsrvd"/>
+						<enum name="OffHook"/>
+						<enum name="Dialing"/>
+						<enum name="Ring"/>
+						<enum name="Ringing"/>
+						<enum name="Up"/>
+						<enum name="Busy"/>
+						<enum name="Dialing Offhook"/>
+						<enum name="Pre-ring"/>
+						<enum name="Unknown"/>
+					</enumlist>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_CALL, "Newstate",
 		"Channel: %s\r\n"
 		"ChannelState: %d\r\n"
@@ -7353,6 +7478,25 @@
 static void manager_bridge_event(int onoff, int type, struct ast_channel *c0, struct ast_channel *c1)
 {
 	struct ast_channel *chans[2] = { c0, c1 };
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a bridge changes between two channels.</synopsis>
+			<syntax>
+				<parameter name="Bridgestate">
+					<enumlist>
+						<enum name="Link"/>
+						<enum name="Unlink"/>
+					</enumlist>
+				</parameter>
+				<parameter name="Bridgetype">
+					<enumlist>
+						<enum name="core"/>
+						<enum name="native"/>
+					</enumlist>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	ast_manager_event_multichan(EVENT_FLAG_CALL, "Bridge", 2, chans,
 		"Bridgestate: %s\r\n"
 		"Bridgetype: %s\r\n"

Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Tue Jul 10 17:26:27 2012
@@ -471,6 +471,42 @@
 			<ref type="function">FEATURE</ref>
 		</see-also>
 	</function>
+	<managerEvent language="en_US" name="ParkedCallTimeOut">
+		<managerEventInstance class="EVENT_FLAG_CALL">
+			<synopsis>Raised when a parked call times out.</synopsis>
+			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ParkedCall']/managerEventInstance/syntax/parameter[@name='Exten'])" />
+				<parameter name="Channel"/>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ParkedCall']/managerEventInstance/syntax/parameter[@name='Parkinglot'])" />
+				<parameter name="CallerIDNum"/>
+				<parameter name="CallerIDName"/>
+				<parameter name="ConnectedLineNum"/>
+				<parameter name="ConnectedLineName"/>
+				<parameter name="UniqueID"/>
+			</syntax>
+			<see-also>
+				<ref type="managerEvent">ParkedCall</ref>
+			</see-also>
+		</managerEventInstance>
+	</managerEvent>
+	<managerEvent language="en_US" name="ParkedCallGiveUp">
+		<managerEventInstance class="EVENT_FLAG_CALL">
+			<synopsis>Raised when a parked call hangs up while in the parking lot.</synopsis>
+			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ParkedCall']/managerEventInstance/syntax/parameter[@name='Exten'])" />
+				<parameter name="Channel"/>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ParkedCall']/managerEventInstance/syntax/parameter[@name='Parkinglot'])" />
+				<parameter name="CallerIDNum"/>
+				<parameter name="CallerIDName"/>
+				<parameter name="ConnectedLineNum"/>
+				<parameter name="ConnectedLineName"/>
+				<parameter name="UniqueID"/>
+			</syntax>
+			<see-also>
+				<ref type="managerEvent">ParkedCall</ref>
+			</see-also>
+		</managerEventInstance>
+	</managerEvent>
  ***/
 
 #define DEFAULT_PARK_TIME							45000	/*!< ms */
@@ -1658,7 +1694,28 @@
 		pu->context, pu->exten, pu->priority, (pu->parkingtime / 1000));
 
 	ast_cel_report_event(chan, AST_CEL_PARK_START, NULL, pu->parkinglot->name, peer);
-
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a call has been parked.</synopsis>
+			<syntax>
+				<parameter name="Exten">
+					<para>The parking lot extension.</para>
+				</parameter>
+				<parameter name="Parkinglot">
+					<para>The name of the parking lot.</para>
+				</parameter>
+				<parameter name="From">
+					<para>The name of the channel that parked the call.</para>
+				</parameter>
+			</syntax>
+			<see-also>
+				<ref type="application">Park</ref>
+				<ref type="manager">Park</ref>
+				<ref type="managerEvent">ParkedCallTimeOut</ref>
+				<ref type="managerEvent">ParkedCallGiveUp</ref>
+			</see-also>
+		</managerEventInstance>
+	***/
 	ast_manager_event(chan, EVENT_FLAG_CALL, "ParkedCall",
 		"Exten: %s\r\n"
 		"Channel: %s\r\n"
@@ -5417,6 +5474,20 @@
 		}
 
 		ast_cel_report_event(pu->chan, AST_CEL_PARK_END, NULL, "UnParkedCall", chan);
+		/*** DOCUMENTATION
+			<managerEventInstance>
+				<synopsis>Raised when a call has been unparked.</synopsis>
+				<syntax>
+					<xi:include xpointer="xpointer(/docs/managerEvent[@name='ParkedCall']/managerEventInstance/syntax/parameter[@name='Exten'])" />
+					<xi:include xpointer="xpointer(/docs/managerEvent[@name='ParkedCall']/managerEventInstance/syntax/parameter[@name='Parkinglot'])" />
+					<xi:include xpointer="xpointer(/docs/managerEvent[@name='ParkedCall']/managerEventInstance/syntax/parameter[@name='From'])" />
+				</syntax>
+				<see-also>
+					<ref type="application">ParkedCall</ref>
+					<ref type="managerEvent">ParkedCall</ref>
+				</see-also>
+			</managerEventInstance>
+		***/
 		ast_manager_event(pu->chan, EVENT_FLAG_CALL, "UnParkedCall",
 			"Exten: %s\r\n"
 			"Channel: %s\r\n"
@@ -7274,7 +7345,22 @@
 
 	chans[0] = tmpchana;
 	chans[1] = tmpchanb;
-
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a bridge is successfully created due to a manager action.</synopsis>
+			<syntax>
+				<parameter name="Response">
+					<enumlist>
+						<enum name="Success"/>
+						<enum name="Failed"/>
+					</enumlist>
+				</parameter>
+			</syntax>
+			<see-also>
+				<ref type="manager">Bridge</ref>
+			</see-also>
+		</managerEventInstance>
+	***/
 	ast_manager_event_multichan(EVENT_FLAG_CALL, "BridgeAction", 2, chans,
 				"Response: Success\r\n"
 				"Channel1: %s\r\n"
@@ -7702,6 +7788,15 @@
 	}
 
 	/* If you want UniqueIDs, set channelvars in manager.conf to CHANNEL(uniqueid) */
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when a call pickup occurs.</synopsis>
+			<syntax>
+				<parameter name="Channel"><para>The name of the channel that initiated the pickup.</para></parameter>
+				<parameter name="TargetChannel"><para>The name of the channel that is being picked up.</para></parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	ast_manager_event_multichan(EVENT_FLAG_CALL, "Pickup", 2, chans,
 		"Channel: %s\r\n"
 		"TargetChannel: %s\r\n",
@@ -7908,6 +8003,14 @@
 	/* avoid bridge with ourselves */
 	if (!strcmp(ast_channel_name(chan), args.dest_chan)) {
 		ast_log(LOG_WARNING, "Unable to bridge channel %s with itself\n", ast_channel_name(chan));
+		/*** DOCUMENTATION
+			<managerEventInstance>
+				<synopsis>Raised when an error occurs during bridge creation.</synopsis>
+				<see-also>
+					<ref type="application">Bridge</ref>
+				</see-also>
+			</managerEventInstance>
+		***/
 		ast_manager_event(chan, EVENT_FLAG_CALL, "BridgeExec",
 			"Response: Failed\r\n"
 			"Reason: Unable to bridge channel to itself\r\n"
@@ -7999,6 +8102,14 @@
 	}
 
 	/* Report that the bridge will be successfull */
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when the bridge is created successfully.</synopsis>
+			<see-also>
+				<ref type="application">Bridge</ref>
+			</see-also>
+		</managerEventInstance>
+	***/
 	ast_manager_event_multichan(EVENT_FLAG_CALL, "BridgeExec", 2, chans,
 		"Response: Success\r\n"
 		"Channel1: %s\r\n"

Modified: trunk/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/loader.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Tue Jul 10 17:26:27 2012
@@ -1162,6 +1162,19 @@
 	/* Tell manager clients that are aggressive at logging in that we're done
 	   loading modules. If there's a DNS problem in chan_sip, we might not
 	   even reach this */
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when all dynamic modules have finished their initial loading.</synopsis>
+			<syntax>
+				<parameter name="ModuleSelection">
+					<enumlist>
+						<enum name="Preload"/>
+						<enum name="All"/>
+					</enumlist>
+				</parameter>
+			</syntax>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_SYSTEM, "ModuleLoadReport", "ModuleLoadStatus: Done\r\nModuleSelection: %s\r\nModuleCount: %d\r\n", preload_only ? "Preload" : "All", modulecount);
 
 	return res;

Modified: trunk/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/logger.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Tue Jul 10 17:26:27 2012
@@ -793,6 +793,16 @@
 	AST_RWLIST_TRAVERSE(&logchannels, f, list) {
 		if (f->disabled) {
 			f->disabled = 0;	/* Re-enable logging at reload */
+			/*** DOCUMENTATION
+				<managerEventInstance>
+					<synopsis>Raised when a logging channel is re-enabled after a reload operation.</synopsis>
+					<syntax>
+						<parameter name="Channel">
+							<para>The name of the logging channel.</para>
+						</parameter>
+					</syntax>
+				</managerEventInstance>
+			***/
 			manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: Yes\r\n", f->filename);
 		}
 		if (f->fileptr && (f->fileptr != stdout) && (f->fileptr != stderr)) {
@@ -1089,6 +1099,16 @@
 						fprintf(stderr, "Asterisk logging error: Out of disk space, can't log to log file %s\n", chan->filename);
 					else
 						fprintf(stderr, "Logger Warning: Unable to write to log file '%s': %s (disabled)\n", chan->filename, strerror(errno));
+					/*** DOCUMENTATION
+						<managerEventInstance>
+							<synopsis>Raised when a logging channel is disabled.</synopsis>
+							<syntax>
+								<parameter name="Channel">
+									<para>The name of the logging channel.</para>
+								</parameter>
+							</syntax>
+						</managerEventInstance>
+					***/
 					manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: No\r\nReason: %d - %s\r\n", chan->filename, errno, strerror(errno));
 					chan->disabled = 1;
 				} else if (res > 0) {

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Tue Jul 10 17:26:27 2012
@@ -476,7 +476,34 @@
 			<replaceable>Extension</replaceable>/<replaceable>Context</replaceable>/<replaceable>Priority</replaceable>
 			or <replaceable>Application</replaceable>/<replaceable>Data</replaceable></para>
 		</description>
+		<see-also>
+			<ref type="managerEvent">OriginateResponse</ref>
+		</see-also>
 	</manager>
+	<managerEvent language="en_US" name="OriginateResponse">
+		<managerEventInstance class="EVENT_FLAG_CALL">
+			<synopsis>Raised in response to an Originate command.</synopsis>
+			<syntax>
+				<parameter name="ActionID" required="false"/>
+				<parameter name="Resonse">
+					<enumlist>
+						<enum name="Failure"/>
+						<enum name="Success"/>
+					</enumlist>
+				</parameter>
+				<parameter name="Channel"/>
+				<parameter name="Context"/>
+				<parameter name="Exten"/>
+				<parameter name="Reason"/>
+				<parameter name="Uniqueid"/>
+				<parameter name="CallerIDNum"/>
+				<parameter name="CallerIDName"/>
+			</syntax>
+			<see-also>
+				<ref type="manager">Originate</ref>
+			</see-also>
+		</managerEventInstance>
+	</managerEvent>
 	<manager name="Command" language="en_US">
 		<synopsis>
 			Execute Asterisk CLI Command.
@@ -5535,7 +5562,11 @@
 	}
 
 	ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, context, exten);
-
+	/*** DOCUMENTATION
+		<managerEventInstance>
+			<synopsis>Raised when an extension state has changed.</synopsis>
+		</managerEventInstance>
+	***/
 	manager_event(EVENT_FLAG_CALL, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nHint: %s\r\nStatus: %d\r\n", exten, context, hint, state);
 	return 0;
 }

Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=369905&r1=369904&r2=369905
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Jul 10 17:26:27 2012
@@ -4414,6 +4414,19 @@
 					term_color(tmp3, passdata, COLOR_BRMAGENTA, 0, sizeof(tmp3)),
 					"in new stack");
 			}
+			/*** DOCUMENTATION
+				<managerEventInstance>
+					<synopsis>Raised when a channel enters a new context, extension, priority.</synopsis>
+					<syntax>
+						<parameter name="Application">
+							<para>The application about to be executed.</para>
+						</parameter>
+						<parameter name="AppData">
+							<para>The data to be passed to the application.</para>
+						</parameter>
+					</syntax>
+				</managerEventInstance>
+			***/
 			manager_event(EVENT_FLAG_DIALPLAN, "Newexten",
 					"Channel: %s\r\n"
 					"Context: %s\r\n"
@@ -10922,6 +10935,11 @@
 			ast_verb(2, "Setting global variable '%s' to '%s'\n", name, value);
 		newvariable = ast_var_assign(name, value);
 		AST_LIST_INSERT_HEAD(headp, newvariable, entries);
+		/*** DOCUMENTATION
+			<managerEventInstance>
+				<synopsis>Raised when a variable is set to a particular value.</synopsis>
+			</managerEventInstance>
+		***/
 		manager_event(EVENT_FLAG_DIALPLAN, "VarSet",
 			"Channel: %s\r\n"
 			"Variable: %s\r\n"




More information about the asterisk-commits mailing list