Page 106 - Asterisk™: The Future of Telephony
P. 106

; default
                   usecallerid=yes
                   hidecallerid=no
                   callwaiting=no
                   threewaycalling=yes
                   transfer=yes
                   echocancel=yes
                   echotraining=yes

                   ; define channels
                   context=incoming        ; Incoming calls go to [incoming] in extensions.conf
                   signaling=fxs_ks       ; Use FXS signaling for an FXO channel
                   channel => 2            ; PSTN attached to port 2
               The [trunkgroups] section is used for connections where multiple physical lines are
               used as a single logical connection to the telephone network, and won’t be discussed
               further  in  this  book.  If  you  require  this  type  of  functionality,  see  the
               zapata.conf.sample file and your favorite search engine for more information.
               The [channels] section determines the signaling method for hardware channels and
               their options. Once an option is defined, it is inherited down through the rest of the
               file. A channel is defined using channel =>, and each channel definition inherits all of
               the options defined above that line. If you wish to configure different options for dif-
               ferent channels, remember that the options should be configured before the channel
               => definition.
               We’ve enabled Caller ID with usecallerid=yes and specified that it will not be hidden
               for outgoing calls with hidecallerid=no. Call waiting is deactivated on an FXO line
               with callwaiting=no. Enabling three-way calling with threewaycalling=yes allows an
               active call to be placed on hold with a hook switch flash (discussed in Chapter 7) to
               suspend the current call. You may then dial a third party and join them to the conver-
               sation with another hook switch. The default is to not enable three-way calling.

               Allowing  call  transfer  with  a  hook  switch  is  accomplished  by  configuring  trans
               fer=yes; it requires that three-way calling be enabled. The Asterisk echo canceller is
               used to remove the echo that can be created on analog lines. You can enable the echo
               canceller with echocancel=yes. The echo canceller in Asterisk requires some time to
               learn  the  echo,  but  you  can  speed  this  up  by  enabling  echo  training  (echotrain
               ing=yes). This tells Asterisk to send a tone down the line at the start of a call to measure
               the echo, and therefore learn it more quickly.
               When a call comes in on an FXO interface, you will want to perform some action. The
               action to be performed is configured inside a block of instructions called a context.
               Incoming calls on the FXO interface are directed to the incoming context with con
               text=incoming.  The  instructions  to  perform  inside  the  context  are  defined  within
               extensions.conf.
               Finally, since an FXO channel uses FXS signaling, we define it as such with signal
               ing=fxs_ks.



               78 | Chapter 4: Initial Configuration of Asterisk
   101   102   103   104   105   106   107   108   109   110   111