[Asterisk-Dev] New (Fast)AGI commands proposal

ml+asterisk.dev at oxymium.net ml+asterisk.dev at oxymium.net
Thu Jun 23 15:06:59 MST 2005


Hi,

I use FastAGI and need to put/get sounds file (or xml file for TTS rendering).
I'd like to implement the 3 following commands:

o PUT SOUNDFILE <soundfilename>
<Base64 data>

It will put the data into sounds/[context]/soundfilename

Example:

PUT SOUNDFILE tmp/mysound.wav
<4952 4646 71e4 0000 4157 4556 6d66 2074
0000 0020 0000 0000 ffe0 0000 0000 0020>

will convert 4952...0020 base64 data to binary and put it in sounds/[context]/tmp/mysound.wav, creating directories if there's missing.

Why putting it in a [CurrentContext] directory ? Because it will allow multiple, may be non really trusted, applications to put/get sounds

o GET SOUNDFILE <soundfilename>

It will return base64 data for file sounds/[context]/soundfilename

Example:
GET SOUNDFILE tmp/mysound.wav

will return:
200 result=0 (<data size>)
<4952 4646 71e4 0000 4157 4556 6d66 2074
0000 0020 0000 0000 ffe0 0000 0000 0020>

o ISEXIST SOUNDFILE <soundfilename>

It will return if <soundfilename> exists

Example:
GET SOUNDFILE tmp/mysound.wav

will return:
200 result=0 if sounds/[context]/soundfilename not exists
or 200 result=1  (<file size>) if file exists

Any comment on this ?

Manuel













More information about the asterisk-dev mailing list