* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief AudioSocket application -- transmit and receive audio through a TCP socket
*
* \author Seán C McCord <scm@cycoresys.com>
*
* \ingroup applications
*/
/*** MODULEINFO
<depend>res_audiosocket</depend>
<support_level>extended</support_level>
***/
#include"asterisk.h"
#include"errno.h"
#include<uuid/uuid.h>
#include"asterisk/file.h"
#include"asterisk/module.h"
#include"asterisk/channel.h"
#include"asterisk/app.h"
#include"asterisk/res_audiosocket.h"
#include"asterisk/utils.h"
#include"asterisk/format_cache.h"
#define AST_MODULE "app_audiosocket"
#define AUDIOSOCKET_CONFIG "audiosocket.conf"
#define MAX_CONNECT_TIMEOUT_MSEC 2000
/*** DOCUMENTATION
<application name="AudioSocket" language="en_US">
<synopsis>
Transmit and receive audio between channel and TCP socket
</synopsis>
<syntax>
<parameter name="uuid" required="true">
<para>UUID is the universally-unique identifier of the call for the audio socket service. This ID must conform to the string form of a standard UUID.</para>
</parameter>
<parameter name="service" required="true">
<para>Service is the name or IP address and port number of the audio socket service to which this call should be connected. This should be in the form host:port, such as myserver:9019 </para>
</parameter>
</syntax>
<description>
<para>Connects to the given TCP service, then transmits channel audio over that socket. In turn, audio is received from the socket and sent to the channel. Only audio frames will be transmitted.</para>