Audi blogging per phone (1000 short calls per day)

hi,

I’d like to implement the following:

  • user calls US phone #
  • leaves a short audio message (up to 20 seconds)
  • system stores this message as .mp3 with the number of the phone that called in a mysql DB

How would I implement something like this? What do I need in hardware? (computer with modem?) and software? - system should handle 1000+ calls per line per day.

first off, forget modems. You will need a computer with some kind of telco interface, this could be a PRI (t1) card or a Digium TDM400 or TDM2400 (analog lines) cards. You could also go voip and use an internet telephony service provider (ITSP), of which there are many.

Second, i recommend you read the book Asterisk: The Future of Telephony. It is available in dead-tree form from O’Rilley or you can download a PDF for free (creative commons license) at asteriskdocs.org

As for actually doing what you want, there are a few ways of doing it. Probably the easiest is something like this:

exten => s,1,Answer()
exten => s,2,Playback(instructions) ; voice recording of instructions
exten => s,3,Beep()
exten => s,4,Record(${CALLERID}-${DATETIME}.mp3,3,20,skip)
exten => s,5,MySQL(your query)

You get the general idea. What this will do is answer a call, playback a voice file of instructions, beep, then record a file in the form callerid-timestamp.mp3, of 20 seconds max length, stopping after 3 seconds or more of silence, skipping if the call has hung up. It will then do whatever you want to MySQL.

You can also write a custom AGI application that will do all this for you, although AGI consumes more CPU time than doing it in the dialplan as above. All the stuff above is documented on the wiki, voip-info.org.

You’ll want a pretty beefy system for this, especially if you have many voice channels, I’d say 2.4ghz xeon with at least 512mb ram or equivalent. MP3 encoding takes up alot of CPU, you could save CPU on your asterisk box by recording to WAV or GSM files, then encoding to MP3 on another box.

Hopefully this at least points you in the right direction!

thanks for your detailed reply!
would something like this work:
connect.voicepulse.com/rates.aspx

voicepulse isn’t your best bet because (as I recall) they limit you to 4 simultaneous calls. Try Nufone or Asterlink…
there is also a very nice list of companies to choose from
here.

this is so cool… I set it up :wink: Big thanks for helping - I used parts of your script… I’ll keep you updated - I feel like a kid playing with a new trainset for the first time!

PS: and yes I am using vp right now… do they ‘kick’ people out of their partnership once they generate to many incoming calls (which are supposed to be all free, right?)

I love my Audi. :smile:

as i understand it, once you have 4 channels going, anybody else who calls gets a busy signal or goes to voicemail.