Merged revisions 73316 via svnmerge from
[asterisk/asterisk.git] / funcs / func_channel.c
index cbaab05..2a44953 100644 (file)
@@ -20,6 +20,7 @@
  *
  * \author Kevin P. Fleming <kpfleming@digium.com>
  * 
+ * \ingroup functions
  */
 
 #include "asterisk.h"
@@ -59,7 +60,7 @@ char *transfercapability_table[0x20] = {
        "3K1AUDIO", "DIGITAL_W_TONES", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",
        "VIDEO", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", };
 
-static int func_channel_read(struct ast_channel *chan, char *function,
+static int func_channel_read(struct ast_channel *chan, const char *function,
                             char *data, char *buf, size_t len)
 {
        int ret = 0;
@@ -100,7 +101,7 @@ static int func_channel_read(struct ast_channel *chan, char *function,
        return ret;
 }
 
-static int func_channel_write(struct ast_channel *chan, char *function,
+static int func_channel_write(struct ast_channel *chan, const char *function,
                              char *data, const char *value)
 {
        int ret = 0;
@@ -149,18 +150,45 @@ static struct ast_custom_function channel_function = {
        .syntax = "CHANNEL(item)",
        .desc = "Gets/set various pieces of information about the channel.\n"
                "Standard items (provided by all channel technologies) are:\n"
-               "R/O    audioreadformat         format currently being read\n"
-               "R/O    audionativeformat       format used natively for audio\n"
-               "R/O    audiowriteformat        format currently being written\n"
-               "R/W    callgroup               call groups for call pickup\n"
-               "R/O    channeltype             technology used for channel\n"
-               "R/W    language                language for sounds played\n"
-               "R/W    musicclass              class (from musiconhold.conf) for hold music\n"
-               "R/W    rxgain                  set rxgain level on channel drivers that support it\n"
-               "R/O    state                   state for channel\n"
-               "R/W    tonezone                zone for indications played\n"
-               "R/W    txgain                  set txgain level on channel drivers that support it\n"
-               "R/O    videonativeformat       format used natively for video\n"
+               "R/O    audioreadformat    format currently being read\n"
+               "R/O    audionativeformat  format used natively for audio\n"
+               "R/O    audiowriteformat   format currently being written\n"
+               "R/W    callgroup          call groups for call pickup\n"
+               "R/O    channeltype        technology used for channel\n"
+               "R/W    language           language for sounds played\n"
+               "R/W    musicclass         class (from musiconhold.conf) for hold music\n"
+               "R/W    rxgain             set rxgain level on channel drivers that support it\n"
+               "R/O    state              state for channel\n"
+               "R/W    tonezone           zone for indications played\n"
+               "R/W    txgain             set txgain level on channel drivers that support it\n"
+               "R/O    videonativeformat  format used natively for video\n"
+               "\n"
+               "chan_sip provides the following additional options:\n"
+               "R/O    rtpqos             Get QOS information about the RTP stream\n"
+               "       This option takes two additional arguments:\n"
+               "  Argument 1:\n"
+               "    audio                 Get data about the audio stream\n"
+               "    video                 Get data about the video stream\n"
+               "    text                  Get data about the text stream\n"
+               "  Argument 2:\n"
+               "    local_ssrc            Local SSRC (stream ID)\n"
+               "    local_lostpackets     Local lost packets\n"
+               "    local_jitter          Local calculated jitter\n"
+               "    local_count           Number of received packets\n"
+               "    remote_ssrc           Remote SSRC (stream ID)\n"
+               "    remote_lostpackets    Remote lost packets\n"
+               "    remote_jitter         Remote reported jitter\n"
+               "    remote_count          Number of transmitted packets\n"
+               "    rtt                   Round trip time\n"
+               "    all                   All statistics (in a form suited to logging, but not for parsing)\n"
+               "R/O    rtpdest            Get remote RTP destination information\n"
+               "       This option takes one additional argument:\n"
+                "  Argument 1:\n"
+                "    audio                 Get audio destination\n"
+                "    video                 Get video destination\n"
+               "\n"
+               "chan_iax2 provides the following additional options:\n"
+               "R/W    osptoken           Get or set the OSP token information for a call\n"
                "\n"
                "Additional items may be available from the channel driver providing\n"
                "the channel; see its documentation for details.\n"