Adding pre-recorded messages to voicemail

Hi,

I’d like to be able to add a message from an external source (in this case a short message produced with Festival) to a voicemail mailbox. Is there an obvious way to do it?

The only way I’ve found is to add the sound file and a created msg0003.txt to the voicemail spool directory from a script. Is there a better way? That doesn’t sound very safe if Asterisk tries to add a message at the same time.

If it makes a difference, I’m currently using Asterisk 1.0.7 on Debian.

Thanks,

Chris

you could make * dial itself- have a context/script that when called goes to the vmail box of (a variable) without any announcement and then hangs up. Have another context that will be doing the ‘calling’, which calls and plays your file then hangs up.

Now create a call file to dial as a local channel (LOCAL/context/exten) one side, and when it ‘answers’ put it into the other side with the appropriate variable.

Its an ugly hack but it should work…

Hi,

Thanks for the suggestion. I hadn’t spotted the LOCAL channel.

It seems to nearly work. I’ve got the following extension which will skip the
intro message and go straight to recording:

exten => record177,1,Voicemail(s177)

And I use the following call file:

Channel: LOCAL/record177@internal
CallerID: foo <1234>
MaxRetries: 0
RetryTime: 60
WaitTime: 3
Account: none
Application: Festival
Data: ‘this is a test call message. How’s it going?’

When I try this I do end up with a voicemail message, but it’s cut off after
"this is".

However, if I change it to “Application: Playback”, and “Data: /tmp/foo”, where
/tmp/foo.ulaw is the same message as a sound file, it does work fine.

Any clues as to why the direct Festival version stops too soon?

Thanks,

Chris