Technique for playing audio through asterisk from a mysql database.
I've been busy recently learning and implementing Asterisk for different applications. One of them being my job developing for a telecommunications services provider. So here's a bit of the type of work I've been doing.
Create a mysql database called 'agi' with a table 'audio' that has fields 'name' VARCHAR(50) and 'file' BLOB.
Add a row to the table that has the name 'added' with the corresponding audio in 'file'.
You can use phpMyAdmin to insert a gsm file to the row through a browser or some other method using perl.
It would be nice if EAGI supported sending audio directly back to the dialplan, eh?
This is the Asterisk extension calling our script with an arguement that specifies what to match in our sql query. The following extension would select the audio file stored in the table called "added".