Prompt Recording with Unique IDs

Want an easy way for customers/users to record prompts in Asterisk and then assign a unique ID to each? I threw this together and it works extremely well. Hope everyone finds it useful.

I've attached the prompts, recorded by Allison herself at our expense: http://heavylogic.com.

Note: The filenames are generated by the second of the day. I didn't want to shell out to generate a unique ID and I wanted to keep it simple so I'm betting that it's pretty unlikely that two users with the same account code will record the prompts at the exact same second of the day. I also wanted the ID to be all numeric and small enough for users to write down easily. :)



exten => s,1,BackGround(prompt_instruct)
exten => s,n,Set(FILENAME=${TIMESTAMP:-6:6})
exten => s,n,Record(${ACCOUNTCODE}/${FILENAME}:ulaw)
exten => s,n,Background(prompt_save)
exten => s,n,Background(prompt_review)
exten => s,n,Background(prompt_delete)

exten => 1,1,Playback(prompt_saved)
exten => 1,n,Playback(prompt_id)
exten => 1,n,SayDigits(${FILENAME})
exten => 1,n,Wait(3)
exten => 1,n,Playback(prompt_id)
exten => 1,n,SayDigits(${FILENAME})
exten => 1,n,Wait(3)
exten => 1,n,Playback(prompt_id)
exten => 1,n,SayDigits(${FILENAME})
exten => 1,n,Hangup

exten => 2,1,Playback(${ACCOUNTCODE}/${FILENAME})
exten => 2,n,GoTo(s,4)

exten => 3,1,System(rm /var/lib/asterisk/sounds/${ACCOUNTCODE}/${FILENAME}.ulaw)
exten => 3,n,Playback(prompt_deleted)
exten => 3,n,GoTo(s,1)

exten => *,1,GoTo(s,2)



Image

allison_prompts.zip - These are the high quality (sln) formatted prompts for use with the above script professionally recorded by Allison, the same sexy lady that did the core Asterisk audio.
Want an easy way for customers/users to record prompts in Asterisk and then assign a unique ID to each? I threw this together and it works extremely well. Hope everyone finds it useful.

I've attached the prompts, recorded by Allison herself at our expense: http://heavylogic.com.

Note: The filenames are generated by the second of the day. I didn't want to shell out to generate a unique ID and I wanted to keep it simple so I'm betting that it's pretty unlikely that two users with the same account code will record the prompts at the exact same second of the day. I also wanted the ID to be all numeric and small enough for users to write down easily. :)



exten => s,1,BackGround(prompt_instruct)
exten => s,n,Set(FILENAME=${TIMESTAMP:-6:6})
exten => s,n,Record(${ACCOUNTCODE}/${FILENAME}:ulaw)
exten => s,n,Background(prompt_save)
exten => s,n,Background(prompt_review)
exten => s,n,Background(prompt_delete)

exten => 1,1,Playback(prompt_saved)
exten => 1,n,Playback(prompt_id)
exten => 1,n,SayDigits(${FILENAME})
exten => 1,n,Wait(3)
exten => 1,n,Playback(prompt_id)
exten => 1,n,SayDigits(${FILENAME})
exten => 1,n,Wait(3)
exten => 1,n,Playback(prompt_id)
exten => 1,n,SayDigits(${FILENAME})
exten => 1,n,Hangup

exten => 2,1,Playback(${ACCOUNTCODE}/${FILENAME})
exten => 2,n,GoTo(s,4)

exten => 3,1,System(rm /var/lib/asterisk/sounds/${ACCOUNTCODE}/${FILENAME}.ulaw)
exten => 3,n,Playback(prompt_deleted)
exten => 3,n,GoTo(s,1)

exten => *,1,GoTo(s,2)



Image

allison_prompts.zip - These are the high quality (sln) formatted prompts for use with the above script professionally recorded by Allison, the same sexy lady that did the core Asterisk audio.
Created by: bkervaski, Last modification: Fri 05 of Nov, 2010 (23:05 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+