Asterisk Features

From open-voip.org

Jump to: navigation, search

This lesson is based on the full realtime example. Let's add the following features to our pbx:

  • Blind transfer
  • Auto attendent transfer
  • Dynamic feature

The setup includes three end points 1000,2000 and 3000 File:features_endpoints.gif

Contents

Configure features.conf

save the old features.conf file:

 cp /etc/asterisk/features.conf /etc/asterisk/features.conf_orig

Now, Let's configure the /etc/asterisk/features.conf file. change it to be as follow:

 ;
 [featuremap]
  blindxfer => #1                ; Blind transfer  (default is #)
 ;disconnect => *9               ; Disconnect  (default is *)
 ;automon => *1                  ; One Touch Record a.k.a. Touch Monitor
  atxfer => *2                   ; Attended transfer
 ;parkcall => #72                ; Park call (one step parking)
 ;automixmon => *3               ; One Touch Record a.k.a. Touch MixMonitor
 ;
 [applicationmap]

note that the we uncomment the blindxfer and atxfer.

features commands

reload the features file

 asterisk -r
 features reload

verify features with the following command:

 localhost*CLI> features show
 Builtin Feature           Default Current
 ---------------           ------- -------
 Pickup                    *8      *8     
 Blind Transfer            #       #1     
 Attended Transfer                 *2     
 One Touch Monitor                        
 Disconnect Call           *       *9     
 Park Call                                
 One Touch MixMonitor        

Configure the Dial-plan

Now, we should change the "Dial" command in our dial plan (extensions table) to allow calls transfer:

   t    - Allow the called party to transfer the calling party by sending the
          DTMF sequence defined in the blindxfer setting in the featuremap section
          of features.conf.
   T    - Allow the calling party to transfer the called party by sending the
          DTMF sequence defined in the blindxfer setting in the featuremap section
          of features.conf.

The extenstions table will look as follow: File:features_dial_cmd.GIF

 NOTE: RTP must be go through Asterisk in order to recognize the DTMF. 
 you can set "canreinvite=no" in the sip_buddies table in order to force RTP through the ASterisk

Test blind transfert - #1

  • call from 1000 to 2000
  • 2000 answer and press #1,get dial tone and dial 3000. 1000 gets music on hold.
  • 1000 should hear Ringing and talk with 3000 when he answers. 2000 disconnected.

Test auto-attendent transfer - *2

  • call from 1000 to 2000
  • 2000 answer and press *2, get dial tone and dial 3000. user 1000 will hear music on hold
  • 3000 answer to 2000.
  • 2000 disconnect, 1000 can start talk with 3000.


Dynamic feature

 ;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,<AppArguments>[,MOH_Class]]

for example:

 testfeature => #7,peer,Playback,tt-monkeys

features.conf will look like:

 [general]
 ;
 [featuremap]
 blindxfer => #1                 ; Blind transfer  (default is #)
 disconnect => #9                ; Disconnect  (default is *)
 ;automon => *1                  ; One Touch Record a.k.a. Touch Monitor
 atxfer => *2                    ; Attended transfer
 ;parkcall => #72                ; Park call (one step parking)
 ;automixmon => *3               ; One Touch Record a.k.a. Touch MixMonitor
 ;
 [applicationmap]
 testfeature => #7,peer,Playback,tt-monkeys

in order to allow the dynamic feature, the dial plan (extensions table) will look like: File:dynamic_feature_extension.GIF

Test by calling from 1000 to 2000 and pressing #7, you will hear monkeys!

Personal tools