[Asterisk-doc] docs chapter07.xml,1.5,1.6
websmith
asterisk-doc@lists.digium.com
Mon, 29 Dec 2003 15:47:23 +0000
Comments:
Update of /cvsroot/asterisk/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv13262
Modified Files:
chapter07.xml
Log Message:
Adding section on Music-on-hold written by Nick Bachmann <asterisk@not-real.org>
Index: chapter07.xml
===================================================================
RCS file: /cvsroot/asterisk/docs/chapter07.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** chapter07.xml 22 Dec 2003 07:31:13 -0000 1.5
--- chapter07.xml 29 Dec 2003 15:47:17 -0000 1.6
***************
*** 3,29 ****
<sect1>
<title>Music on Hold/MP3 Playback</title>
<sect2>
<title>Proper Version of MPG123</title>
! <para/>
</sect2>
<sect2>
! <title>Timing: zaptel/ztdummy/ztrtc</title>
! <para/>
</sect2>
</sect1>
<sect1>
<title>DTMF over SIP</title>
! <para/>
<sect2>
! <title>Inband only works on G.711 ulaw/alaw</title>
! <para/>
</sect2>
<sect2>
! <title>SIP-INFO</title>
! <para/>
</sect2>
<sect2>
! <title>RFC2833</title>
! <para/>
</sect2>
<sect2>
--- 3,155 ----
<sect1>
<title>Music on Hold/MP3 Playback</title>
+ <para>
+ Before using Asterisk's Music On Hold feature, mpg123 and a timing system must be in place.
+ </para>
<sect2>
<title>Proper Version of MPG123</title>
! <para>
! Music on Hold requires mpg123. Note that mpg321, which is often is often linked to /usr/bin/mpg123,
! will not work. Additionally, mpg123 must be installed in /usr/bin.
! </para>
! <para>
! mpg134 can be downloaded from <ulink url="http://www.mpg123.de" type="http">http://www.mpg123.de</ulink>.
! Before compiling mpg123, change the line in the Makefile that reads
! <programlisting>
! PREFIX=/usr/local
! </programlisting>
! to
! <programlisting>
! PREFIX=/usr
! </programlisting>
! After making the change, mpg123 can be compiled as described in its documentation.
! </para>
!
</sect2>
<sect2>
! <title>Timing: zaptel/ztdummy/zaprtc</title>
! <para>
! Asterisk's Music On Hold application requires a timing source to work correctly.
! There are three possible timing sources that can be used:
! </para>
! <sect3>
! <title>Zaptel</title>
! <para>
! The Zaptel drivers, which run Digium's Wildcard cards, can be used as a timing source.
! If you have a Zaptel card, there is no special setup needed other than loading the standard
! kernel module for the card. Simply set up the Zaptel interface as described previously
! in this guide.
! </para>
! </sect3><sect3>
! <title>ztdummy</title>
! <para>
! ztdummy is a Zaptel driver designed for use as a timing source without having a Wildcard
! board. It uses the USB devices for timing, so the usb-ohci kernel module must be installed
! (lsmod can be used to check). ztdummy is included with the zaptel tree of Asterisk CVS. By
! default, however, it is not compiled. To enable the compilation of ztdummy, open the
! Makefile in zaptel source directory for editing. Find the line that reads
! <programlisting>
! <literallayout>
! MODULES=zaptel.o tor2.o torisa.o wcusb.o wcfxo.o wcfxs.o \
! ztdynamic.o ztd-eth.o wct1xxp.o wct4xxp.o # ztdummy.o
! </literallayout>
! </programlisting>
! and remove the # before 'ztdummy.o'. From there, run <command>make</command> and
! <command>make install</command> as usual. Before running Asterisk, you'll need to
! load the ztdummy driver by running <command>modproble ztdummy</command>.
! </para>
! </sect3><sect3>
! <title>zaprtc</title>
! <para>
! ztrtc uses the system clock rather than the USB subsystem to get timing information.
! Note, however, that ztrtc does not work on multiprocessor systems. ztrtc does not
! come with Asterisk but is available from
! <ulink url="http://www.junghanns.net/asterisk/" type="http">http://www.junghanns.net/asterisk/</ulink>.
! </para>
! </sect3>
! </sect2>
! <sect2>
! <title>Configuration File: /etc/asterisk/musiconhold.conf</title>
! <para>
! The musiconhold.conf syntax is simple and similar to other Asterisk files. Here is a sample
! configuration file:
! <programlisting>
! <literallayout>
! [classes]
! default => quietmp3:/var/lib/asterisk/mohmp3
! nirvana => quietmp3:/usr/share/mp3/nirvana-music
! random-nirvana => quietmp3:/usr/share/mp3/nirvana-music,-z
! loud-nirvana => mp3:/usr/share/mp3/nirvana-music
! </literallayout>
! </programlisting>
! In this example, the class <command>default</command> plays MP3s from the directory
! /var/lib/asterisk/mohmp3/ sequentially. Note the 'quietmp3' directive, which keeps the music
! at an appropriate volume for most telephony Music on Hold applications. The class
! <command>nirvana</command> is similar, but uses the directory /usr/share/mp3/nivrana-music/ instead.
! <command>random-nirvana</command> picks files in the directory randomly, instead of sequentially,
! due to the '-z' option at the end of the line. The final class, <command>loud-nirvana</command>
! does not reduce the volume of the output, due to 'quietmp3' being replaced by 'mp3'. The 'mp3'
! directive is useful for applications targeting the hearing impaired (as well as Nirvana fans).
! </para>
! </sect2>
! <sect2>
! <title>Adding Music on Hold to the Dialplan</title>
! <para>
! Adding Music on Hold to the dial plan is fairly straightforward and simple. Just add
! <command>MusicOnHold(class)</command> as you would Dial() or Voicemail(). For example:
! <programlisting>
! <literallayout>
! exten => 6789,1,Answer()
! exten => 6789,2,MusicOnHold(nirvana)
! </literallayout>
! </programlisting>
! </para>
! </sect2>
! <sect2>
! <title>A Final Note on Choosing Music</title>
! <para>
! In the United States and other countries, playing copyrighted music to strangers who call into your
! PBX (without a proper license) is illegal. However, high-quality, royalty free music does exist.
! An excellent source for it is
! <ulink url="http://www.openmusicregistry.org" type="http">http://www.openmusicregistry.org</ulink>.
! </para>
! <para>
! Licensing music from well-known artists is not terribly expensive, however. For sites with 10 or
! fewer incoming telco lines, a license from BMI (the largest licensor of popular music) can be had
! for a little less than $200 per annum. With this license, you may use any of BMI's 4.4 million
! songs for a Music on Hold application. More details are available at
! <ulink url="http://www.bmi.com" type="http">http://www.bmi.com</ulink>.
! </para>
</sect2>
</sect1>
<sect1>
<title>DTMF over SIP</title>
! <para>
! DTMF (Dial Tone Multi-Frequency) is the name for the specific sounds ("dial tones") made by the keys
! on a telephone keypad. The choice of which method to use for DTMF over SIP is made in Asterisk's
! /etc/asterisk/sip.conf. Carying DTMF over SIP can be done in one of three ways:
! </para>
<sect2>
! <title>Inband</title>
! <para>
! Inband DTMF is just as it sounds: the sound made by the key press is sent in the audio channel
! where it is decoded by Asterisk (or whatever the termination point of the call is).
! Inband is only available on A-Law and Mu-Law codecs; it is generally bad practice to use Inband DTMF.
! </para>
</sect2>
<sect2>
! <title>Info</title>
! <para>
! The Info method sends SIP Info messages from phone to Asterisk with the text of the buttons
! pressed on the phone. SIP Info tends to be a better choice than Inband because the key-presses are
! send textually, independent of the audio codec.
! Users of Grandstream phones should use Info for the Asterisk voicemail; the other methods won't work.
! </para>
</sect2>
<sect2>
! <title>rfc2833</title>
! <para>
! The rfc2833 method uses an RTP mode defined in RFC 2833 to transmit the DTMF digits. rfc2833 is
! similar to Info, but will not work on Grandstream phones.
! </para>
</sect2>
<sect2>
***************
*** 127,131 ****
<sect1>
<title>Message Waiting Indication</title>
! <para/>
</sect1>
<sect1>
--- 253,268 ----
<sect1>
<title>Message Waiting Indication</title>
! <para>
! SIP phones that support a message waiting indicator (such as a stuttered dial tone or a flashing light)
! can be associated with a voice mail box. In /etc/asterisk/sip.conf, just add a line like
! <programsegment>
! mailbox=1234
! </programsegment>
! You can associate more than one mailbox with a SIP phone for a message waiting indication by seperating
! the voice mail box numbers with commas:
! <programsegment>
! mailbox=1234,9999
! </programsegment>
! </para>
</sect1>
<sect1>