[asterisk-users] IVR Survey

Steve Edwards asterisk.org at sedwards.com
Fri Apr 10 13:51:30 CDT 2009


On Fri, 10 Apr 2009, James A. Shigley wrote:

> Here is more or less what I'm trying to accomplish
>
> 1.  Call comes in Plays Greeting
>
> 2.  Starts Survey
>
> 3.  Ask Q1, Record the answer (voice responses) repeat this step for 
> each Question
>
> 4.  Combined the recorded responses into one file.
>
> 5.  Email Combined Audio Fi
>
> But I'm clueless as to how to combined the recordings into one file. I
> don't want the questions in the recordings, Only the caller's side of
> the conversation without the dead space while they listen to the
> Qs/Think on their response.

 	sox *.wav combined.wav

> And since this isn't a vmail account and trying to avoid an AGI script
> if possible I'm not sure how to email the recording(s).

You should embrace AGI. It is the solution to a large set of problems.

Here's a shell script snippet to email a binary file:

         (
         echo "MIME-Version: 1.0"
         echo "Content-ID: <"$(date)">"
         echo "Content-Transfer-Encoding: base64"
         echo "Content-Type: application/octet-stream; name=\"${FILE_NAME}\""
         echo "Subject: ${SUBJECT}"
         ${BASE64} <${FILE}
         ) | sudo /usr/sbin/sendmail -f ${FROM} ${TO}

> I also want to be able to structure the body of the email so that it 
> reads something like
>
> You have a new call from $CallerID - "$CallerName" on 'DateTime' ... 
> ect, ect.

Expand on the snippet above -- "left as a exercise for the reader" :)

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list