Hi,
First, I’m new to Asterisk/dialplans etc so bear with me.
I have a webpage with checkboxes which triggers a perl script when submitted. The perl script then generates a textfile based on the checkbox values. The purpose of this is to generate a series of soundfiles to be played when someone calls. The order and number of these soundfiles can vary depending on the choices on the webpage.
Here’s an example of what the textfile can look like (the way it’s formatted right now):
[quote]exten => s,n,Playback(awav1)
exten => s,n,Playback(pa)
exten => s,n,Playback(20)
exten => s,n,Playback(i)
exten => s,n,Playback(1)
exten => s,n,Playback(2)
exten => s,n,Playback(4)
exten => s,n,Playback(awav2)[/quote]
I want the normal dialplan to read the rows from this file so it plays the sounds listed in the textfile and the continue on as normal (or just continue if all the checkboxes are empty and the script generated an empty file). Lets say the current dialplan looks like this:
[quote]exten => s,1,Answer
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup[/quote]
I want to change it to this:
[quote]exten => s,1,Answer
Read rows from textfile here!
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup[/quote]
Can this be done? If so, how?
If not, any suggestions on how to do it?