Fix documentation replication issues
[asterisk/asterisk.git] / main / manager_channels.c
index 5ae35b2..23418e6 100644 (file)
@@ -42,44 +42,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a new channel is created.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a new channel is created.</synopsis>
                        <syntax>
-                               <parameter name="Channel">
-                               </parameter>
-                               <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>
-                               <parameter name="CallerIDNum">
-                               </parameter>
-                               <parameter name="CallerIDName">
-                               </parameter>
-                               <parameter name="ConnectedLineNum">
-                               </parameter>
-                               <parameter name="ConnectedLineName">
-                               </parameter>
-                               <parameter name="AccountCode">
-                               </parameter>
-                               <parameter name="Context">
-                               </parameter>
-                               <parameter name="Exten">
-                               </parameter>
-                               <parameter name="Priority">
-                               </parameter>
-                               <parameter name="Uniqueid">
-                               </parameter>
+                               <channel_snapshot/>
                        </syntax>
                </managerEventInstance>
        </managerEvent>
                        </syntax>
                </managerEventInstance>
        </managerEvent>
@@ -87,7 +50,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel's state changes.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel's state changes.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                        </syntax>
                </managerEventInstance>
        </managerEvent>
                        </syntax>
                </managerEventInstance>
        </managerEvent>
@@ -95,7 +58,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel is hung up.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel is hung up.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="Cause">
                                        <para>A numeric cause code for why the channel was hung up.</para>
                                </parameter>
                                <parameter name="Cause">
                                        <para>A numeric cause code for why the channel was hung up.</para>
                                </parameter>
@@ -109,7 +72,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a hangup is requested.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a hangup is requested.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='Hangup']/managerEventInstance/syntax/parameter[@name='Cause'])" />
                        </syntax>
                </managerEventInstance>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='Hangup']/managerEventInstance/syntax/parameter[@name='Cause'])" />
                        </syntax>
                </managerEventInstance>
@@ -118,7 +81,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a soft hangup is requested with a specific cause code.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a soft hangup is requested with a specific cause code.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='Hangup']/managerEventInstance/syntax/parameter[@name='Cause'])" />
                        </syntax>
                </managerEventInstance>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='Hangup']/managerEventInstance/syntax/parameter[@name='Cause'])" />
                        </syntax>
                </managerEventInstance>
@@ -127,7 +90,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_DIALPLAN">
                        <synopsis>Raised when a channel enters a new context, extension, priority.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_DIALPLAN">
                        <synopsis>Raised when a channel enters a new context, extension, priority.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="Extension">
                                        <para>Deprecated in 12, but kept for
                                        backward compatability. Please use
                                <parameter name="Extension">
                                        <para>Deprecated in 12, but kept for
                                        backward compatability. Please use
@@ -146,7 +109,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel receives new Caller ID information.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel receives new Caller ID information.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="CID-CallingPres">
                                        <para>A description of the Caller ID presentation.</para>
                                </parameter>
                                <parameter name="CID-CallingPres">
                                        <para>A description of the Caller ID presentation.</para>
                                </parameter>
@@ -157,7 +120,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a Channel's AccountCode is changed.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a Channel's AccountCode is changed.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="OldAccountCode">
                                        <para>The channel's previous account code</para>
                                </parameter>
                                <parameter name="OldAccountCode">
                                        <para>The channel's previous account code</para>
                                </parameter>
@@ -168,45 +131,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a dial action has started.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a dial action has started.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
-                               <parameter name="DestChannel">
-                               </parameter>
-                               <parameter name="DestChannelState">
-                                       <para>A numeric code for the channel's current state, related to DestChannelStateDesc</para>
-                               </parameter>
-                               <parameter name="DestChannelStateDesc">
-                                       <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>
-                               <parameter name="DestCallerIDNum">
-                               </parameter>
-                               <parameter name="DestCallerIDName">
-                               </parameter>
-                               <parameter name="DestConnectedLineNum">
-                               </parameter>
-                               <parameter name="DestConnectedLineName">
-                               </parameter>
-                               <parameter name="DestAccountCode">
-                               </parameter>
-                               <parameter name="DestContext">
-                               </parameter>
-                               <parameter name="DestExten">
-                               </parameter>
-                               <parameter name="DestPriority">
-                               </parameter>
-                               <parameter name="DestUniqueid">
-                               </parameter>
+                               <channel_snapshot/>
+                               <channel_snapshot prefix="Dest"/>
                                <parameter name="DialString">
                                        <para>The non-technology specific device being dialed.</para>
                                </parameter>
                                <parameter name="DialString">
                                        <para>The non-technology specific device being dialed.</para>
                                </parameter>
@@ -220,8 +146,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a dial action has completed.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a dial action has completed.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='DialBegin']/managerEventInstance/syntax/parameter[contains(@name, 'Dest')])" />
+                               <channel_snapshot/>
+                               <channel_snapshot prefix="Dest"/>
                                <parameter name="DialStatus">
                                        <para>The result of the dial operation.</para>
                                        <enumlist>
                                <parameter name="DialStatus">
                                        <para>The result of the dial operation.</para>
                                        <enumlist>
@@ -243,7 +169,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel goes on hold.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel goes on hold.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="MusicClass">
                                        <para>The suggested MusicClass, if provided.</para>
                                </parameter>
                                <parameter name="MusicClass">
                                        <para>The suggested MusicClass, if provided.</para>
                                </parameter>
@@ -254,7 +180,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel goes off hold.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel goes off hold.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                        </syntax>
                </managerEventInstance>
        </managerEvent>
                        </syntax>
                </managerEventInstance>
        </managerEvent>
@@ -262,84 +188,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when one channel begins spying on another channel.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when one channel begins spying on another channel.</synopsis>
                        <syntax>
-                               <parameter name="SpyerChannel">
-                                       <para>The channel performing the spying.</para>
-                               </parameter>
-                               <parameter name="SpyerChannelState">
-                                       <para>A numeric code for the channel's current state, related to SpyerChannelStateDesc</para>
-                               </parameter>
-                               <parameter name="SpyerChannelStateDesc">
-                                       <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>
-                               <parameter name="SpyerCallerIDNum">
-                               </parameter>
-                               <parameter name="SpyerCallerIDName">
-                               </parameter>
-                               <parameter name="SpyerConnectedLineNum">
-                               </parameter>
-                               <parameter name="SpyerConnectedLineName">
-                               </parameter>
-                               <parameter name="SpyerAccountCode">
-                               </parameter>
-                               <parameter name="SpyerContext">
-                               </parameter>
-                               <parameter name="SpyerExten">
-                               </parameter>
-                               <parameter name="SpyerPriority">
-                               </parameter>
-                               <parameter name="SpyerUniqueid">
-                               </parameter>
-                               <parameter name="SpyeeChannel">
-                                       <para>The channel being spied upon.</para>
-                               </parameter>
-                               <parameter name="SpyeeChannelState">
-                                       <para>A numeric code for the channel's current state, related to SpyeeChannelStateDesc</para>
-                               </parameter>
-                               <parameter name="SpyeeChannelStateDesc">
-                                       <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>
-                               <parameter name="SpyeeCallerIDNum">
-                               </parameter>
-                               <parameter name="SpyeeCallerIDName">
-                               </parameter>
-                               <parameter name="SpyeeConnectedLineNum">
-                               </parameter>
-                               <parameter name="SpyeeConnectedLineName">
-                               </parameter>
-                               <parameter name="SpyeeAccountCode">
-                               </parameter>
-                               <parameter name="SpyeeContext">
-                               </parameter>
-                               <parameter name="SpyeeExten">
-                               </parameter>
-                               <parameter name="SpyeePriority">
-                               </parameter>
-                               <parameter name="SpyeeUniqueid">
-                               </parameter>
+                               <channel_snapshot prefix="Spyer"/>
+                               <channel_snapshot prefix="Spyee"/>
                        </syntax>
                        <see-also>
                                <ref type="application">ChanSpyStop</ref>
                        </syntax>
                        <see-also>
                                <ref type="application">ChanSpyStop</ref>
@@ -350,7 +200,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel has stopped spying.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when a channel has stopped spying.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='ChanSpyStart']/managerEventInstance/syntax/parameter[contains(@name, 'Spyer')])" />
+                               <channel_snapshot prefix="Spyer"/>
+                               <channel_snapshot prefix="Spyee"/>
                        </syntax>
                        <see-also>
                                <ref type="application">ChanSpyStart</ref>
                        </syntax>
                        <see-also>
                                <ref type="application">ChanSpyStart</ref>
@@ -361,7 +212,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_DIALPLAN">
                        <synopsis>Raised when a hangup handler is about to be called.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_DIALPLAN">
                        <synopsis>Raised when a hangup handler is about to be called.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="Handler">
                                        <para>Hangup handler parameter string passed to the Gosub application.</para>
                                </parameter>
                                <parameter name="Handler">
                                        <para>Hangup handler parameter string passed to the Gosub application.</para>
                                </parameter>
@@ -375,6 +226,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                by the CHANNEL() function.
                        </synopsis>
                        <syntax>
                                by the CHANNEL() function.
                        </synopsis>
                        <syntax>
+                               <channel_snapshot/>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='HangupHandlerRun']/managerEventInstance/syntax/parameter)" />
                        </syntax>
                        <see-also>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='HangupHandlerRun']/managerEventInstance/syntax/parameter)" />
                        </syntax>
                        <see-also>
@@ -390,6 +242,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                the CHANNEL() function.
                        </synopsis>
                        <syntax>
                                the CHANNEL() function.
                        </synopsis>
                        <syntax>
+                               <channel_snapshot/>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='HangupHandlerRun']/managerEventInstance/syntax/parameter)" />
                        </syntax>
                        <see-also>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='HangupHandlerRun']/managerEventInstance/syntax/parameter)" />
                        </syntax>
                        <see-also>
@@ -404,7 +257,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                Raised periodically during a fax transmission.
                        </synopsis>
                        <syntax>
                                Raised periodically during a fax transmission.
                        </synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="Operation">
                                        <enumlist>
                                                <enum name="gateway"/>
                                <parameter name="Operation">
                                        <enumlist>
                                                <enum name="gateway"/>
@@ -426,7 +279,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                Raised when a receive fax operation has completed.
                        </synopsis>
                        <syntax>
                                Raised when a receive fax operation has completed.
                        </synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="LocalStationID">
                                        <para>The value of the <variable>LOCALSTATIONID</variable> channel variable</para>
                                </parameter>
                                <parameter name="LocalStationID">
                                        <para>The value of the <variable>LOCALSTATIONID</variable> channel variable</para>
                                </parameter>
@@ -454,7 +307,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                Raised when a send fax operation has completed.
                        </synopsis>
                        <syntax>
                                Raised when a send fax operation has completed.
                        </synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='ReceiveFAX']/managerEventInstance/syntax/parameter)" />
                        </syntax>
                </managerEventInstance>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='ReceiveFAX']/managerEventInstance/syntax/parameter)" />
                        </syntax>
                </managerEventInstance>
@@ -463,7 +316,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when music on hold has started on a channel.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when music on hold has started on a channel.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="Class">
                                        <para>The class of music being played on the channel</para>
                                </parameter>
                                <parameter name="Class">
                                        <para>The class of music being played on the channel</para>
                                </parameter>
@@ -478,7 +331,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when music on hold has stopped on a channel.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when music on hold has stopped on a channel.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">MusicOnHoldStart</ref>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">MusicOnHoldStart</ref>
@@ -490,7 +343,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when monitoring has started on a channel.</synopsis>
                        <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                        <synopsis>Raised when monitoring has started on a channel.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">MonitorStop</ref>
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">MonitorStop</ref>
@@ -503,7 +356,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                <managerEventInstance class="EVENT_FLAG_CALL">
                <synopsis>Raised when monitoring has stopped on a channel.</synopsis>
                <syntax>
                <managerEventInstance class="EVENT_FLAG_CALL">
                <synopsis>Raised when monitoring has stopped on a channel.</synopsis>
                <syntax>
-                       <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                       <channel_snapshot/>
                </syntax>
                <see-also>
                        <ref type="managerEvent">MonitorStart</ref>
                </syntax>
                <see-also>
                        <ref type="managerEvent">MonitorStart</ref>
@@ -525,9 +378,16 @@ struct ast_str *ast_manager_build_channel_state_string_prefix(
 {
        struct ast_str *out = ast_str_create(1024);
        int res = 0;
 {
        struct ast_str *out = ast_str_create(1024);
        int res = 0;
+
        if (!out) {
                return NULL;
        }
        if (!out) {
                return NULL;
        }
+
+       if (snapshot->tech_properties & (AST_CHAN_TP_ANNOUNCER | AST_CHAN_TP_RECORDER)) {
+               ast_free(out);
+               return NULL;
+       }
+
        res = ast_str_set(&out, 0,
                "%sChannel: %s\r\n"
                "%sChannelState: %d\r\n"
        res = ast_str_set(&out, 0,
                "%sChannel: %s\r\n"
                "%sChannelState: %d\r\n"
@@ -555,6 +415,7 @@ struct ast_str *ast_manager_build_channel_state_string_prefix(
                prefix, snapshot->uniqueid);
 
        if (!res) {
                prefix, snapshot->uniqueid);
 
        if (!res) {
+               ast_free(out);
                return NULL;
        }
 
                return NULL;
        }
 
@@ -603,8 +464,8 @@ static struct ast_manager_event_blob *channel_state_change(
                        EVENT_FLAG_CALL, "Newchannel", NO_EXTRA_FIELDS);
        }
 
                        EVENT_FLAG_CALL, "Newchannel", NO_EXTRA_FIELDS);
        }
 
-       was_hungup = ast_test_flag(&old_snapshot->flags, AST_FLAG_ZOMBIE) ? 1 : 0;
-       is_hungup = ast_test_flag(&new_snapshot->flags, AST_FLAG_ZOMBIE) ? 1 : 0;
+       was_hungup = ast_test_flag(&old_snapshot->flags, AST_FLAG_DEAD) ? 1 : 0;
+       is_hungup = ast_test_flag(&new_snapshot->flags, AST_FLAG_DEAD) ? 1 : 0;
 
        if (!was_hungup && is_hungup) {
                return ast_manager_event_blob_create(
 
        if (!was_hungup && is_hungup) {
                return ast_manager_event_blob_create(
@@ -638,6 +499,11 @@ static struct ast_manager_event_blob *channel_newexten(
                return NULL;
        }
 
                return NULL;
        }
 
+       /* Ignore any updates if we're hungup */
+       if (ast_test_flag(&new_snapshot->flags, AST_FLAG_DEAD)) {
+               return NULL;
+       }
+
        if (old_snapshot && ast_channel_snapshot_cep_equal(old_snapshot, new_snapshot)
                && !strcmp(old_snapshot->appl, new_snapshot->appl)) {
                return NULL;
        if (old_snapshot && ast_channel_snapshot_cep_equal(old_snapshot, new_snapshot)
                && !strcmp(old_snapshot->appl, new_snapshot->appl)) {
                return NULL;
@@ -710,9 +576,7 @@ static void channel_snapshot_update(void *data, struct stasis_subscription *sub,
 
        update = stasis_message_data(message);
 
 
        update = stasis_message_data(message);
 
-       if (ast_channel_snapshot_type() != update->type) {
-               return;
-       }
+       ast_assert(ast_channel_snapshot_type() == update->type);
 
        old_snapshot = stasis_message_data(update->old_snapshot);
        new_snapshot = stasis_message_data(update->new_snapshot);
 
        old_snapshot = stasis_message_data(update->old_snapshot);
        new_snapshot = stasis_message_data(update->new_snapshot);
@@ -771,7 +635,7 @@ static void channel_user_event_cb(void *data, struct stasis_subscription *sub,
                <managerEventInstance>
                        <synopsis>A user defined event raised from the dialplan.</synopsis>
                        <syntax>
                <managerEventInstance>
                        <synopsis>A user defined event raised from the dialplan.</synopsis>
                        <syntax>
-                               <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                               <channel_snapshot/>
                                <parameter name="UserEvent">
                                        <para>The event name, as specified in the dialplan.</para>
                                </parameter>
                                <parameter name="UserEvent">
                                        <para>The event name, as specified in the dialplan.</para>
                                </parameter>
@@ -920,7 +784,7 @@ static void channel_dtmf_begin_cb(void *data, struct stasis_subscription *sub,
                <managerEventInstance>
                        <synopsis>Raised when a DTMF digit has started on a channel.</synopsis>
                                <syntax>
                <managerEventInstance>
                        <synopsis>Raised when a DTMF digit has started on a channel.</synopsis>
                                <syntax>
-                                       <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                                       <channel_snapshot/>
                                        <parameter name="Digit">
                                                <para>DTMF digit received or transmitted (0-9, A-E, # or *</para>
                                        </parameter>
                                        <parameter name="Digit">
                                                <para>DTMF digit received or transmitted (0-9, A-E, # or *</para>
                                        </parameter>
@@ -963,7 +827,7 @@ static void channel_dtmf_end_cb(void *data, struct stasis_subscription *sub,
                <managerEventInstance>
                        <synopsis>Raised when a DTMF digit has ended on a channel.</synopsis>
                                <syntax>
                <managerEventInstance>
                        <synopsis>Raised when a DTMF digit has ended on a channel.</synopsis>
                                <syntax>
-                                       <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+                                       <channel_snapshot/>
                                        <parameter name="Digit">
                                                <para>DTMF digit received or transmitted (0-9, A-E, # or *</para>
                                        </parameter>
                                        <parameter name="Digit">
                                                <para>DTMF digit received or transmitted (0-9, A-E, # or *</para>
                                        </parameter>
@@ -1199,6 +1063,9 @@ static void channel_hold_cb(void *data, struct stasis_subscription *sub,
        }
 
        channel_event_string = ast_manager_build_channel_state_string(obj->snapshot);
        }
 
        channel_event_string = ast_manager_build_channel_state_string(obj->snapshot);
+       if (!channel_event_string) {
+               return;
+       }
 
        if (obj->blob) {
                musicclass = ast_json_string_get(ast_json_object_get(obj->blob, "musicclass"));
 
        if (obj->blob) {
                musicclass = ast_json_string_get(ast_json_object_get(obj->blob, "musicclass"));
@@ -1222,6 +1089,9 @@ static void channel_unhold_cb(void *data, struct stasis_subscription *sub,
        RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
 
        channel_event_string = ast_manager_build_channel_state_string(obj->snapshot);
        RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
 
        channel_event_string = ast_manager_build_channel_state_string(obj->snapshot);
+       if (!channel_event_string) {
+               return;
+       }
 
        manager_event(EVENT_FLAG_CALL, "Unhold",
                "%s",
 
        manager_event(EVENT_FLAG_CALL, "Unhold",
                "%s",
@@ -1249,7 +1119,7 @@ int manager_channels_init(void)
        if (!message_router) {
                return -1;
        }
        if (!message_router) {
                return -1;
        }
-       channel_topic = stasis_caching_get_topic(ast_channel_topic_all_cached());
+       channel_topic = ast_channel_topic_all_cached();
        if (!channel_topic) {
                return -1;
        }
        if (!channel_topic) {
                return -1;
        }
@@ -1261,85 +1131,57 @@ int manager_channels_init(void)
 
        ast_register_atexit(manager_channels_shutdown);
 
 
        ast_register_atexit(manager_channels_shutdown);
 
-       ret |= stasis_message_router_add(message_router,
-                                        stasis_cache_update_type(),
-                                        channel_snapshot_update,
-                                        NULL);
+       ret |= stasis_message_router_add_cache_update(message_router,
+               ast_channel_snapshot_type(), channel_snapshot_update, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_user_event_type(),
-                                        channel_user_event_cb,
-                                        NULL);
+               ast_channel_user_event_type(), channel_user_event_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_dtmf_begin_type(),
-                                        channel_dtmf_begin_cb,
-                                        NULL);
+               ast_channel_dtmf_begin_type(), channel_dtmf_begin_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_dtmf_end_type(),
-                                        channel_dtmf_end_cb,
-                                        NULL);
+               ast_channel_dtmf_end_type(), channel_dtmf_end_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_hangup_request_type(),
-                                        channel_hangup_request_cb,
-                                        NULL);
+               ast_channel_hangup_request_type(), channel_hangup_request_cb,
+               NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_dial_type(),
-                                        channel_dial_cb,
-                                        NULL);
+               ast_channel_dial_type(), channel_dial_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_hold_type(),
-                                        channel_hold_cb,
-                                        NULL);
+               ast_channel_hold_type(), channel_hold_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_unhold_type(),
-                                        channel_unhold_cb,
-                                        NULL);
+               ast_channel_unhold_type(), channel_unhold_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_fax_type(),
-                                        channel_fax_cb,
-                                        NULL);
+               ast_channel_fax_type(), channel_fax_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_chanspy_start_type(),
-                                        channel_chanspy_start_cb,
-                                        NULL);
+               ast_channel_chanspy_start_type(), channel_chanspy_start_cb,
+               NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_chanspy_stop_type(),
-                                        channel_chanspy_stop_cb,
-                                        NULL);
+               ast_channel_chanspy_stop_type(), channel_chanspy_stop_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_hangup_handler_type(),
-                                        channel_hangup_handler_cb,
-                                        NULL);
+               ast_channel_hangup_handler_type(), channel_hangup_handler_cb,
+               NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_moh_start_type(),
-                                        channel_moh_start_cb,
-                                        NULL);
+               ast_channel_moh_start_type(), channel_moh_start_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_moh_stop_type(),
-                                        channel_moh_stop_cb,
-                                        NULL);
+               ast_channel_moh_stop_type(), channel_moh_stop_cb, NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_monitor_start_type(),
-                                        channel_monitor_start_cb,
-                                        NULL);
+               ast_channel_monitor_start_type(), channel_monitor_start_cb,
+               NULL);
 
        ret |= stasis_message_router_add(message_router,
 
        ret |= stasis_message_router_add(message_router,
-                                        ast_channel_monitor_stop_type(),
-                                        channel_monitor_stop_cb,
-                                        NULL);
+               ast_channel_monitor_stop_type(), channel_monitor_stop_cb, NULL);
 
        /* If somehow we failed to add any routes, just shut down the whole
         * thing and fail it.
 
        /* If somehow we failed to add any routes, just shut down the whole
         * thing and fail it.