Home

Resources

Products

Developers

Main • Dbwave

Dbwave

This 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:

  • ${data} - holds the collected binary data
  • ${length} - holds the length of the data in bytes

The name of the parameters holding the database account and the query depends on the relevant parameter of the message.

  • param - holds the desired attach or record (example: override)
  • param_account - holds the database account used (example: override_account)
  • param_query - holds the query to execute (example: override_query)

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.

Example

To record wave data from an external module do this:
%%>message:<id>:<time>:chan.attach::consumer=dbwave/record/arbitrary.alaw:notify=myid42:single=true:consumer_account=dbaccount:consumer_query=INSERT INTO table(len,data) VALUES('${length}','${data}')

3 May 2010:
Yate 3.0.0 alpha 3 released. Featuring the new Jabber server and wideband audio.
Download NOW

8 March 2010:
Yate 2.2 released. Mostly bug fixes. Dahdi compatible. Latest 2 release before 3.0.

6-7 February 2010:
Yate booth at FOSDEM 2010. Free CD with Freesentral available.

2 Nov 2009:
Yate 2.1 launched. Can replace a Cisco PGW2200 to control a Cisco AS54xx.

6 Aug 2008:
Yate and OpenSIPS (former OpenSER) join to build IP based clusters.

4 Aug 2008:
Yate 2 launched.

10 Jul 2008:
Yate presentation in Germany.

Feb 2008:
Yate 2.0.0 alpha 2 released. New routing module allows sending ENUM routed or forked calls to numbers of registered phones. More...

21 Jan 2008:
Yate 2 alpha released. Major changes, new ISDN, SS7 and MGCP stack. Added analogic and RBS support.

3 September:
Yate 1.3 released. Minor fixes and improvments mainly in client and SIP.

14 August:
Yate based ISDN passive recording system released by Trisys.

16 April:
Yate 1.2 released. Added Jingle and XML support, PBX improved.

25 September:
YateAdmin 1 released.

25 September:
Yate 1.1 released. Fallback routing from a database, fax support in Linux and bug fixes. Changelog and Download availables.

11 July 2006:
O'Reilly published an article about prototyping telephony applications with Yate and Python.

10 July 2006:
Yate 1 released. Includes YIAX, YSIP, YRTP and many new features.

June 1st 2006:
New Yate website launched


EditHistoryBacklinksRecent ChangesSearch