Executing a script after recording a voicemail

Hello. I want to allow the user to submit a request to technical support:
He presses zero and is taken to the dialplan.

  1. The message “leave a message” is played.
  2. Voicemail is recorded.
  3. The message “thank you for your request” is played.
  4. A script is launched that takes the recorded message, recognizes it and sends everything to our SD via the API.

Will something like this work for me or am I thinking in the wrong direction?

[voicemail-recog]
exten = 1234,1,Answer()
exten = 1234,2,Playback(ready_to_record) 
exten = 1234,3,Voicemail(1234,u) 
exten = 1234,4,Playback(thank_you)
exten = 1234,5,Hangup()

; h for after-hangup
same = h,System(/var/lib/asterisk/agi-bin/SCRIPT.py ${CALLERID(num)} {CALLERID(name)})

Thank you.

yes but you may want to use the build ind funktionality in the Voicemail
look in voicemail.conf at there you can have it call a script each time there is a VM

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.