[Asterisk-doc] docs appendix03.xml,1.9,1.10
websmith
asterisk-doc@lists.digium.com
Thu, 18 Dec 2003 00:34:22 +0000
Comments:
Update of /cvsroot/asterisk/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv25133
Modified Files:
appendix03.xml
Log Message:
I worked more on the formatting... man, some of this stuff needs to be
taken out and shot several times.
Index: appendix03.xml
===================================================================
RCS file: /cvsroot/asterisk/docs/appendix03.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** appendix03.xml 17 Dec 2003 20:00:13 -0000 1.9
--- appendix03.xml 18 Dec 2003 00:34:17 -0000 1.10
***************
*** 582,612 ****
</para>
- <!-- Continue the work here! -->
<formalpara><title>GotoIfTime: Conditional goto on current time</title>
<para>
! GotoIfTime(<times>|<weekdays>|<mdays>|<months>?[[context|]extension|]pri):
If the current time matches the specified time, then branch to the specified
extension. Each of the elements may be specified either as '*' (for always)
or as a range. See the include syntax.
</para>
- </formalpara>
<formalpara><title>Hangup: Unconditional hangup</title>
<para>
! Hangup(): Unconditionally hangs up a given channel by returning -1 always.
</para>
</formalpara>
! <formalpara><title>HasNewVoicemail: Conditionally branches to priority + 101</title>
<para>
! HasNewVoicemail(vmbox[@context][|varname])
! Branches to priority + 101, if there is new voicemail Optionally sets
! <varname> to the number of new messages.
</para>
</formalpara>
<formalpara><title>LookupBlacklist: Look up Caller*ID name/number from blacklist database</title>
<para>
! LookupBlacklist: Looks up the Caller*ID number on the active
channel in the Asterisk database (family 'blacklist'). If the
number is found, and if there exists a priority n + 101,
--- 582,626 ----
</para>
<formalpara><title>GotoIfTime: Conditional goto on current time</title>
<para>
! <!-- Do we really need the angle brackets around the variables below? -->
! <function>GotoIfTime(<replaceable><times></replaceable>|<replaceable><weekdays></replaceable>|<replaceable><mdays></replaceable>|<replaceable><months></replaceable>?[[<replaceable>context</replaceable>|]<replaceable>extension</replaceable>|]<replaceable>priority</replaceable>)</function>
! </para>
! </formalpara>
! <para>
If the current time matches the specified time, then branch to the specified
extension. Each of the elements may be specified either as '*' (for always)
or as a range. See the include syntax.
</para>
<formalpara><title>Hangup: Unconditional hangup</title>
<para>
! Hangup()
</para>
</formalpara>
+ <para>
+ Unconditionally hangs up a given channel.
+ </para>
+ <para>
+ Always returns -1.
+ </para>
! <formalpara><title>HasNewVoicemail: Check to see if a voicemail box contains new messages</title>
<para>
! <function>HasNewVoicemail(<replaceable>vmbox</replaceable>[@<replaceable>context</replaceable>][|<replaceable>varname</replaceable>])</function>
</para>
</formalpara>
+ <para>
+ Branches to priority + 101, if there is new voicemail Optionally sets
+ <emphasis>varname</emphasis> to the number of new messages.
+ </para>
<formalpara><title>LookupBlacklist: Look up Caller*ID name/number from blacklist database</title>
<para>
! <function>LookupBlacklist()</function>
! </para>
! </formalpara>
! <para>
! Looks up the Caller*ID number on the active
channel in the Asterisk database (family 'blacklist'). If the
number is found, and if there exists a priority n + 101,
***************
*** 615,641 ****
Otherwise, it returns 0. Does nothing if no Caller*ID was received on the
channel.
- Example: database put blacklist <name/number> 1
</para>
! </formalpara>
!
<formalpara><title>LookupCIDName: Look up CallerID Name from local database</title>
<para>
! LookupCIDName: Looks up the Caller*ID number on the active
channel in the Asterisk database (family 'cidname') and sets the
Caller*ID name. Does nothing if no Caller*ID was received on the
channel. This is useful if you do not subscribe to Caller*ID
name delivery, or if you want to change the names on some incoming
! calls. Always returns 0.
</para>
- </formalpara>
-
<formalpara><title>Macro: Macro Implementation</title>
<para>
! Macro(macroname|arg1|arg2...): Executes a macro using the context
! 'macro-<macroname>', jumping to the 's' extension of that context and
executing each step, then returning when the steps end. The calling
extension, context, and priority are stored in ${MACRO_EXTEN},
${MACRO_CONTEXT} and ${MACRO_PRIORITY} respectively. Arguments become
! ${ARG1}, ${ARG2}, etc in the macro context. Macro returns -1 if
any step in the macro returns -1, and 0 otherwise. If you Goto out
of the Macro context, the Macro will terminate and control will be return
--- 629,670 ----
Otherwise, it returns 0. Does nothing if no Caller*ID was received on the
channel.
</para>
! <informalexample>
! <para>
! <!-- Does this example make *any* sense at all? -->
! database put blacklist <name/number> 1
! </para>
! </informalexample>
<formalpara><title>LookupCIDName: Look up CallerID Name from local database</title>
<para>
! <function>LookupCIDName()</function>
! </para>
! </formalpara>
! <para>
! Looks up the Caller*ID number on the active
channel in the Asterisk database (family 'cidname') and sets the
Caller*ID name. Does nothing if no Caller*ID was received on the
channel. This is useful if you do not subscribe to Caller*ID
name delivery, or if you want to change the names on some incoming
! calls.
! </para>
! <para>
! Always returns 0.
</para>
<formalpara><title>Macro: Macro Implementation</title>
<para>
! <function>Macro(<replaceable>macroname</replaceable>[[|<replaceable>arg1</replaceable>]|<replaceable>arg2</replaceable>...])</function>
! </para>
! </formalpara>
! <para>
! Executes a macro using the context
! 'macro-<emphasis>macroname</emphasis>', jumping to the 's' extension of that context and
executing each step, then returning when the steps end. The calling
extension, context, and priority are stored in ${MACRO_EXTEN},
${MACRO_CONTEXT} and ${MACRO_PRIORITY} respectively. Arguments become
! ${ARG1}, ${ARG2}, etc in the macro context. i
! </para>
! <para>
! Macro returns -1 if
any step in the macro returns -1, and 0 otherwise. If you Goto out
of the Macro context, the Macro will terminate and control will be return
***************
*** 644,743 ****
MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.
</para>
- </formalpara>
-
<formalpara><title>MeetMe: Simple MeetMe conference bridge</title>
<para>
! <literallayout>
! MeetMe(confno[|options]): Enters the user into a specified MeetMe conference.
If the conference number is omitted, the user will be prompted to enter
! one. This application always returns -1. A ZAPTEL INTERFACE MUST BE
! INSTALLED FOR CONFERENCING FUNCTIONALITY.
The option string may contain zero or more of the following characters:
! 'a' -- set admin mode
! 'm' -- set monitor only mode
! 'p' -- allow user to exit the conference by pressing '#'
! 's' -- send user to admin/user menu if '*' is received
! 't' -- set talk only mode
! 'd' -- dynamically add conference
! 'v' -- video mode
! 'q' -- quiet mode (don't play enter/leave sounds)
! 'M' -- enable music on hold when the conference has a single caller
! 'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND} (Zap channels only)
! (does not work with non-Zap channels in the same conference)
! </literallayout>
</para>
! </formalpara>
<formalpara><title>MeetMeCount: MeetMe participant count</title>
<para>
! MeetMeCount(confno[|var]): Plays back the number of users in the specifiedi
! MeetMe conference. If var is specified, playback will be skipped and the value
! will be returned in the variable. Returns 0 on success or -1 on a hangup.
! A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING FUNCTIONALITY.
</para>
</formalpara>
<formalpara><title>Milliwatt: Generate a Constant 1000Hz tone at 0dbm (mu-law)</title>
<para>
! Milliwatt(): Generate a Constant 1000Hz tone at 0dbm (mu-law)
</para>
</formalpara>
<formalpara><title>Monitor: Monitor a channel</title>
<para>
! Monitor
Used to start monitoring a channel. The channel's input and output
voice packets are logged to files until the channel hangs up or
monitoring is stopped by the StopMonitor application.
- <literallayout>
- The option string may contain the following arguments: [file_format|[fname_base]]
- file_format -- optional, if not set, defaults to "wav"
- fname_base -- if set, changes the filename used to the one specified.
- </literallayout>
</para>
! </formalpara>
!
<formalpara><title>MP3Player: Play an MP3 file or stream</title>
<para>
! MP3Player(location) Executes mpg123 to play the given location
! which typically would be a filename or a URL. Returns -1 on
! hangup or 0 otherwise. User can exit by pressing any key
</para>
</formalpara>
<formalpara><title>MusicOnHold: Play Music On Hold indefinitely</title>
<para>
! MusicOnHold(class): Plays hold music specified by class. If omitted, the default
! music source for the channel will be used. Returns -1 on hangup.
! Never returns otherwise.
</para>
</formalpara>
<formalpara><title>NoCDR: Make sure asterisk doesn't save CDR for a certain call</title>
<para>
! NoCDR(): makes sure there won't be any CDR written for a certain call
</para>
</formalpara>
<formalpara><title>NoOp: No operation</title>
<para>
! NoOp(): No-operation; Does nothing.
</para>
</formalpara>
<formalpara><title>ParkAndAnnounce: Park and Announce</title>
<para>
! ParkAndAnnounce(announce:template|timeout|dial|[return_context]):
! Park a call into the parkinglot and announce the call over the console.
! announce template: colon seperated list of files to announce, the word PARKED
! will be replaced by a say_digits of the ext the call is parked in
! timeout: time in seconds before the call returns into the return context.
! dial: The app_dial style resource to call to make the announcement. Console/dsp
! calls the console.
! return_context: the goto style label to jump the call back into after
! timeout. default=prio+1
</para>
</formalpara>
<formalpara><title>ParkedCall: Answer a parked call</title>
<para>
--- 673,850 ----
MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.
</para>
<formalpara><title>MeetMe: Simple MeetMe conference bridge</title>
<para>
! <function>MeetMe(<replaceable>confno</replaceable>[|<replaceable>options</replaceable>])</function>
! </para>
! </formalpara>
! <para>
! Enters the user into a specified MeetMe conference.
If the conference number is omitted, the user will be prompted to enter
! one. This application always returns -1.
! </para>
! <warning>
! <para>
! A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING FUNCTIONALITY!
! See the chapter on timing interfaces for more information.
! </para>
! </warning>
! <para>
The option string may contain zero or more of the following characters:
! <simplelist>
! <member>'a' -- set admin mode</member>
! <member>'m' -- set monitor only mode</member>
! <member>'p' -- allow user to exit the conference by pressing '#'</member>
! <member>'s' -- send user to admin/user menu if '*' is received</member>
! <member>'t' -- set talk only mode</member>
! <member>'d' -- dynamically add conference</member>
! <member>'v' -- video mode</member>
! <member>'q' -- quiet mode (don't play enter/leave sounds)</member>
! <member>'M' -- enable music on hold when the conference has a single caller</member>
! <member>'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND} (Zap channels only)
! (does not work with non-Zap channels in the same conference)</member>
! </simplelist>
</para>
! <!-- What does MeetMe return? Does it return? -->
<formalpara><title>MeetMeCount: MeetMe participant count</title>
<para>
! <function>MeetMeCount(<replaceable>confno</replaceable>[|<replaceable>var</replaceable>])</function>
</para>
</formalpara>
+ <para>
+ Plays back the number of users in the specified
+ MeetMe conference. If <emphasis>var</emphasis> is specified, playback will be skipped and the value
+ will be returned in the variable.
+ </para>
+ <warning>
+ <para>
+ A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING FUNCTIONALITY!
+ See the chapter on timing interfaces for more information.
+ </para>
+ </warning>
+ <para>
+ Returns 0 on success or -1 on a hangup.
+ </para>
<formalpara><title>Milliwatt: Generate a Constant 1000Hz tone at 0dbm (mu-law)</title>
<para>
! <function>Milliwatt()</function>
</para>
</formalpara>
+ <para>
+ Generate a Constant 1000Hz tone at 0dbm (mu-law)
+ </para>
<formalpara><title>Monitor: Monitor a channel</title>
<para>
! <function>Monitor([<replaceable>file_format</replaceable>|[<replaceable>fname_basei</replaceable>]])</function>
! </para>
! </formalpara>
! <para>
Used to start monitoring a channel. The channel's input and output
voice packets are logged to files until the channel hangs up or
monitoring is stopped by the StopMonitor application.
</para>
! <para>
! Monitor takes the following arguments:
! <!-- TODO: This really ought to be a variablelist, not a simplelist -->
! <simplelist>
! <member>file_format -- optional, if not set, defaults to "wav"</member>
! <member>fname_base -- if set, changes the filename used to the one specified</member>
! </simplelist>
! </para>
<formalpara><title>MP3Player: Play an MP3 file or stream</title>
<para>
! <function>MP3Player(<replaceable>location</replaceable>)</function>
</para>
</formalpara>
+ <para>
+ Executes <application>mpg123</application> to play the given location
+ which typically would be a filename or a URL. User can exit by pressing
+ any key.
+ </para>
+ <para>
+ Returns -1 on hangup or 0 otherwise.
+ </para>
<formalpara><title>MusicOnHold: Play Music On Hold indefinitely</title>
<para>
! <function>MusicOnHold(class)</function>
</para>
</formalpara>
+ <para>
+ Plays hold music specified by class. If omitted, the default
+ music source for the channel will be used.
+ </para>
+ <para>
+ Returns -1 on hangup.
+ Never returns otherwise.
+ </para>
<formalpara><title>NoCDR: Make sure asterisk doesn't save CDR for a certain call</title>
<para>
! <function>NoCDR()</function>
</para>
</formalpara>
+ <para>
+ Calling this application makes sure there won't be any CDR written for the current call.
+ </para>
<formalpara><title>NoOp: No operation</title>
<para>
! <function>NoOp()</function>
</para>
</formalpara>
+ <para>
+ No-operation; Does nothing.
+ </para>
+ <note>
+ <para>
+ Actually, <function>NoOp()</function> has one very useful side-effect. It prints the argument
+ to the Asterisk console. This can be very helpful when debugging.
+ </para>
+ </note>
<formalpara><title>ParkAndAnnounce: Park and Announce</title>
<para>
! <function>ParkAndAnnounce(<replaceable>announce_template</replaceable>|<replaceable>timeout</replaceable>|<replaceable>dial</replaceable>|[<replaceable>return_context</replaceable>])</function>
</para>
</formalpara>
+ <para>
+ Park a call into the parking lot and announce the call over the console.
+ <variablelist>
+ <varlistentry><term><emphasis>announce_template</emphasis></term>
+ <listitem>
+ <para>
+ colon seperated list of files to announce, the word PARKED
+ will be replaced by a say_digits of the ext the call is parked in
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry><term><emphasis>timeout</emphasis></term>
+ <listitem>
+ <para>time in seconds before the call returns into the return context.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry><term><emphasis>dial</emphasis></term>
+ <listitem>
+ <para>
+ the app_dial style resource to call to make the announcement. Console/dsp
+ calls the console.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry><term><emphasis>return_context</emphasis></term>
+ <listitem>
+ <para>
+ the goto style label to jump the call back into after
+ timeout. Defaults to current priority + 1
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <!-- Continue the work here! -->
<formalpara><title>ParkedCall: Answer a parked call</title>
<para>