I am currently working on a project aimed at sending a report following a voicemail by email.
At first I wanted to simply send the audio file by email, with extended informations in the body, but to my knowledge it is not possible to access information from CDR for example in the body of email.
I then try to use AEAP, to create an external conversion application in Python, to directly convert the result of a voicemail into text.
My dialplan :
[test_aeap]
exten => _[a-z].,1,Verbose(TEST AEAP)
same => n,Answer()
same => n,SpeechCreate(test-speech-to-text)
same => n,SpeechStart()
same => n,SpeechBackground(hello-world)
same => n,Verbose(0,${SPEECH_TEXT(0)})
same => n,SpeechDestroy()
same => n,Hangup()
data received by the websocket server :
‘{“request”:“setup”,“version”:“0.1.0”,“codecs”:[{“name”:“alaw”}],“params”:{},“id”:“8c980d8c-0f30-4f09-b822-5df6f1315b94”}’
The logging would make it seem as though your implementation is immediately disconnecting the websocket after sending a response.
As for your original goal, voicemail transcription afterwards is really best done outside of Asterisk. AEAP is streaming of media in realtime for an active channel. You stated some information was not available in the body of the email - so I would suggest stating what information you wanted, what difficulties you ran into there.
Thank’s, I will verify my server and add more informations after.
The initial idea was to pass the report email through our complex distribution system, so that our agents could call callers back following an unanswered incoming call.
I wanted to add information such as customer ID, for easier identification in our distribution system. However, it is not possible (or I have not found), how to create a specific mail template for each voicemail. And according to this documentation
I cannot fetch variables, such as those from the CDR, to inject them into the body of the email. I would therefore be forced to do post-processing outside of asterisk and freepbx, to recover the voicemail and format the email correctly.
I can’t speak for FreePBX, but I can say that is exactly what others are doing to accomplish this. Doing their own processing outside of Asterisk for transcription, email formatting, and sending.