RSS
 

Redial: Playing with Asterisk & Voicemail

08 Feb

For Redial this week, I’m supposed to give a short presentation — I chose my topic to be dealing with phone security, operational security, basic cellphone theory, and the burners used in The Wire.  Should be fun.  I didn’t prepare any notes or make a slide presentation.

This week’s homework for Redial involved building a simple voicemail dialplan.  Here’s mine:

[vt520_week2hw]
;exten => s,1,Wait(1)
;exten => s,n,SayDigits(${CALLERID(num)})
; same => n,Playback(vm-num-i-have)
; same => n,SayDigits(9725107983)
; use Archer's joke voicemail sound
;exten => s,n,Playback(demo-echotest)
;exten => s,n,Echo()
;exten => s,n,Playback(demo-echodone)
;exten => s,n,Hangup()

[vt520]
exten => s,1,Wait(1)
;exten => s,n,Playback(tt-weasels)
exten => s,n,Playback(/home/vt520/asterisk_sounds/archer_voicemail)
exten => s,n,Goto(vt520-vm,s,1)

[vt520-vm]
; vm-review: Press 1 to accept this recording. Press 2 to listen to it. Press 3 to re-record your message.
exten => s,1,Voicemail(112@vt520_voicemail, u)
;exten => s,n,Record(asterisk-recording%d:ulaw)
exten => s,n,Playback(vm-review)
;exten => s,n,Festival('Press 1 to continue or 2 to change your message')
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
;voicemail will go the a extension if * is hit during voicemail app
exten => a,1,VoiceMailMain(112@vt520_voicemail)
exten => a,n,Hangup()

exten => 1,1,Playback(queue-quantity1)
exten => 1,n,SayNumber(18)
exten => 1,n,Playback(queue-quantity2)
exten => 1,n,Hangup()

exten => 2,1,Playback(${RECORDED_FILE})
exten => 2,n,Playback(vm-review)
exten => 2,n,WaitExten(10)
exten => 2,n,Goto(vt520-vm,s,1)

Basically what is going on here is that when you dial in to my extension, it first plays back Sterling Archer’s elaborate voicemail hoax, as I’m not available to take the call:

I recorded the audio off a copy of the Archer episode using fraps, then exported it to WAV via Adobe Premiere after trimming down the sound clip.  Then I had to convert the WAV to a .sln file using the command:

sox archer_voicemail.wav -t raw -r 8000 -s -w -c 1 archer_voicemail.sln

…which I learned about through voip-info.org’s helpful wav conversion page.

I also found voip-info.org’s list of audio files and descriptions to be very useful for locating exactly which pre-recorded sound file would be appropriate.

Once the voicemail message plays, the system prompts the caller to record a message.  I wasn’t able to get recording to work, though I did in other experiments manage to get it to try to record and then email me with the voicemail details.  But this dialplan WILL allow you to confirm the message you left and will then move to another “extension” via a menu, before eventually hanging up.

I used a Goto function between the initial voicemail message and the rest of the dialplan so that later I could make it loop back to recording the message again if necessary.

Shout-out to Archer and the Archer show crew and cast for the voicemail.

 
No Comments

Posted in ITP, Redial