[asterisk-users] Exposing sound files through http for links

Baji Panchumarti baji.panchumarti at gmail.com
Thu Oct 11 10:08:44 CDT 2007


  On 10/11/07, Dominic Son wrote:

> Hi. I'd like for my sound files to be exposed through http.
> You know, the ones located in var/lib/asterisk/sounds.
>
> This is probably an apache thing i'd have to configure or is
> accessible through some asterisk http routing?
> 1. how one would configure this?
> 2. what are the security costs of doing this to asterisk?

 assuming you are using apache to do this, change
 the  ServerRoot  directive   in your   httpd.conf
 which can in   /etc/httpd/conf/   for a Centos install.

 alternately you can just create a link, eg if apache root
 is    /home/son/www

 create a link to sounds

   ln -s  /var/lib/asterisk/sounds  /home/son/www/sounds

 then pointing your browser to   http://localhost/sounds
 should list everything in the sounds directory.

 I don't know how much of a security risk this is. If you
 don't need to expose the entire directory for listing
 but only files on a selective basis then throw in an
 index.html into the sounds directory with "hello world"
 in it, now files can still be accessed by someone with
 a link to a specific file but no fishin around.

 -baji.

--



More information about the asterisk-users mailing list