[Freeswitch-users] mod shell stream

Seven Du dujinfang at gmail.com
Sun Mar 4 09:12:47 MSK 2012


I think you might need a script to strip the column header ?

 psql -c "select 1" |cat 
 ?column? 
----------
        1
(1 row)




-- 
About: http://about.me/dujinfang
Blog: http://www.dujinfang.com
Proj:  http://www.freeswitch.org.cn

Sent with Sparrow (http://www.sparrowmailapp.com)


On Saturday, March 3, 2012 at 10:17 PM, Bernard Fluixa wrote:

> Hi there,
> 
> I'm trying to make a playback of streamed sound data coming from a database. I could make the example included in documentation work (cat file.wav | sox -t wav - $@ -t raw -). However, I can't make it work with same sox options after having uploaded that same file into my PGSQL database and select it instead of a cat command. 
> 
> My shell script is
> 
> #!/bin/bash
> 
> psql -h <HOST> -U postgres -E -t -q -d <DATABASE> -c "select <BINARY COLUM DATA> from <TABLE> " | sox -t wav - $@ -t raw -
> 
> Freeswitch gives me a "sox FAIL formats: can't open input  `-': WAVE: RIFF header not found" error message.
> 
> 
> Has anybody streamed data from database into Freeswitch?
> 
> Thank you.
> 
> Bernard
>     
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org (mailto:consulting at freeswitch.org)
> http://www.freeswitchsolutions.com
> 
> 
> 
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org (mailto:FreeSWITCH-users at lists.freeswitch.org)
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120304/3a950430/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list