[asterisk-users] Asterisk Manager to Record Greetings

Gordon Henderson gordon+asterisk at drogon.net
Fri Aug 10 11:19:13 CDT 2007


On Fri, 10 Aug 2007, Peder @ NetworkOblivion wrote:

> I am trying to use Asterisk Manager via php to record auto attendant
> greetings and I just can't figure out how to do it.  I've got the php
> page working and I can click to call between two phones.  However if I
> click to call just a single phone and then try to enable "monitor", when
> I pick up the ringing phone, it just hangs up and doesn't record
> anything.  I'm sure I just don't know the appropriate syntax.  Has
> anybody done something like this?  I can do the php stuff, I just need
> the Asterisk Manager syntax.
>
> I want to call a phone, when they pick up, it starts recording to a file
> and when they hang up, it closes the file.
>
> Any help would be appreciated.

I can't help but think you're making life hard for yourself.

Why not do it by dialling a code on the telephone and having the dialplan 
Record() what's being spoken rather than go to the bother of writing PHP 
to call asterisk via the monitor interface...

But I don't know the whole story of your implementation!

I record prompts like this:

; Record Intro message.

exten => 771,1,Answer()
exten => 771,2,Wait(1)
exten => 771,3,Playback(beep)
exten => 771,4,Record(/var/spool/app/introMessage:wav)
exten => 771,5,Playback(/var/spool/app/introMessage)
exten => 771,6,Hangup()

Gordon



More information about the asterisk-users mailing list