[asterisk-users] POSTing recorded audio stream

Grant Bagdasarian GB at cm.nl
Tue Jan 15 06:20:27 CST 2013


I've come up with a solution for this:

exten => rpm,1,System(curl --request POST --form file=@/var/lib/asterisk/sounds/recordings/${RecordedPersonalMessage}.wav<mailto:file=@/var/lib/asterisk/sounds/recordings/$%7bRecordedPersonalMessage%7d.wav>
http://soundfragmenthandler.company.local/soundfragmenthandler.ashx)

Not sure if it's the best way to do, but it works.

From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Grant Bagdasarian
Sent: dinsdag 15 januari 2013 12:01
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] POSTing recorded audio stream

Hello,

I quite don't understand how to send a recorded message during a call off to an HTTP handler using HTTP POST.
How do I access this file/audiostream in the dialplan?

I tried this:
exten => rpm,1,Set(RecordedPersonalMessage=${EPOCH})
exten => rpm,n,Record(/var/lib/asterisk/sounds/recordings/${RecordedPersonalMessage}:wav)
exten => rpm,n,Set(Result=${CURL(soundfragmenthandler.company.local/soundfragmenthandler.ashx,postdata_var1=/var/lib/asterisk/sounds/recordings/${RecordedPersonalMessage}.wav)})

I even tried it with the variable ${RECORDED_FILE} but that only posted the filename.

Am I accessing the file in the wrong way or is CURL not able to handle these types of things?

Regards,

Grant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130115/17086c6d/attachment.htm>


More information about the asterisk-users mailing list