Voice Mail to external Systems(Odoo)

How can I send voicemail to external Systems with caller Id.My requirement is sent the recorded voicemail to Odoo System.Is it possible to get the voice mail in an AGI Script?

Thanks in Advance!

You can set the mailcmd poperty to use another program or script(bash, php, python etc).

Thanks @navaismo , Is there any asterisk variables to get the relevant voicemail in the script?

Yes: take a look here http://www.voip-info.org/wiki/view/Asterisk+config+voicemail.conf In the last section of variables.


Great, Thank you guys,

I am trying to execute a python script using mailcmd.Unfortunately my python script is not triggering.

From the script i am writing some text to a file(just for testing). Here is my mailcmd


Please suggest

Enable the full log and check it for a line like this:

[Oct 14 12:26:52] DEBUG[6164][C-00000007] app_voicemail.c: Sent mail to johnkiniston@gmail.com with command ‘/usr/local/bin/mailhandler’

The address and command will be different for you obviously

It should show you the PBX evaluating the variables for voicemail as well.

Sorry for the Late Reply.I check the Log Files and found the below lines for voicemail.Please advise

2016-11-28 08:34:02] WARNING[2759] app_voicemail.c: maxsilence should be less than minsecs or you may get empty messages
[2016-11-28 11:09:14] VERBOSE[11670][C-0000000b] app_voicemail.c: Recording the message

That warning means what it says, Your maxsilence setting in voicemail.conf is a larger value than minsecs in voicemail.conf

ya thanks @johnkiniston.It’s working now.But I stucked in a point, I can’t understand how to access the variables from the script.I tried to pass the variables in the mailcmd but still so no hope.I know that we can pass parameters in AGI script.will the same apply here in mailcmd?.The actual scope is to pass the voice mail to an external system by consuming a web service.I am confused.Please suggest.

Thanks in Advance

You could have your mailcmd app parse the subject or body that asterisk sends, those are set in the emailsubject and emailbody settings of voicemail.conf

@johnkiniston Thanks for your guidance!. Successfully Integrated voicemails to external Systems.

1 Like