[asterisk-users] Asterisk Manager to Record Greetings
Thomas Kenyon
digium at sanguinarius.co.uk
Tue Aug 14 05:53:33 CDT 2007
Anselm Martin Hoffmeister wrote:
>
> I did something similar using multiple records in a row.
> Something like
>
> exten => 931,1,Answer()
> exten => 931,2,Wait(2)
> exten => 931,3,Set(E=1000)
> exten => 931,4,Playback(beep)
> exten => 931,5,Set(E=$[${E} + 1])
> exten => 931,6,Record(/tmp/asterisk-recording-${E:1})
> exten => 931,7,Playback(/tmp/asterisk-recording-${E:1})
> exten => 931,8,Wait(2)
> exten => 931,9,Goto(4)
>
> This will loop: beep, record until "#" pressed, replay, wait, beep...
> The files will be written with ascending numbers starting "001". Move
> them to another place before doing the next recording session.
>
Couldn't you use %d instead of settup up variable E?
ie.
exten => 931,1,Answer()
exten => 931,2,Wait(2)
exten => 931,3,Playback(beep)
exten => 931,4,Record(/tmp/asterisk-recording-%d.wav)
exten => 931,5,Playback(${RECORDED_FILE})
exten => 931,6,Goto(2)
More information about the asterisk-users
mailing list