Phone Parrot

August 29, 2006

Originally Posted 815 Days Ago Article Tags « asterisk c »
[Photo of a parrot]

PhoneParrot is an IVR application for Asterisk that will repeat everything a person says in to the phone.

exten => 666,1,Parrot()

For example, you could have PhoneParrot call your mother in the middle of the night. She will pick up the phone and say "moshi moshi", the phone parrot will then say "moshi moshi". Your mother, confused will then probably say, "who is you playa?" to which the phone parrot will respond, "who is you playa?". I think you get the idea.

But phone parrot can do more than just repeat what a person says! Here are some of the cool features:

  • Apply voice change effect to repeated voice (Only if libsoundtouch4c is installed and phone parrot is compiled from source)
  • Play random sound clip if caller rambles on for too long
  • Greet with random sound clip in response to first thing caller says
  • ToDo: Repeat things previously said in conversation

Download

[zip] phoneparrot-0.1.tar.gz (27KB, Released 2006-08-29)

Installation

On your functioning Linux machine running Asterisk with the header files installed to /usr/include/asterisk, run the following commands to install phoneparrot:

# install phoneparrot
cd /usr/src
wget http://www.lobstertech.com/code/phoneparrot/releases/phoneparrot-0.1.tar.gz
tar -xzvf phoneparrot-0.1.tar.gz
cd phoneparrot-0.1
make
make install

# load it in to asterisk
make start

Documentation

*CLI> show application Parrot

  -= Info about application 'Parrot' =-

[Synopsis]
Repeats back to caller what they say like a God damn child

[Description]
Parrot(options)

Description:
  When this application is invoked, it will record to memory what
  the caller is saying.  When the caller stops talking, recording
  buffer of what s?he just said is played back.

  You may also chose to add a voice pitch change effect to what
  the caller just said with the P() option.  Pitch is specified
  in semi-tones.  -5.0 is good for making the voice lower and
  5.0 is good for making the voice higher.

Options:
  T(...) - Silence Threshold, default 256
  W(...) - Milliseconds of silence before repeat.  Default 1000
  N(...) - Minimum time in milliseconds the caller needs to talk
           for voice to be echo'd back.  Default 400
  M(...) - Max milliseconds of talk to buffer.  Default 6000
  S(...) - If caller rambles for more than length of call buffer,
           play a random one of these sound clips instead. List
           is delimited by '^'.  Maximum of 16.  These may not be
           interrupted.
  G(...) - Play greeting clip in response to initial thing caller
           says.  In my testing I noticed that people get a little
           confused and just keep saying hello if you start them
           off in plain old parrot mode.  Here, you can specify a
           list of sound clips from which to randomly choose just
           like with S() here.
  H(...) - Hangup after a certain number of seconds
  I(...) - Repeat may be interrupted if caller speaks for '...'
           milliseconds.  Default is 400, 0 turns off
  P(...) - New pitch of voice echo'd back. Default 0.0

Legal

Phone Parrot
Copyright (c) 2006 Lobstertech, Inc.
Keep it Open Source Pigs

The program found on this page is free software and may be used, distributed, and modified under the terms of the GNU General Public License version 2.0.

This software is distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Comments

  1. Great Work!!!

    whats on the works? ;-)

    John on October 27, 2008 // Permalink

Post Comment