Play listen 11 times on Asterisk to irritate caller..



This dialplan is to show how you can use the applicationmap feature in Asterisk to have an inband interruption during a call and force the caller (the other party) to hear something irritating like the word “listen” for 11 times while you listen to soothing music. This come from this forum youtube posting now Malaysian public enemy no .1 . The # in the instructions below means it’s a command you run on your linux box.

  • This is article is designed for FreePBX or adjust it for almost any Asterisk based distros…..
  • This article is to present how simple it is to do so much stuff on Asterisk…
  • This dialplan goes out to everyone in support of freedom of speech… 🙂
  1. Create an inband DTMF based code, e.g. here would be #9 by
    # nano /etc/asterisk/features_applicationmap_custom.conf
    Add this line below
    listenrant=>#9,peer/callee,Macro,listentome,s,1
  2. Now, create a dialplan in Asterisk
    # nano /etc/asterisk/extension_custom.confPaste like below
    [macro-listentome]
    exten => s,1,NoOp(Start to irritate you la)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,Playback(custom/listen)
    exten => s,n,NoOp(There ya go..)
  3. Now, enable the feature in globals
    # nano /etc/asterisk/globals_custom.confEdit or paste to include, if you have more than one applicationmap, separate it with a #
    DYNAMIC_FEATURES = listenrant
  4. Now reload stuff
    # asterisk -rx “dialplan reload”
    # asterisk -rx “features reload”
  5. Now, place this sound file in /var/lib/asterisk/sounds/customs, change directory where relevant and the user which asterisk process runs. These below are defaults
    # mkdir /var/lib/asterisk/sounds/custom
    # cd /var/lib/asterisk/sounds/custom
    # wget https://dl.dropbox.com/u/18507018/listen.sln
    # chown asterisk:asteirsk listen.sln
  6. Done. When someone calls you, to irritate them, just hit #9…..lol!