Nerd Vittles

I’ve been hacking away at making some of the latest nerd vittles toys to work under Asterisk/FreePBX and have had some good luck with their rolodex, robocall and nv-weather-zip add-ons. It appears that their scripts are fine for the most part but some of the .conf file instructions are off due to differences between asterisk 1.2.x and asterisk 1.4.x. I get the impression from reading some of the forums on various sites that NV isn’t interested in solutions to getting their toys ported over?!?

Is there a good source online to go for that may have such things already posted so that I need not re-invent the wheel? :slight_smile: In the interim, if anyone’s interested in what I’ve done with getting the NV stuff I have running, let me know and I’ll be happy to post it.

Not sure when you last checked for updated Nerd Vittles applications for PBX in a Flash. A half dozen have been ported over in just the last week. Here are the article and forum links that discuss them. If you haven’t written Asterisk code in the past, you probably are not aware that numerous commands were deprecated between Asterisk 1.2 and Asterisk 1.4 so porting applications is not trivial. Our objective is to get everything working with PBX in a Flash. Feel free to chip in if you’re in a rush.

http://nerdvittles.com/index.php?p=197

http://nerdvittles.com/forum/forumdisplay.php?f=10 (just look for the green arrows!)

I did send an email to you but I don’t think you received it. I do have a new dialer plan for reminders which works pretty good with just one minor glitch. The scripts work fine, but as you mentioned the dialer plan needed revamping. I’d be happy to send it to you if you wish. Also thanks for the tip on the forum! Didn’t find that in my searches… will look there now before I start work and if I don’t see anything and port something over, I’ll let you know to save you some steps.

Ward;

Here’s the dialplan I’m using on asterisk 1.4 that appears to work (at least for me). Your milage may vary…

autofallthrough=no

exten => 123,1,Answer
exten => 123,2,Wait(1)
exten => 123,3,Authenticate(1)
exten => 123,4,Goto(reminder,s,1)

[reminder]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(response)=10)
exten => s,3,Playback(custom/reminder1)
exten => s,4,Wait(1)
exten => s,5,Set(TMPMSG=${CUT(UNIQUEID,.,-1)}${CUT(UNIQUEID,.,2-)})
exten => s,6,Record(custom/${TMPMSG}:gsm)
exten => s,7,Wait(1)
exten => s,8,Playback(custom/${TMPMSG})
exten => s,9,Wait(1)
exten => s,10,Background(vm-review)
exten => 1,1,Goto(reminder7,s,1)
exten => 2,1,Goto(reminder,s,8)
exten => 3,1,Goto(reminder,s,1)
exten => t,1,Goto(reminder,h,1)
exten => i,1,Playback(conf-errormenu)
exten => i,2,Goto(reminder,s,10)
exten => h,1,Hangup
exten => h,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)

[reminder2]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(response)=10)
exten => s,3,Read(APPTDT,custom/reminder2,8)
exten => s,4,AGI(checkdate.php|${APPTDT})
exten => s,5,GotoIf($[“foo${HOTDATE}” = “fooBAD”]?99,1)
exten => s,6,Playback(you-entered)
exten => s,7,GotoIf($[“foo${HOTDATE}” = “fooTODAY”]?s,10)
exten => s,8,SayUnixTime(${HOTDATE},ABdY)
exten => s,9,Goto(reminder2,s,11)
exten => s,10,Background(today)
exten => s,11,Goto(reminder3,s,1)
exten => 99,1,Playback(conf-errormenu)
exten => 99,2,Goto(reminder2,s,1)
exten => t,1,Goto(reminder1,h,1)
exten => i,1,Goto(reminder2,s,1)
exten => h,1,Playback(goodbye)
exten => h,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,3,Hangup

[reminder3]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(response)=10)
exten => s,3,Background(if-correct-press)
exten => s,4,Background(digits/1)
exten => s,5,Background(otherwise-press)
exten => s,6,Background(digits/2)
exten => s,7,Background(press-star-cancel)
exten => 1,1,Goto(reminder4,s,1)
exten => 2,1,Goto(reminder2,s,1)
exten => *,1,Playback(goodbye)
exten => *,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => *,3,Hangup
exten => t,1,Goto(reminder3,s,1)
exten => i,1,Goto(reminder3,s,1)
exten => h,1,Playback(goodbye)
exten => h,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,3,Hangup

[reminder4]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(Response)=10)
exten => s,3,Read(APPTTIME,custom/reminder3,4)
exten => s,4,GotoIf($[“foo${APPTTIME}” < “foo1200”]?reminder5,s,1)
exten => s,5,Noop(Assuming AM)
exten => s,6,AGI(checktime.php|${APPTDT}|${APPTTIME}|0|${APPTPHONE})
exten => s,7,GotoIf($[“foo${HOTTIME}” = “fooBAD”]?99,1)
exten => s,8,Playback(you-entered)
exten => s,9,SayUnixTime(${HOTTIME},ABdY)
exten => s,10,Playback(digits/at)
exten => s,11,SayUnixTime(${HOTTIME},IMP)
exten => s,12,Noop(Time set is ${HOTTIME})
exten => s,13,Goto(reminder4,s,20)
exten => s,14,AGI(checktime.php|${APPTDT}|${APPTTIME}|1200|${APPTPHONE})
exten => s,15,GotoIf($[“foo${HOTTIME}” = “fooBAD”]?99,1)
exten => s,16,Playback(you-entered)
exten => s,17,SayUnixTime(${HOTTIME},ABdY)
exten => s,18,Playback(digits/at)
exten => s,19,SayUnixTime(${HOTTIME},IMp)
exten => s,20,Goto(reminder6,s,1)
exten => 99,1,Playback(conf-errormenu)
exten => 99,2,Goto(reminder4,s,1)
exten => t,1,Goto(reminder4,s,1)
exten => i,1,Goto(reminder4,s,1)
exten => h,1,Playback(goodbye)
exten => h,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,3,Hangup

[reminder5]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(Response)=10)
exten => s,3,Background(1-for-am-2-for-pm)
exten => 1,1,Goto(reminder4,s,6)
exten => 2,1,Goto(reminder4,s,6)
exten => *,1,Playback(goodbye)
exten => *,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => *,3,Hangup
exten => t,1,Goto(reminder4,s,1)
exten => i,1,Goto(reminder5,s,1)
exten => h,1,Playback(goodbye)
exten => h,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,3,Hangup

[reminder6]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(Response)=10)
exten => s,3,Background(if-correct-press)
exten => s,4,Background(digits/1)
exten => s,5,Background(otherwise-press)
exten => s,6,Background(digits/2)
exten => s,7,Background(press-star-cancel)
exten => 1,1,Goto(reminder9,s,1)
exten => 2,1,Goto(reminder4,s,1)
exten => *,1,Playback(goodbye)
exten => *,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => *,3,Hangup
exten => t,1,Goto(reminder6,s,1)
exten => i,1,Goto(reminder6,s,1)
exten => h,1,Playback(goodbye)
exten => h,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,3,Hangup

[reminder7]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(Response)=10)
exten => s,3,Read(APPTPHONE,custom/reminder4,0)
exten => s,4,Goto(reminder8,s,1)
exten => t,1,Goto(reminder8,s,1)
exten => i,1,Goto(s,3)
exten => #,1,Goto(reminder8,s,1)
exten => h,1,Playback(goodbye)
exten => h,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,3,Hangup

[reminder8]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(Response)=10)
exten => s,3,GotoIf($[“foo${APPTPHONE}” = “foo”]?4:5)
exten => s,4,Set(APPTPHONE=${CALLERIDNUM})
exten => s,5,Playback(you-entered)
exten => s,6,SayDigits(${APPTPHONE})
exten => s,7,Background(if-correct-press)
exten => s,8,Background(digits/1)
exten => s,9,Background(otherwise-press)
exten => s,10,Background(digits/2)
exten => s,11,Background(press-star-cancel)
exten => 1,1,Goto(reminder2,s,1)
exten => 2,1,Goto(reminder7,s,1)
exten => *,1,Playback(goodbye)
exten => *,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => *,3,Hangup
exten => t,1,Goto(reminder8,s,1)
exten => i,1,Goto(reminder8,s,1)
exten => h,1,Playback(goodbye)
exten => h,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,3,Hangup

[reminder9]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(Response)=10)
exten => s,3,Read(APPTRECUR,custom/reminder6,1)
exten => s,4,Goto(reminder9a,s,1)
exten => t,1,Goto(reminder9,s,1)
exten => i,1,Goto(reminder9,s,1)
exten => #,1,Goto(reminder9a,s,1)
exten => h,1,Playback(goodbye)
exten => h,2,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,3,Hangup

[reminder9a]
exten => s,1,NoOp(APPTDT: ${APPTDT})
exten => s,2,NoOp(APPTTIME: ${APPTTIME})
exten => s,3,NoOp(APPTPHONE: ${APPTPHONE})
exten => s,4,NoOp(RECURRING: ${APPTRECUR})
exten => s,5,NoOp(APPTMSG: /var/lib/asterisk/sounds/custom/${APPTTIME}.${APPTDT}.${APPTPHONE}.gsm)
exten => s,6,Playback(your-msg-has-been-saved)
exten => s,7,Playback(goodbye)
exten => s,8,Hangup
exten => h,1,System(/bin/mv -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm /var/lib/asterisk/sounds/custom/${APPTTIME}.${APPTDT}.${APPTPHONE}.gsm)
exten => h,2,DeadAGI(reminder.php|${APPTDT}|${APPTTIME}|${APPTPHONE}|${APPTRECUR})
exten => h,3,Playback(goodbye)
exten => h,4,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,5,Hangup

[remindem]
exten => s,1,Answer
exten => s,2,Wait(2)
exten => s,3,Playback(custom/reminder5)
exten => s,4,Wait(2)
;exten => s,5,BackgroundDetect(custom/broadcast|1000|50|3000)
exten => s,5,Playback(custom/${MSG})
exten => s,6,Goto(remindem,talk,1)
exten => t,1,Goto(remindem,talk,1)
exten => i,1,Goto(remindem,talk,1)
exten => o,1,Goto(remindem,talk,1)
exten => h,1,DBget(email=EMAIL/${APPTPHONE}) ; see if number to call has an associated email address
exten => h,2,GotoIf($[“foo${email}” = “foo”]?4)
exten => h,3,system(mime-construct --to ${email} --subject “Telephone Reminder” --attachment /var/lib/asterisk/sounds/custom/${APPTTIME}.${APPTDT}.${APPTPHONE}.gsm --type audio/gsm --file ${APPTTIME}.${APPTDT}.${APPTPHONE}.gsm --multipart multipart/mixed --string “An important reminder is attached to this message.”)
exten => h,4,NoOp(Callee hung up call before menu. Dialed: ${APPTPHONE}.)
exten => h,5,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${APPTTIME}.${APPTDT}.${APPTPHONE}.gsm)
exten => h,6,Hangup
exten => talk,1,Goto(remindem2,s,1)

[remindem2]
exten => s,1,Set(TIMEOUT(digit)=7)
exten => s,2,Set(TIMEOUT(Response)=10)
exten => s,3,Background(to-hear-msg-again)
exten => s,4,Background(press-1)
exten => s,5,Background(otherwise-press)
exten => s,6,Background(digits/2)
exten => t,1,NoOp(Callee’s Answering Machine probably answered. Dialed: ${APPTPHONE}.)
exten => t,2,Background(restarting)
exten => t,3,Wait(1)
exten => t,4,Playback(custom/${MSG}) ; playing again for ans machine
exten => t,5,Background(goodbye)
exten => t,6,Hangup
exten => h,1,Noop(Call to ${APPTPHONE} complete.)
;exten => h,1,DBget(email=EMAIL/${APPTPHONE}) ; see if number to call has an associated email address
exten => h,2,GotoIf($[“foo${email}” = “foo”]?4)
exten => h,3,system(mime-construct --to ${email} --subject “Telephone Reminder” --attachment /var/lib/asterisk/sounds/custom/${APPTTIME}.${APPTDT}.${APPTPHONE}.gsm --type audio/gsm --file ${APPTTIME}.${APPTDT}.${APPTPHONE}.gsm --multipart multipart/mixed --string “An important reminder is attached to this message.”)
exten => h,4,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${APPTTIME}.${APPTDT}.${APPTPHONE}.gsm)
exten => h,5,Playback(goodbye)
exten => h,6,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm)
exten => h,7,Hangup
exten => i,1,Goto(remindem2,1,1)
exten => o,1,Goto(remindem2,1,1)
; exten => 1,1,NoOp(Callee Replayed Message. Dialed: ${APPTPHONE}.)
exten => 1,1,Playback(custom/${MSG}) ; playing again by request
exten => 1,2,Goto(remindem2,s,1)
exten => 2,1,Background(goodbye)
exten => 2,2,NoOp(Callee Acknowledged Call. Dialed: ${APPTPHONE}.)
exten => 2,3,System(/bin/rm -f /var/lib/asterisk/sounds/custom/${TMPMSG}.gsm})
exten => 2,4,Hangup

There’s a minor glitch in AM/PM detection, but nothing overly critical at the moment. If you can find it before me, more power to ya :slight_smile: