HEALTH-ISSUE: Reservation Bot for vaccination


(Gunther Hebein) #1

Hello,

I need your urgent help in a health-issue. I am a small pharmacy on the countryside.
At the moment we have severe problems with reservation of influenza-vaccination and further corona-vaccination (hundreds of calls for reservation, but delivery maybe in november of a small amount). I cannot handle this with paper-lists.

I need:

A call comes in on a trunk
A sound is played (“please enter the amount of vaccination you need”)
Person enters amount needed (1 to 3)
Freepbx says the amount entered
Freepbx says the phonenumber of the caller
Freepbx says “if correct, please press one to reserve”

Freepbx sends email with Timestamp/amount/Phonenumber to an emailadress.

is this possible to make with freepbx?

Regards,
Gunther


(Lorne Gaetz) #2

Possible with custom dialplan, but not with the GUI alone. It’s the type of thing we do occasionally in Sangoma Support if you have budget for this; Support link at top of page.


(Dave Burgess) #3

There are also people here that, from time to time, come up with useful crap that might be close that you can modify (have modified) if you are really on a tight budget. Search for “after call survey” in the forum and you might find a few examples that could be a quick start for you.


(Itzik) #4

I’d usually encourage people to go through Sangoma, but since this is COVID-19 related and will make the job for health professionals a little easier, I will post what I think should be a workable solution.

Step 1. The Audios

Record 4 files.
The format does not really matter, it can be MP3 WAV as long as FreePBX accepts that format to upload.

Filename1 = c19_enter_amount
What it should say = “Please enter the amount of vaccination you need followed by the pound sign”

Filename2= c19_you_entered
What it should say = “You entered:”

Filename3 = c19_if_correct
What it should say = “If this is correct, press 1 to reserve, to re-enter the amount, press 2”

Filename4 = c19_order_success
What it should say = “Thank you! Your order has been successfully recorded. Goodbye!”

Go to Administration > System Recordings and upload each of these 4 recordings.

Step 2. The dialplan.

Here you give the caller 3 attempts to confirm their order, if more than 3 time the system will hang up (remember to replace your email)

[covid-19-vaccination]
exten => s,1,Noop(Entering custom context in extensions_custom.conf to record and email vaccination orders)
exten => s,n(start),Set(attempt=$[0${attempt}+1])
exten => s,n,Read(amount,custom/c19_enter_amount,,,,5)
exten => s,n,Playback(custom/c19_you_entered)
exten => s,n,SayDigits(${amount})
exten => s,n,Read(confirm,custom/c19_if_correct,,,,5)
exten => s,n,Gotoif($["${confirm}" = "1"]?process)
exten => s,n,Gotoif($["${attempt}" < "3"]?start)
exten => s,n,Playback(sorry-youre-having-problems&goodbye)
exten => s,n,Hangup()
exten => s,n(process),Playback(wait-moment)
exten => s,n,System(echo "New order details below. \n\nPhone Number: ${CALLERID(num)} \nAmount: ${amount} \nTime: ${STRFTIME(${EPOCH},,%l:%M:%S %p %Z on %A %B %e)}" | mail -s "New vaccine order ${UNIQUEID}" email@domain.com)
;Optional, in case the email failed, you still record the order in a log file
exten => s,n,System(echo "\n\nNew order \nPhone Number: ${CALLERID(num)} \nAmount: ${amount} \nTime: ${STRFTIME(${EPOCH},,%l:%M:%S %p %Z on %A %B %e)}" >> /var/log/orders.txt)
exten => s,n,Playback(custom/c19_order_success)
exten => s,n,Hangup()

Take this dialplan and drop it into /etc/asterisk/extensions_custom.conf

Step 3.

Sending calls to the custom dialplan.
Under Administration > Custom Destinations, create a new object, set the target to covid-19-vaccination,s,1 and name it whatever you want.

Step 4.

Sending calls to the custom destination
Finally, either point an inbound route or an IVR option to the Custom Destination.

Step 5.

Reload config
Apply config and test…

Disclaimer, I did not test this… If it fails, please post a log.


(TheJames) #5

As Lorne mentioned this is custom development and I am guessing (maybe incorrectly) you are not a developer.

Your best bet (cheap) may be a dedicated voicemail box.

Otherwise your best bet may be to set a budget then seek a developer whether through sangoma support or one of the devs in the community.


(TheJames) #6

Also if within budget may I recommend Allison (the voice of all of your prompts)

https://www.theivrvoice.com/


(Lorne Gaetz) #7

Good stuff there @PitzKey. One thing I might recommend is to move the email part to a hangup handler if appropriate. That way if a caller hangs up prematurely, you still get an email with a partial content, which may be of value in some situations. Also, the Dynroute module will allow all the DTMF collection to be done via the GUI and even offers data entry validation.


#8

How is her German?


(Gunther Hebein) #9

Thank you! I’ll try immediately.


(Gunther Hebein) #10

Works like a charm. Thank you!


(Gunther Hebein) #11

English accent…
I use online text 2 speech tools instead.