From ddab42e296a0c69ab40a2ecbe5cdcc961f6b6602 Mon Sep 17 00:00:00 2001 From: Matt Jordan Date: Fri, 12 Aug 2016 11:15:38 -0500 Subject: func_channel: Reorganize documentation * Following the example of the PJSIP channel driver, the channel technology specific documentation has been moved to the respective channel drivers that provide that functionality. This has the benefit of locating the documentation of items with those modules that provide it. * Examples of using the CHANNEL function for both standard items as well as for PJSIP have been added. * The 'max_forwards' standard item has been documented. Change-Id: Ifaa79a232c8ac99cf8da6ef6cc7815d398b1b79b --- funcs/func_channel.c | 218 ++++++--------------------------------------------- 1 file changed, 26 insertions(+), 192 deletions(-) (limited to 'funcs') diff --git a/funcs/func_channel.c b/funcs/func_channel.c index 39d7499c7..9831dd71f 100644 --- a/funcs/func_channel.c +++ b/funcs/func_channel.c @@ -232,207 +232,41 @@ ASTERISK_REGISTER_FILE() R/O returns the linkedid if available, otherwise returns the uniqueid. - - chan_sip provides the following additional options: - - - R/O Get the IP address of the peer. - - - R/O Get the source IP address of the peer. - - - R/O Get the source port of the peer. - - - R/O Get the URI from the From: header. - - - R/O Get the URI from the Contact: header. - - - R/O Get the useragent. - - - R/O Get the name of the peer. - - - R/O 1 if T38 is offered or enabled in this channel, - otherwise 0 - - - R/O Get QOS information about the RTP stream - This option takes two additional arguments: - Argument 1: - audio Get data about the audio stream - video Get data about the video stream - text Get data about the text stream - Argument 2: - local_ssrc Local SSRC (stream ID) - local_lostpackets Local lost packets - local_jitter Local calculated jitter - local_maxjitter Local calculated jitter (maximum) - local_minjitter Local calculated jitter (minimum) - local_normdevjitterLocal calculated jitter (normal deviation) - local_stdevjitter Local calculated jitter (standard deviation) - local_count Number of received packets - remote_ssrc Remote SSRC (stream ID) - remote_lostpacketsRemote lost packets - remote_jitter Remote reported jitter - remote_maxjitter Remote calculated jitter (maximum) - remote_minjitter Remote calculated jitter (minimum) - remote_normdevjitterRemote calculated jitter (normal deviation) - remote_stdevjitterRemote calculated jitter (standard deviation) - remote_count Number of transmitted packets - rtt Round trip time - maxrtt Round trip time (maximum) - minrtt Round trip time (minimum) - normdevrtt Round trip time (normal deviation) - stdevrtt Round trip time (standard deviation) - all All statistics (in a form suited to logging, - but not for parsing) - - - R/O Get remote RTP destination information. - This option takes one additional argument: - Argument 1: - audio Get audio destination - video Get video destination - text Get text destination - Defaults to audio if unspecified. - - - R/O Get source RTP destination information. - This option takes one additional argument: - Argument 1: - audio Get audio destination - video Get video destination - text Get text destination - Defaults to audio if unspecified. - - - - chan_iax2 provides the following additional options: - - - R/O Get the peer's osptoken. - - - R/O Get the peer's ip address. - - - R/O Get the peer's username. - - - R/O Get the if the IAX channel is secured. - - - R/O Get the if the IAX channel is secured. - - - chan_dahdi provides the following additional options: - - - R/O DAHDI channel related to this channel. - - - R/O DAHDI span related to this channel. - - - R/O DAHDI channel type, one of: - - - - - - - - - - R/O PRI Keypad digits that came in with the SETUP message. - - - R/O PRI Reverse Charging Indication, one of: - - None - Reverse Charging Requested - - - - R/O PRI Nonzero if the channel has no B channel. - The channel is either on hold or a call waiting call. - - - W/O Change the channel's buffer policy (for the current call only) - This option takes two arguments: - Number of buffers, - Buffer policy being one of: - full - immediate - half - - - W/O Change the configuration of the active echo - canceller on the channel (if any), for the current call - only. - Possible values are: - on Normal mode (the echo canceller is actually reinitalized) - off Disabled - fax FAX/data mode (NLP disabled if possible, otherwise - completely disabled) - voice Voice mode (returns from FAX mode, reverting the changes that were made) - - - chan_ooh323 provides the following additional options: - - - R/W Fax Detect - Returns 0 or 1 - Write yes or no - - - R/W t38support - Returns 0 or 1 - Write yes or no - - - R/0 Returns caller URL - - - R/0 Returns caller h323id - - - R/0 Returns caller dialed digits - - - R/0 Returns caller email - - - R/0 Returns callee email - - - R/0 Returns callee dialed digits - - - R/0 Returns caller URL - - R/W Get or set the maximum number of call forwards for this channel. - - This number describes the number of times a call may be forwarded by this channel - before the call fails. "Forwards" in this case refers to redirects by phones as well - as calls to local channels. - - Note that this has no relation to the SIP Max-Forwards header. - + R/W The maximum number of forwards allowed. + + + + + Gets/sets various pieces of information about the channel, additional item may be available from the channel driver; see its documentation for details. Any item requested that is not available on the current channel will return an empty string. + + ; Push a hangup handler subroutine existing at dialplan + ; location default,s,1 onto the current channel + same => n,Set(CHANNEL(hangup_handler_push)=default,s,1) + + ; Set the current tonezone to Germany (de) + same => n,Set(CHANNEL(tonezone)=de) + + ; Set the allowed maximum number of forwarding attempts + same => n,Set(CHANNEL(max_forwards)=10) + + ; If this channel is ejected from its next bridge, and if + ; the channel is not hung up, begin executing dialplan at + ; location default,after-bridge,1 + same => n,Set(CHANNEL(after_bridge_goto)=default,after-bridge,1) + + ; Log the current state of the channel + same => n,Log(NOTICE, This channel is: ${CHANNEL(state)}) + + ***/ -- cgit v1.2.3