[asterisk-users] Asterisk Manager to Record Greetings

David Bandel david.bandel at gmail.com
Fri Aug 10 11:17:59 CDT 2007


On 8/10/07, Peder @ NetworkOblivion <peder at networkoblivion.com> 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.
>

Peder,

Don't know how to do this from php and the asterisk manager, but the
following will do what you want:

[record]
exten=_9003.,1,answer()
exten=_9003.,n,Record(${EXTEN:4}:ulaw||60|t)
exten=_9003.,n,Playback(${EXTEN:4})
exten=_9003.,n,Hangup()

just include the above context into the appropriate context for a
phone you want to record from.  Dial 90031234 (for example).  You will
hear a "beep" and can record whatever you want. "For accounting" for
example, then press the * key.  You will hear a playback.

The recording will be found in /var/lib/asterisk/sounds and called
1234 (if you dialed 90031234 and your language is en).  If you don't
like it, hit redial and do it over.  If you like it, just move the
file to another name or use a different last 4 digits.

Ciao,

David A. Bandel
-- 
Focus on the dream, not the competition.
            - Nemesis Air Racing Team motto



More information about the asterisk-users mailing list