|
Home Resources Products
Developers |
Main • Dbwave
DbwaveThis module works with wavefile and a database driver to play or record wave sounds in binary database records. From a routing module you can play a wave record like this: ^1$=dbwave/play//path/to/fallback/file/audiotoplay.slin;callto_account=dbaccount;callto_query=SELECT binary_field FROM table WHERE condition To record a wave you can use this:
^1$=dvwave/record//path/to/file/audiorecorded.slin;callto_account=dbaccount;callto_query=INSERT INTO table(binary_field) VALUES('$($){data}')
In the example above the construction $($){data} is specific to regexroute. The raw string required is ${data} The matching call.execute, chan.attach and chan.record messages are modified just before being received by wavefile. For playback (parameters source, override or replace) the query is executed and the result (must be exactly 1 row, 1 column, binary) is passed to the wavefile module as a DataBlock. For recording (parameters consumer, call or peer) a memory stream is created that executes the query after all data is collected. The query can contain two variable parameters:
The name of the parameters holding the database account and the query depends on the relevant parameter of the message.
This way you can specify different accounts and queries even if you attach or record multiple data channels in the same message. For call.execute (when routing directly to the module) the relevant parameter is callto. ExampleTo record wave data from an external module do this: |
3 May 2010: 8 March 2010: 6-7 February 2010: 2 Nov 2009: 6 Aug 2008: 4 Aug 2008: 10 Jul 2008: Feb 2008: 21 Jan 2008: 3 September: 14 August: 16 April: 25 September: 25 September: 11 July 2006: 10 July 2006: June 1st 2006: |