Recording sound files into another directory


#1

Hey all… I’m trying to have my recorded sound files (recoded from an AGI script) from a phone call, to be saved in another location.

Does anyone know if this is easy?

Many thanks.

-Robin.

Documenting my work on bytesurgery.com


#2

i’ve seen posts regarding this on the users forum (did you do a search btw ?) and IIRC the biggest hurdle was remembering to give your asterisk user correct permissions on the intended directory.


#3

cheers. will take a look.

Thats today’s challenge to get it working!


#4

[quote=“robinb”]Hey all… I’m trying to have my recorded sound files (recoded from an AGI script) from a phone call, to be saved in another location.

Does anyone know if this is easy?

I have achieved this by writing a windows application that checks periodically on the Asterisk box for new recorded files and move them to a different location. Basically it is an FTP client. I just enbaled the FTP server that comes with Fedora 3 on the Asterisk box. Works like a charm.


#5

it is very easy.
you just must write full path to file.
example
exten => 1,1,record(/home/meral/sounds/temp${UNIQUEID}:wav)
exten => 1,2,system(‘chmod a+r /home/meral/sounds/*’)

last command for give you access to that files. that working if your asterisk waorking as root user. in other case you must give user “asterisk”(or another) acces to that directory.


#6

great thanks…worked :smile:

I should also note here for other users that it is possible to change the asterisk configuration file to set the sounds directory default.

-RGB