mirror of https://github.com/asterisk/asterisk
Billing records are fair, To get paid is quite bright, You should really use ODBC; Good-bye cdr_sqlite. Microsoft did once push H.323, Hell, we all remember NetMeeting. But try to compile chan_h323 now And you will take quite a beating. The XMPP and SIP war was fierce, And in the distant fray Was birthed res_jabber/chan_jingle; But neither to stay. For everyone did care and chase what Google professed. "Free Internet Calling" was what devotees cried, But Google did change the specs so often That the developers were happy the day chan_gtalk died. And then there was that odd application Dedicated to the Polish tongue. app_saycountpl was subsumed by Say; One could say its bell was rung. To read and parse a file from the dialplan You could (I guess) use an application. app_readfile did fill that purpose, but I think A function is perhaps better in its creation. Barging is rude, I'm not sure why we do it. Inwardly, the caller will probably sigh. But if you really must do it, Don't use app_dahdibarge, use ChanSpy. We all despise the sound of tinny robots It makes our queues so cold. To control such an abomination It's better to not use Wait/SetMusicOnHold. It's often nice to know properties of a channel It makes our calls right We have a nice function called CHANNEL And so SIPCHANINFO is sent off into the night. And now things get odd; Apparently one could delimit with a colon Properties from the SIPPEER function! Commas are in; all others are done. Finally, a word on pipes and commas. We're sorry. We can't say it enough. But those compatibility options in asterisk.conf; To maintain them forever was just too tough. This patch removes: * cdr_sqlite * chan_gtalk * chan_jingle * chan_h323 * res_jabber * app_saycountpl * app_readfile * app_dahdibarge It removes the following applications/functions: * WaitMusicOnHold * SetMusicOnHold * SIPCHANINFO It removes the colon delimiter from the SIPPEER function. Finally, it also removes all compatibility options that were configurable from asterisk.conf, as these all applied to compatibility with Asterisk 1.4 systems. Review: https://reviewboard.asterisk.org/r/3698/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418019 65c4cc65-6c06-0410-ace0-fbb531ad65f3changes/97/197/1
parent
3bd495a688
commit
97834718c2
@ -1,138 +0,0 @@
|
||||
/*
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*
|
||||
* Copyright (C) 2004, Andy Powell & TAAN Softworks Corp.
|
||||
*
|
||||
* 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 Say Polish counting words
|
||||
* \author Andy Powell
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
<defaultenabled>no</defaultenabled>
|
||||
<support_level>deprecated</support_level>
|
||||
<replacement>say.conf</replacement>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
||||
#include "asterisk/file.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/channel.h"
|
||||
#include "asterisk/pbx.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/app.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="SayCountPL" language="en_US">
|
||||
<synopsis>
|
||||
Say Polish counting words.
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="word1" required="true" />
|
||||
<parameter name="word2" required="true" />
|
||||
<parameter name="word5" required="true" />
|
||||
<parameter name="number" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Polish grammar has some funny rules for counting words. for example 1 zloty,
|
||||
2 zlote, 5 zlotych. This application will take the words for 1, 2-4 and 5 and
|
||||
decide based on grammar rules which one to use with the number you pass to it.</para>
|
||||
<para>Example: SayCountPL(zloty,zlote,zlotych,122) will give: zlote</para>
|
||||
</description>
|
||||
</application>
|
||||
|
||||
***/
|
||||
static const char app[] = "SayCountPL";
|
||||
|
||||
static int saywords(struct ast_channel *chan, char *word1, char *word2, char *word5, int num)
|
||||
{
|
||||
/* Put this in a separate proc because it's bound to change */
|
||||
int d = 0;
|
||||
|
||||
if (num > 0) {
|
||||
if (num % 1000 == 1) {
|
||||
ast_streamfile(chan, word1, ast_channel_language(chan));
|
||||
d = ast_waitstream(chan,"");
|
||||
} else if (((num % 10) >= 2) && ((num % 10) <= 4 ) && ((num % 100) < 10 || (num % 100) > 20)) {
|
||||
ast_streamfile(chan, word2, ast_channel_language(chan));
|
||||
d = ast_waitstream(chan, "");
|
||||
} else {
|
||||
ast_streamfile(chan, word5, ast_channel_language(chan));
|
||||
d = ast_waitstream(chan, "");
|
||||
}
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
static int sayword_exec(struct ast_channel *chan, const char *data)
|
||||
{
|
||||
int res = 0;
|
||||
char *s;
|
||||
int inum;
|
||||
AST_DECLARE_APP_ARGS(args,
|
||||
AST_APP_ARG(word1);
|
||||
AST_APP_ARG(word2);
|
||||
AST_APP_ARG(word5);
|
||||
AST_APP_ARG(num);
|
||||
);
|
||||
|
||||
if (!data) {
|
||||
ast_log(LOG_WARNING, "SayCountPL requires 4 arguments: word-1,word-2,word-5,number\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
s = ast_strdupa(data);
|
||||
|
||||
AST_STANDARD_APP_ARGS(args, s);
|
||||
|
||||
/* Check to see if params passed */
|
||||
if (!args.word1 || !args.word2 || !args.word5 || !args.num) {
|
||||
ast_log(LOG_WARNING, "SayCountPL requires 4 arguments: word-1,word-2,word-3,number\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sscanf(args.num, "%30d", &inum) != 1) {
|
||||
ast_log(LOG_WARNING, "'%s' is not a valid number\n", args.num);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* do the saying part (after a bit of maths) */
|
||||
|
||||
res = saywords(chan, args.word1, args.word2, args.word5, inum);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int unload_module(void)
|
||||
{
|
||||
return ast_unregister_application(app);
|
||||
}
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_register_application_xml(app, sayword_exec);
|
||||
|
||||
return res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Say polish counting words");
|
@ -1,311 +0,0 @@
|
||||
/*
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*
|
||||
* Copyright (C) 1999 - 2005, Digium, Inc.
|
||||
*
|
||||
* Mark Spencer <markster@digium.com>
|
||||
*
|
||||
* Special thanks to comphealth.com for sponsoring this
|
||||
* GPL application.
|
||||
*
|
||||
* 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 DAHDI Barge support
|
||||
*
|
||||
* \author Mark Spencer <markster@digium.com>
|
||||
*
|
||||
* \note Special thanks to comphealth.com for sponsoring this
|
||||
* GPL application.
|
||||
*
|
||||
* \ingroup applications
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
<depend>dahdi</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
<support_level>deprecated</support_level>
|
||||
<replacement>app_chanspy</replacement>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
||||
#include <dahdi/user.h>
|
||||
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/file.h"
|
||||
#include "asterisk/channel.h"
|
||||
#include "asterisk/pbx.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/config.h"
|
||||
#include "asterisk/app.h"
|
||||
#include "asterisk/cli.h"
|
||||
#include "asterisk/say.h"
|
||||
#include "asterisk/utils.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="DAHDIBarge" language="en_US">
|
||||
<synopsis>
|
||||
Barge in (monitor) DAHDI channel.
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="channel">
|
||||
<para>Channel to barge.</para>
|
||||
</parameter>
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Barges in on a specified DAHDI <replaceable>channel</replaceable> or prompts
|
||||
if one is not specified. Returns <literal>-1</literal> when caller user hangs
|
||||
up and is independent of the state of the channel being monitored.
|
||||
</para>
|
||||
</description>
|
||||
</application>
|
||||
***/
|
||||
static const char app[] = "DAHDIBarge";
|
||||
|
||||
#define CONF_SIZE 160
|
||||
|
||||
static int careful_write(int fd, unsigned char *data, int len)
|
||||
{
|
||||
int res;
|
||||
while(len) {
|
||||
res = write(fd, data, len);
|
||||
if (res < 1) {
|
||||
if (errno != EAGAIN) {
|
||||
ast_log(LOG_WARNING, "Failed to write audio data to conference: %s\n", strerror(errno));
|
||||
return -1;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
len -= res;
|
||||
data += res;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
||||
{
|
||||
int fd;
|
||||
struct dahdi_confinfo dahdic;
|
||||
struct ast_frame *f;
|
||||
struct ast_channel *c;
|
||||
struct ast_frame fr;
|
||||
int outfd;
|
||||
int ms;
|
||||
int nfds;
|
||||
int res;
|
||||
int flags;
|
||||
int retrydahdi;
|
||||
int origfd;
|
||||
int ret = -1;
|
||||
|
||||
struct dahdi_bufferinfo bi;
|
||||
char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
|
||||
char *buf = __buf + AST_FRIENDLY_OFFSET;
|
||||
|
||||
/* Set it into U-law mode (write) */
|
||||
if (ast_set_write_format_by_id(chan, AST_FORMAT_ULAW) < 0) {
|
||||
ast_log(LOG_WARNING, "Unable to set '%s' to write ulaw mode\n", ast_channel_name(chan));
|
||||
goto outrun;
|
||||
}
|
||||
|
||||
/* Set it into U-law mode (read) */
|
||||
if (ast_set_read_format_by_id(chan, AST_FORMAT_ULAW) < 0) {
|
||||
ast_log(LOG_WARNING, "Unable to set '%s' to read ulaw mode\n", ast_channel_name(chan));
|
||||
goto outrun;
|
||||
}
|
||||
ast_indicate(chan, -1);
|
||||
retrydahdi = strcasecmp(ast_channel_tech(chan)->type, "DAHDI");
|
||||
dahdiretry:
|
||||
origfd = ast_channel_fd(chan, 0);
|
||||
if (retrydahdi) {
|
||||
fd = open("/dev/dahdi/pseudo", O_RDWR);
|
||||
if (fd < 0) {
|
||||
ast_log(LOG_WARNING, "Unable to open pseudo channel: %s\n", strerror(errno));
|
||||
goto outrun;
|
||||
}
|
||||
/* Make non-blocking */
|
||||
flags = fcntl(fd, F_GETFL);
|
||||
if (flags < 0) {
|
||||
ast_log(LOG_WARNING, "Unable to get flags: %s\n", strerror(errno));
|
||||
close(fd);
|
||||
goto outrun;
|
||||
}
|
||||
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK)) {
|
||||
ast_log(LOG_WARNING, "Unable to set flags: %s\n", strerror(errno));
|
||||
close(fd);
|
||||
goto outrun;
|
||||
}
|
||||
/* Setup buffering information */
|
||||
memset(&bi, 0, sizeof(bi));
|
||||
bi.bufsize = CONF_SIZE;
|
||||
bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
|
||||
bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
|
||||
bi.numbufs = 4;
|
||||
if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) {
|
||||
ast_log(LOG_WARNING, "Unable to set buffering information: %s\n", strerror(errno));
|
||||
close(fd);
|
||||
goto outrun;
|
||||
}
|
||||
nfds = 1;
|
||||
} else {
|
||||
/* XXX Make sure we're not running on a pseudo channel XXX */
|
||||
fd = ast_channel_fd(chan, 0);
|
||||
nfds = 0;
|
||||
}
|
||||
memset(&dahdic, 0, sizeof(dahdic));
|
||||
/* Check to see if we're in a conference... */
|
||||
dahdic.chan = 0;
|
||||
if (ioctl(fd, DAHDI_GETCONF, &dahdic)) {
|
||||
ast_log(LOG_WARNING, "Error getting conference\n");
|
||||
close(fd);
|
||||
goto outrun;
|
||||
}
|
||||
if (dahdic.confmode) {
|
||||
/* Whoa, already in a conference... Retry... */
|
||||
if (!retrydahdi) {
|
||||
ast_debug(1, "DAHDI channel is in a conference already, retrying with pseudo\n");
|
||||
retrydahdi = 1;
|
||||
goto dahdiretry;
|
||||
}
|
||||
}
|
||||
memset(&dahdic, 0, sizeof(dahdic));
|
||||
/* Add us to the conference */
|
||||
dahdic.chan = 0;
|
||||
dahdic.confno = confno;
|
||||
dahdic.confmode = DAHDI_CONF_MONITORBOTH;
|
||||
|
||||
if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
|
||||
ast_log(LOG_WARNING, "Error setting conference\n");
|
||||
close(fd);
|
||||
goto outrun;
|
||||
}
|
||||
ast_debug(1, "Placed channel %s in DAHDI channel %d monitor\n", ast_channel_name(chan), confno);
|
||||
|
||||
for(;;) {
|
||||
outfd = -1;
|
||||
ms = -1;
|
||||
c = ast_waitfor_nandfds(&chan, 1, &fd, nfds, NULL, &outfd, &ms);
|
||||
if (c) {
|
||||
if (ast_channel_fd(c, 0) != origfd) {
|
||||
if (retrydahdi) {
|
||||
/* Kill old pseudo */
|
||||
close(fd);
|
||||
}
|
||||
ast_debug(1, "Ooh, something swapped out under us, starting over\n");
|
||||
retrydahdi = 0;
|
||||
goto dahdiretry;
|
||||
}
|
||||
f = ast_read(c);
|
||||
if (!f)
|
||||
break;
|
||||
if ((f->frametype == AST_FRAME_DTMF) && (f->subclass.integer == '#')) {
|
||||
ret = 0;
|
||||
ast_frfree(f);
|
||||
break;
|
||||
} else if (fd != ast_channel_fd(chan, 0)) {
|
||||
if (f->frametype == AST_FRAME_VOICE) {
|
||||
if (f->subclass.format.id == AST_FORMAT_ULAW) {
|
||||
/* Carefully write */
|
||||
careful_write(fd, f->data.ptr, f->datalen);
|
||||
} else
|
||||
ast_log(LOG_WARNING, "Huh? Got a non-ulaw (%s) frame in the conference\n", ast_getformatname(&f->subclass.format));
|
||||
}
|
||||
}
|
||||
ast_frfree(f);
|
||||
} else if (outfd > -1) {
|
||||
res = read(outfd, buf, CONF_SIZE);
|
||||
if (res > 0) {
|
||||
memset(&fr, 0, sizeof(fr));
|
||||
fr.frametype = AST_FRAME_VOICE;
|
||||
ast_format_set(&fr.subclass.format, AST_FORMAT_ULAW, 0);
|
||||
fr.datalen = res;
|
||||
fr.samples = res;
|
||||
fr.data.ptr = buf;
|
||||
fr.offset = AST_FRIENDLY_OFFSET;
|
||||
if (ast_write(chan, &fr) < 0) {
|
||||
ast_log(LOG_WARNING, "Unable to write frame to channel: %s\n", strerror(errno));
|
||||
/* break; */
|
||||
}
|
||||
} else
|
||||
ast_log(LOG_WARNING, "Failed to read frame: %s\n", strerror(errno));
|
||||
}
|
||||
}
|
||||
if (fd != ast_channel_fd(chan, 0))
|
||||
close(fd);
|
||||
else {
|
||||
/* Take out of conference */
|
||||
/* Add us to the conference */
|
||||
dahdic.chan = 0;
|
||||
dahdic.confno = 0;
|
||||
dahdic.confmode = 0;
|
||||
if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
|
||||
ast_log(LOG_WARNING, "Error setting conference\n");
|
||||
}
|
||||
}
|
||||
|
||||
outrun:
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int conf_exec(struct ast_channel *chan, const char *data)
|
||||
{
|
||||
int res = -1;
|
||||
int retrycnt = 0;
|
||||
int confflags = 0;
|
||||
int confno = 0;
|
||||
char confnostr[80] = "";
|
||||
|
||||
if (!ast_strlen_zero(data)) {
|
||||
if ((sscanf(data, "DAHDI/%30d", &confno) != 1) &&
|
||||
(sscanf(data, "%30d", &confno) != 1)) {
|
||||
ast_log(LOG_WARNING, "DAHDIBarge Argument (if specified) must be a channel number, not '%s'\n", (char *)data);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (ast_channel_state(chan) != AST_STATE_UP)
|
||||
ast_answer(chan);
|
||||
|
||||
while(!confno && (++retrycnt < 4)) {
|
||||
/* Prompt user for conference number */
|
||||
confnostr[0] = '\0';
|
||||
res = ast_app_getdata(chan, "conf-getchannel",confnostr, sizeof(confnostr) - 1, 0);
|
||||
if (res <0) goto out;
|
||||
if (sscanf(confnostr, "%30d", &confno) != 1)
|
||||
confno = 0;
|
||||
}
|
||||
if (confno) {
|
||||
/* XXX Should prompt user for pin if pin is required XXX */
|
||||
/* Run the conference */
|
||||
res = conf_run(chan, confno, confflags);
|
||||
}
|
||||
out:
|
||||
/* Do the conference */
|
||||
return res;
|
||||
}
|
||||
|
||||
static int unload_module(void)
|
||||
{
|
||||
return ast_unregister_application(app);
|
||||
}
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
return ((ast_register_application_xml(app, conf_exec)) ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Barge in on DAHDI channel application");
|
@ -1,134 +0,0 @@
|
||||
/*
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*
|
||||
* Copyright (C) 1999 - 2005, Digium, Inc.
|
||||
*
|
||||
* Matt O'Gorman <mogorman@digium.com>
|
||||
*
|
||||
* 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 ReadFile application -- Reads in a File for you.
|
||||
*
|
||||
* \author Matt O'Gorman <mogorman@digium.com>
|
||||
*
|
||||
* \ingroup applications
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
<defaultenabled>no</defaultenabled>
|
||||
<support_level>deprecated</support_level>
|
||||
<replacement>func_env (FILE())</replacement>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
||||
#include "asterisk/file.h"
|
||||
#include "asterisk/channel.h"
|
||||
#include "asterisk/pbx.h"
|
||||
#include "asterisk/app.h"
|
||||
#include "asterisk/module.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="ReadFile" language="en_US">
|
||||
<synopsis>
|
||||
Read the contents of a text file into a channel variable.
|
||||
</synopsis>
|
||||
<syntax argsep="=">
|
||||
<parameter name="varname" required="true">
|
||||
<para>Result stored here.</para>
|
||||
</parameter>
|
||||
<parameter name="fileparams" required="true">
|
||||
<argument name="file" required="true">
|
||||
<para>The name of the file to read.</para>
|
||||
</argument>
|
||||
<argument name="length" required="false">
|
||||
<para>Maximum number of characters to capture.</para>
|
||||
<para>If not specified defaults to max.</para>
|
||||
</argument>
|
||||
</parameter>
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Read the contents of a text file into channel variable <replaceable>varname</replaceable></para>
|
||||
<warning><para>ReadFile has been deprecated in favor of Set(varname=${FILE(file,0,length)})</para></warning>
|
||||
</description>
|
||||
<see-also>
|
||||
<ref type="application">System</ref>
|
||||
<ref type="application">Read</ref>
|
||||
</see-also>
|
||||
</application>
|
||||
***/
|
||||
|
||||
static char *app_readfile = "ReadFile";
|
||||
|
||||
static int readfile_exec(struct ast_channel *chan, const char *data)
|
||||
{
|
||||
int res=0;
|
||||
char *s, *varname=NULL, *file=NULL, *length=NULL, *returnvar=NULL;
|
||||
int len=0;
|
||||
static int deprecation_warning = 0;
|
||||
|
||||
if (ast_strlen_zero(data)) {
|
||||
ast_log(LOG_WARNING, "ReadFile require an argument!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
s = ast_strdupa(data);
|
||||
|
||||
varname = strsep(&s, "=");
|
||||
file = strsep(&s, ",");
|
||||
length = s;
|
||||
|
||||
if (deprecation_warning++ % 10 == 0)
|
||||
ast_log(LOG_WARNING, "ReadFile has been deprecated in favor of Set(%s=${FILE(%s,0,%s)})\n", varname, file, length);
|
||||
|
||||
if (!varname || !file) {
|
||||
ast_log(LOG_ERROR, "No file or variable specified!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (length) {
|
||||
if ((sscanf(length, "%30d", &len) != 1) || (len < 0)) {
|
||||
ast_log(LOG_WARNING, "%s is not a positive number, defaulting length to max\n", length);
|
||||
len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ((returnvar = ast_read_textfile(file))) {
|
||||
if (len > 0) {
|
||||
if (len < strlen(returnvar))
|
||||
returnvar[len]='\0';
|
||||
else
|
||||
ast_log(LOG_WARNING, "%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
|
||||
}
|
||||
pbx_builtin_setvar_helper(chan, varname, returnvar);
|
||||
ast_free(returnvar);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static int unload_module(void)
|
||||
{
|
||||
return ast_unregister_application(app_readfile);
|
||||
}
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
return ast_register_application_xml(app_readfile, readfile_exec);
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Stores output of file into a variable");
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,43 +0,0 @@
|
||||
Build
|
||||
-- Hold lock when creating new H.323 channel to sync the audio channels
|
||||
-- Decrement usage counter when appropriate
|
||||
-- Actually unregister everything in unload_module
|
||||
-- Add IP based authentication using 'host'in type=user's
|
||||
0.1.0
|
||||
-- Intergration into the mainline Asterisk codebase
|
||||
-- Remove reduandant debug info
|
||||
-- Add Caller*id support
|
||||
-- Inband DTMF
|
||||
-- Retool port usage (to avoid possible seg fault condition)
|
||||
0.0.6
|
||||
-- Configurable support for user-input (DTMF)
|
||||
-- Reworked Gatekeeper support
|
||||
-- Native bridging (but is still broken, help!)
|
||||
-- Locally implement a non-broken G.723.1 Capability
|
||||
-- Utilize the cleaner RTP method implemented by Mark
|
||||
-- AllowGkRouted, thanks to Panny from http://hotlinks.co.uk
|
||||
-- Clened up inbound call flow
|
||||
-- Prefix, E.164 and Gateway support
|
||||
-- Multi-homed support
|
||||
-- Killed more seg's
|
||||
0.0.5
|
||||
-- Added H.323 Alias support
|
||||
-- Clened up inbound call flow
|
||||
-- Fixed RTP port logic
|
||||
-- Stomped on possible seg fault conditions thanks to Iain Stevenson
|
||||
0.0.4
|
||||
-- Fixed one-way audio on inbound calls. Found
|
||||
race condition in monitor thread.
|
||||
|
||||
0.0.3
|
||||
-- Changed name to chan_h323
|
||||
-- Also renamed file names to futher avoid confusion
|
||||
|
||||
0.0.2
|
||||
-- First public offering
|
||||
-- removed most hardcoded values
|
||||
-- lots of changes to alias/exension operation
|
||||
|
||||
0.0.1
|
||||
-- initial build, lots of hardcoded crap
|
||||
-- Proof of concept for External RTP
|
@ -1,18 +0,0 @@
|
||||
To build Open H.323 see:
|
||||
|
||||
http://www.openh323.org/build.html#unix
|
||||
|
||||
You only need to do 'make opt'. Anything else you will be simply waisting time and HD space.
|
||||
Also, you will notice they never tell you to 'make install' so don't do it.
|
||||
|
||||
|
||||
On FreeBSD, the Makefiles are configured to
|
||||
locate the compiled openh323 port, if it has
|
||||
been built. Here is one way to build
|
||||
openh323 and ptlib on such that the Makefiles
|
||||
find it:
|
||||
# cd /usr/ports/net/openh323
|
||||
# make
|
||||
It is not necessary to install the port. The
|
||||
asterisk makefiles do not use any files
|
||||
installed by the port.
|
@ -1,53 +0,0 @@
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# Make file for OpenH323 support layer
|
||||
#
|
||||
|
||||
.PHONY: Makefile.ast clean
|
||||
|
||||
default:: @OPENH323_BUILD@
|
||||
|
||||
# Verify those options with main Makefile
|
||||
STDCCFLAGS = -DNDEBUG
|
||||
STDCCFLAGS += -I../../include -include ../../include/asterisk/autoconfig.h
|
||||
STDCCFLAGS += -fPIC
|
||||
#OPTCCFLAGS +=
|
||||
CFLAGS = -pipe
|
||||
TARGET = libchanh323.a
|
||||
TARGET += Makefile.ast
|
||||
SOURCES = ast_h323.cxx compat_h323.cxx cisco-h225.cxx caps_h323.cxx
|
||||
OBJDIR = .
|
||||
OBJS =
|
||||
|
||||
ifndef OPENH323DIR
|
||||
OPENH323DIR=@OPENH323DIR@
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(OPENH323DIR)/openh323u.mak),)
|
||||
include $(OPENH323DIR)/openh323u.mak
|
||||
endif
|
||||
|
||||
notrace::
|
||||
$(MAKE) NOTRACE=1 opt
|
||||
|
||||
$(SOURCES):: Makefile ../../Makefile
|
||||
touch $@
|
||||
|
||||
libchanh323.a: $(OBJS)
|
||||
ar crv $@ $(OBJS)
|
||||
|
||||
#
|
||||
# We have this file in svn, so this is commented out to ensure it doesn't try
|
||||
# to run implicitly. However, it's still here for reference.
|
||||
#
|
||||
#cisco-h225.cxx:: cisco-h225.asn
|
||||
# asnparser -m CISCO_H225 -c $<
|
||||
|
||||
Makefile.ast:
|
||||
@echo H323CFLAGS = $(STDCCFLAGS) $(OPTCCFLAGS) $(CFLAGS) >$@.tmp
|
||||
@echo H323LDFLAGS = $(CFLAGS) $(LDFLAGS) >>$@.tmp
|
||||
@echo H323LDLIBS = $(LDLIBS) $(ENDLDLIBS) $(ENDLDFLAGS) >>$@.tmp
|
||||
@if [ -r $@ ] && cmp -s $@ $@.tmp; then rm -f $@.tmp; else mv -f $@.tmp $@; fi
|
||||
|
||||
clean::
|
@ -1,144 +0,0 @@
|
||||
Open H.323 Channel Driver for Asterisk
|
||||
By Jeremy McNamara
|
||||
For The NuFone Network
|
||||
|
||||
First public release on November 10th, 2002
|
||||
|
||||
Dependancies (based on OpenH323/PWLib ones):
|
||||
openssl-0.9.6b+
|
||||
openssl-devel-0.9.6b+
|
||||
expat-1.95+
|
||||
expat-dev-1.95+
|
||||
|
||||
Tested with Open H.323 version v1.18.0, PWLib v1.10.0 and GCC v3.2.2. Usage of any
|
||||
other (especially prior OpenH323 v1.17.3 and PWLib v1.9.2) versions is not
|
||||
supported.
|
||||
|
||||
NOTICE: Whatever you do, DO NOT USE distrubution specific installs
|
||||
of Open H.323 and PWLib. In fact, you should check to make sure
|
||||
your distro did not install them for you without your knowledge.
|
||||
|
||||
|
||||
To compile this code
|
||||
--------------------
|
||||
Once PWLib and Open H.323 have been compiled per their specific build
|
||||
instructions, issue a make in the asterisk/channels/h323 directory with
|
||||
argument used to build PWLib and OpenH323 (for example, make opt), then go
|
||||
back to the Asterisk source top level directory and issue a make install.
|
||||
|
||||
|
||||
The most common compile error
|
||||
----------------------------
|
||||
If you receive ANYTHING that says 'undefined symbol' you are experiencing
|
||||
typical version skew. For example:
|
||||
|
||||
libh323_linux_x86_r.so.1: undefined symbol: GetNumberValueAt__C14PAbstractArrayi
|
||||
|
||||
You need to search and destroy every version of libh323 and libpt then
|
||||
completely recompile everything
|
||||
|
||||
Example commands to make sure everything gets cleaned and then
|
||||
rebult in proper order:
|
||||
|
||||
cd /path/to/pwlib
|
||||
./configure
|
||||
make clean opt
|
||||
cd /path/to/openh323
|
||||
./configure
|
||||
make clean opt
|
||||
cd /path/to/asterisk/channels/h323
|
||||
make opt
|
||||
cd /path/to/asterisk
|
||||
make install
|
||||
|
||||
|
||||
Most common run-time error
|
||||
-------------------------
|
||||
libpt_linux_x86_r.so.1: cannot open shared object file: No such
|
||||
file or directory
|
||||
|
||||
You have not set the LD_LIBRARY_PATH environment variable.
|
||||
|
||||
Example environment for sh/bash:
|
||||
|
||||
PWLIBDIR=$HOME/pwlib
|
||||
export PWLIBDIR
|
||||
OPENH323DIR=$HOME/openh323
|
||||
export OPENH323DIR
|
||||
LD_LIBRARY_PATH=$PWLIBDIR/lib:$OPENH323DIR/lib
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
We recomend puting the above directives into your /etc/profile so
|
||||
you do not have to remember to export those values every time you
|
||||
want to recompile. Make sure to logout and log back in, so your
|
||||
envrionment can pick up the new variables.
|
||||
|
||||
|
||||
Upgrading Asterisk
|
||||
-----------------
|
||||
After you svn update (or make update) Asterisk you have to go into
|
||||
asterisk/channels/h323 and issue a make clean all, before compiling the
|
||||
rest of asterisk. Doing this process every time you upgrade Asterisk
|
||||
will ensure a sane build.
|
||||
|
||||
|
||||
Dialing an H.323 channel
|
||||
------------------------
|
||||
Without a gatekeeper:
|
||||
exten => _1NXXNXXXXXX,1,Dial,H323/${EXTEN}@peer
|
||||
or
|
||||
exten => _1NXXNXXXXXX,1,Dial,H323/${EXTEN}@ip.or.hostname
|
||||
|
||||
'peer' is defined in h323.conf as:
|
||||
|
||||
[peer]
|
||||
type=peer
|
||||
host=1.2.3.4
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
|
||||
Using a gatekeeper:
|
||||
exten => _1NXXNXXXXXX,1,Dial,H323/${EXTEN}
|
||||
|
||||
When using a gatekeeper you cannot utilize the type=peer features,
|
||||
since the H.323 spec states that when a Gatekeeper is part of an H.323 network,
|
||||
the Gatekeeper shall be used for all communication.
|
||||
|
||||
|
||||
Developer Contact
|
||||
----------------
|
||||
If you have trouble contact 'JerJer' in #Asterisk on
|
||||
irc.freenode.net and/or send reasonable debug information to support@nufone.net.
|
||||
|
||||
If are lucky enough to segfault this code please run a
|
||||
backtrace and send the gory details. Segmentation faults are not
|
||||
tolerated, no matter what Distro you run (even debian)!
|
||||
|
||||
a simple bt example:
|
||||
|
||||
# /usr/sbin/asterisk -vvvgc
|
||||
...
|
||||
[chan_h323.so]
|
||||
Segmentation Fault (core dumped)
|
||||
|
||||
# ls core.*
|
||||
core.1976
|
||||
|
||||
# gdb /usr/sbin/asterisk core.1976
|
||||
...lots of useless garbage here...
|
||||
(gdb) bt
|
||||
|
||||
Send whatever shows up right after the 'bt'
|
||||
|
||||
Also, a full debug screen output is almost needed. Make sure you are
|
||||
in the full console mode (-c) and turn on 'h.323 debug' or worst case
|
||||
senerio 'h.323 trace 4'. A nice way to capture debug info is with
|
||||
script (man script).
|
||||
|
||||
If you are motivated to update/fix this code please submit a
|
||||
disclaimer along with the patch to the Asterisk bug
|
||||
tracker: https://issues.asterisk.org/
|
||||
|
||||
|
||||
Jeremy McNamara
|
||||
The NuFone Network
|
@ -1,9 +0,0 @@
|
||||
The NuFone Network's Open H.323 Channel Driver for Asterisk
|
||||
|
||||
TODO:
|
||||
|
||||
- H.323 Native Bridging
|
||||
|
||||
- Gatekeeping support (started)
|
||||
|
||||
- Acutally implement the options for broken H.323 stacks
|
File diff suppressed because it is too large
Load Diff
@ -1,187 +0,0 @@
|
||||
/*
|
||||
* ast_h323.h
|
||||
*
|
||||
* OpenH323 Channel Driver for ASTERISK PBX.
|
||||
* By Jeremy McNamara
|
||||
* For The NuFone Network
|
||||
*
|
||||
* This code has been derived from code created by
|
||||
* Michael Manousos and Mark Spencer
|
||||
*
|
||||
* This file is part of the chan_h323 driver for Asterisk
|
||||
*
|
||||
* chan_h323 is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* chan_h323 is distributed WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Version Info: $Id$
|
||||
*/
|
||||
|
||||
#ifndef AST_H323_H
|
||||
#define AST_H323_H
|
||||
|
||||
#include "ast_ptlib.h"
|
||||
|
||||
#define VERSION(a,b,c) ((a)*10000+(b)*100+(c))
|
||||
|
||||
class MyH323EndPoint : public H323EndPoint
|
||||
{
|
||||
PCLASSINFO(MyH323EndPoint, H323EndPoint);
|
||||
|
||||
public:
|
||||
MyH323EndPoint();
|
||||
int MyMakeCall(const PString &, PString &, void *_callReference, void *_opts);
|
||||
PBoolean ClearCall(const PString &, H323Connection::CallEndReason reason);
|
||||
PBoolean ClearCall(const PString &);
|
||||
|
||||
void OnClosedLogicalChannel(H323Connection &, const H323Channel &);
|
||||
void OnConnectionEstablished(H323Connection &, const PString &);
|
||||
void OnConnectionCleared(H323Connection &, const PString &);
|
||||
virtual H323Connection * CreateConnection(unsigned, void *, H323Transport *, H323SignalPDU *);
|
||||
void SendUserTone(const PString &, char);
|
||||
PBoolean OnConnectionForwarded(H323Connection &, const PString &, const H323SignalPDU &);
|
||||
PBoolean ForwardConnection(H323Connection &, const PString &, const H323SignalPDU &);
|
||||
void SetEndpointTypeInfo( H225_EndpointType & info ) const;
|
||||
void SetGateway(void);
|
||||
PStringArray SupportedPrefixes;
|
||||
};
|
||||
|
||||
class MyH323Connection : public H323Connection
|
||||
{
|
||||
PCLASSINFO(MyH323Connection, H323Connection);
|
||||
|
||||
public:
|
||||
MyH323Connection(MyH323EndPoint &, unsigned, unsigned);
|
||||
~MyH323Connection();
|
||||
H323Channel * CreateRealTimeLogicalChannel(const H323Capability &,
|
||||
H323Channel::Directions,
|
||||
unsigned,
|
||||
const H245_H2250LogicalChannelParameters *,
|
||||
RTP_QOS *);
|
||||
H323Connection::AnswerCallResponse OnAnswerCall(const PString &,
|
||||
const H323SignalPDU &,
|
||||
H323SignalPDU &);
|
||||
void OnReceivedReleaseComplete(const H323SignalPDU &);
|
||||
PBoolean OnAlerting(const H323SignalPDU &, const PString &);
|
||||
PBoolean OnSendReleaseComplete(H323SignalPDU &);
|
||||
PBoolean OnReceivedSignalSetup(const H323SignalPDU &);
|
||||
PBoolean OnReceivedFacility(const H323SignalPDU &);
|
||||
PBoolean OnSendSignalSetup(H323SignalPDU &);
|
||||
PBoolean OnStartLogicalChannel(H323Channel &);
|
||||
PBoolean OnClosingLogicalChannel(H323Channel &);
|
||||
virtual void SendUserInputTone(char tone, unsigned duration = 0, unsigned logicalChannel = 0, unsigned rtpTimestamp = 0);
|
||||
virtual void OnUserInputTone(char, unsigned, unsigned, unsigned);
|
||||
virtual void OnUserInputString(const PString &value);
|
||||
PBoolean OnReceivedProgress(const H323SignalPDU &);
|
||||
PBoolean MySendProgress();
|
||||
void OnSendCapabilitySet(H245_TerminalCapabilitySet &);
|
||||
void OnSetLocalCapabilities();
|
||||
void SetCapabilities(int, int, void *, int);
|
||||
PBoolean OnReceivedCapabilitySet(const H323Capabilities &, const H245_MultiplexCapability *,
|
||||
H245_TerminalCapabilitySetReject &);
|
||||
void SetCause(int _cause) { cause = _cause; };
|
||||
virtual PBoolean StartControlChannel(const H225_TransportAddress & h245Address);
|
||||
void SetCallOptions(void *opts, PBoolean isIncoming);
|
||||
void SetCallDetails(void *callDetails, const H323SignalPDU &setupPDU, PBoolean isIncoming);
|
||||
virtual H323Connection::CallEndReason SendSignalSetup(const PString&, const H323TransportAddress&);
|
||||
#ifdef TUNNELLING
|
||||
virtual PBoolean HandleSignalPDU(H323SignalPDU &pdu);
|
||||
PBoolean EmbedTunneledInfo(H323SignalPDU &pdu);
|
||||
#endif
|
||||
#ifdef H323_H450
|
||||
virtual void OnReceivedLocalCallHold(int linkedId);
|
||||
virtual void OnReceivedLocalCallRetrieve(int linkedId);
|
||||
#endif
|
||||
void MyHoldCall(BOOL localHold);
|
||||
|
||||
PString sourceAliases;
|
||||
PString destAliases;
|
||||
PString sourceE164;
|
||||
PString destE164;
|
||||
int cid_presentation;
|
||||
int cid_ton;
|
||||
PString rdnis;
|
||||
int redirect_reason;
|
||||
int transfer_capability;
|
||||
|
||||
WORD sessionId;
|
||||
PBoolean bridging;
|
||||
#ifdef TUNNELLING
|
||||
int remoteTunnelOptions;
|
||||
int tunnelOptions;
|
||||
#endif
|
||||
|
||||
unsigned holdHandling;
|
||||
unsigned progressSetup;
|
||||
unsigned progressAlert;
|
||||
int cause;
|
||||
|
||||
RTP_DataFrame::PayloadTypes dtmfCodec[2];
|
||||
int dtmfMode;
|
||||
};
|
||||
|
||||
class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel
|
||||
{
|
||||
PCLASSINFO(MyH323_ExternalRTPChannel, H323_ExternalRTPChannel);
|
||||
|
||||
public:
|
||||
MyH323_ExternalRTPChannel(
|
||||
MyH323Connection & connection,
|
||||
const H323Capability & capability,
|
||||
Directions direction,
|
||||
unsigned sessionID);
|
||||
|
||||
~MyH323_ExternalRTPChannel();
|
||||
|
||||
/* Overrides */
|
||||
PBoolean Start(void);
|
||||
PBoolean OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param);
|
||||
|
||||
protected:
|
||||
BYTE payloadCode;
|
||||
|
||||
PIPSocket::Address localIpAddr;
|
||||
PIPSocket::Address remoteIpAddr;
|
||||
/* Additional functions in order to have chan_h323 compile with H323Plus */
|
||||
#if VERSION(OPENH323_MAJOR, OPENH323_MINOR, OPENH323_BUILD) > VERSION(1,19,4)
|
||||
BOOL OnReceivedAltPDU(const H245_ArrayOf_GenericInformation & alternate );
|
||||
BOOL OnSendingAltPDU(H245_ArrayOf_GenericInformation & alternate) const;
|
||||
void OnSendOpenAckAlt(H245_ArrayOf_GenericInformation & alternate) const;
|
||||
BOOL OnReceivedAckAltPDU(const H245_ArrayOf_GenericInformation & alternate);
|
||||
#endif
|
||||
WORD localPort;
|
||||
WORD remotePort;
|
||||
};
|
||||
|
||||
#ifdef H323_H450
|
||||
|
||||
#if VERSION(OPENH323_MAJOR, OPENH323_MINOR, OPENH323_BUILD) > VERSION(1,19,4)
|
||||
#include <h450/h450pdu.h>
|
||||
#else
|
||||
#include <h450pdu.h>
|
||||
#endif
|
||||
|
||||
class MyH4504Handler : public H4504Handler
|
||||
{
|
||||
PCLASSINFO(MyH4504Handler, H4504Handler);
|
||||
|
||||
public:
|
||||
MyH4504Handler(MyH323Connection &_conn, H450xDispatcher &_disp);
|
||||
virtual void OnReceivedLocalCallHold(int linkedId);
|
||||
virtual void OnReceivedLocalCallRetrieve(int linkedId);
|
||||
|
||||
private:
|
||||
MyH323Connection *conn;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* !defined AST_H323_H */
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*
|
||||
* Copyright (C) 2009, Digium, Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* PTLib is Copyright (c) 2003 Equivalence Pty. Ltd. */
|
||||
|
||||
/*!
|
||||
* \file
|
||||
* \brief PTLib compatibility with previous versions of OPAL/PTLib/PWLib
|
||||
*/
|
||||
|
||||
#ifndef AST_PTLIB_H
|
||||
#define AST_PTLIB_H
|
||||
|
||||
#include <ptbuildopts.h>
|
||||
#if !defined(P_USE_STANDARD_CXX_BOOL) && !defined(P_USE_INTEGER_BOOL)
|
||||
typedef BOOL PBoolean;
|
||||
#define PTrue TRUE
|
||||
#define PFalse FALSE
|
||||
#endif
|
||||
|
||||
#endif /* !defined AST_PTLIB_H */
|
@ -1,383 +0,0 @@
|
||||
#include <ptlib.h>
|
||||
#include <h323.h>
|
||||
#include <h245.h>
|
||||
#include "ast_h323.h"
|
||||
#include "caps_h323.h"
|
||||
|
||||
#define DEFINE_G711_CAPABILITY(cls, code, capName) \
|
||||
class cls : public AST_G711Capability { \
|
||||
public: \
|
||||
cls() : AST_G711Capability(240, code) { } \
|
||||
}; \
|
||||
H323_REGISTER_CAPABILITY(cls, capName) \
|
||||
|
||||
DEFINE_G711_CAPABILITY(AST_G711ALaw64Capability, H323_G711Capability::ALaw, OPAL_G711_ALAW_64K);
|
||||
DEFINE_G711_CAPABILITY(AST_G711uLaw64Capability, H323_G711Capability::muLaw, OPAL_G711_ULAW_64K);
|
||||
H323_REGISTER_CAPABILITY(AST_G7231Capability, OPAL_G7231);
|
||||
H323_REGISTER_CAPABILITY(AST_G729Capability, OPAL_G729);
|
||||
H323_REGISTER_CAPABILITY(AST_G729ACapability, OPAL_G729A);
|
||||
H323_REGISTER_CAPABILITY(AST_GSM0610Capability, OPAL_GSM0610);
|
||||
H323_REGISTER_CAPABILITY(AST_CiscoG726Capability, CISCO_G726r32);
|
||||
H323_REGISTER_CAPABILITY(AST_CiscoDtmfCapability, CISCO_DTMF_RELAY);
|
||||
|
||||
OPAL_MEDIA_FORMAT_DECLARE(OpalG711ALaw64kFormat,
|
||||
OPAL_G711_ALAW_64K,
|
||||
OpalMediaFormat::DefaultAudioSessionID,
|
||||
RTP_DataFrame::PCMA,
|
||||
TRUE, // Needs jitter
|
||||
64000, // bits/sec
|
||||
8, // bytes/frame
|
||||
8, // 1 millisecond/frame
|
||||
OpalMediaFormat::AudioTimeUnits,
|
||||
0);
|
||||
OPAL_MEDIA_FORMAT_DECLARE(OpalG711uLaw64kFormat,
|
||||
OPAL_G711_ULAW_64K,
|
||||
OpalMediaFormat::DefaultAudioSessionID,
|
||||
RTP_DataFrame::PCMU,
|
||||
TRUE, // Needs jitter
|
||||
64000, // bits/sec
|
||||
8, // bytes/frame
|
||||
8, // 1 millisecond/frame
|
||||
OpalMediaFormat::AudioTimeUnits,
|
||||
0);
|
||||
OPAL_MEDIA_FORMAT_DECLARE(OpalG729Format,
|
||||
OPAL_G729,
|
||||
OpalMediaFormat::DefaultAudioSessionID,
|
||||
RTP_DataFrame::G729,
|
||||
TRUE, // Needs jitter
|
||||
8000, // bits/sec
|
||||
10, // bytes
|
||||
80, // 10 milliseconds
|
||||
OpalMediaFormat::AudioTimeUnits,
|
||||
0);
|
||||
OPAL_MEDIA_FORMAT_DECLARE(OpalG729AFormat,
|
||||
OPAL_G729 "A",
|
||||
OpalMediaFormat::DefaultAudioSessionID,
|
||||
RTP_DataFrame::G729,
|
||||
TRUE, // Needs jitter
|
||||
8000, // bits/sec
|
||||
10, // bytes
|
||||
80, // 10 milliseconds
|
||||
OpalMediaFormat::AudioTimeUnits,
|
||||
0);
|
||||
OPAL_MEDIA_FORMAT_DECLARE(OpalG7231_6k3Format,
|
||||
OPAL_G7231_6k3,
|
||||
OpalMediaFormat::DefaultAudioSessionID,
|
||||
RTP_DataFrame::G7231,
|
||||
TRUE, // Needs jitter
|
||||
6400, // bits/sec
|
||||
24, // bytes
|
||||
240, // 30 milliseconds
|
||||
OpalMediaFormat::AudioTimeUnits,
|
||||
0);
|
||||
OPAL_MEDIA_FORMAT_DECLARE(OpalG7231A_6k3Format,
|
||||
OPAL_G7231A_6k3,
|
||||
OpalMediaFormat::DefaultAudioSessionID,
|
||||
RTP_DataFrame::G7231,
|
||||
TRUE, // Needs jitter
|
||||
6400, // bits/sec
|
||||
24, // bytes
|
||||
240, // 30 milliseconds
|
||||
OpalMediaFormat::AudioTimeUnits,
|
||||
0);
|
||||
OPAL_MEDIA_FORMAT_DECLARE(OpalGSM0610Format,
|
||||
OPAL_GSM0610,
|
||||
OpalMediaFormat::DefaultAudioSessionID,
|
||||
RTP_DataFrame::GSM,
|
||||
TRUE, // Needs jitter
|
||||
13200, // bits/sec
|
||||
33, // bytes
|
||||
160, // 20 milliseconds
|
||||
OpalMediaFormat::AudioTimeUnits,
|
||||
0);
|
||||
OPAL_MEDIA_FORMAT_DECLARE(OpalCiscoG726Format,
|
||||
CISCO_G726r32,
|
||||
OpalMediaFormat::DefaultAudioSessionID,
|
||||
RTP_DataFrame::G726,
|
||||
TRUE, // Needs jitter
|
||||
32000, // bits/sec
|
||||
4, // bytes
|
||||
8, // 1 millisecond
|
||||
OpalMediaFormat::AudioTimeUnits,
|
||||
0);
|
||||
#if 0
|
||||
OPAL_MEDIA_FORMAT_DECLARE(OpalCiscoDTMFRelayFormat,
|
||||
CISCO_DTMF_RELAY,
|
||||
OpalMediaFormat::DefaultAudioSessionID,
|
||||
(RTP_DataFrame::PayloadTypes)121, // Choose this for Cisco IOS compatibility
|
||||
TRUE, // Needs jitter
|
||||
100, // bits/sec
|
||||
4, // bytes/frame
|
||||
8*150, // 150 millisecond
|
||||
OpalMediaFormat::AudioTimeUnits,
|
||||
0);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Capability: G.711
|
||||
*/
|
||||
AST_G711Capability::AST_G711Capability(int rx_frames, H323_G711Capability::Mode m, H323_G711Capability::Speed s)
|
||||
: H323AudioCapability(rx_frames, 30) // 240ms max, 30ms desired
|
||||
{
|
||||
mode = m;
|
||||
speed = s;
|
||||
}
|
||||
|
||||
|
||||
PObject * AST_G711Capability::Clone() const
|
||||
{
|
||||
return new AST_G711Capability(*this);
|
||||
}
|
||||
|
||||
|
||||
unsigned AST_G711Capability::GetSubType() const
|
||||
{
|
||||
static const unsigned G711SubType[2][2] = {
|
||||
{ H245_AudioCapability::e_g711Alaw64k, H245_AudioCapability::e_g711Alaw56k },
|
||||
{ H245_AudioCapability::e_g711Ulaw64k, H245_AudioCapability::e_g711Ulaw56k }
|
||||
};
|
||||
return G711SubType[mode][speed];
|
||||
}
|
||||
|
||||
|
||||
PString AST_G711Capability::GetFormatName() const
|
||||
{
|
||||
static const char * const G711Name[2][2] = {
|
||||
{ OPAL_G711_ALAW_64K, OPAL_G711_ALAW_56K },
|
||||
{ OPAL_G711_ULAW_64K, OPAL_G711_ULAW_56K },
|
||||
};
|
||||
return G711Name[mode][speed];
|
||||
}
|
||||
|
||||
|
||||
H323Codec * AST_G711Capability::CreateCodec(H323Codec::Direction direction) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Capability: G.723.1
|
||||
*/
|
||||
AST_G7231Capability::AST_G7231Capability(int rx_frames, PBoolean annexA_)
|
||||
: H323AudioCapability(rx_frames, 4)
|
||||
{
|
||||
annexA = annexA_;
|
||||
}
|
||||
|
||||
PObject::Comparison AST_G7231Capability::Compare(const PObject & obj) const
|
||||
{
|
||||
Comparison result = H323AudioCapability::Compare(obj);
|
||||
if (result != EqualTo) {
|
||||
return result;
|
||||
}
|
||||
PINDEX otherAnnexA = ((const AST_G7231Capability &)obj).annexA;
|
||||
if (annexA < otherAnnexA) {
|
||||
return LessThan;
|
||||
}
|
||||
if (annexA > otherAnnexA) {
|
||||
return GreaterThan;
|
||||
}
|
||||
return EqualTo;
|
||||
}
|
||||
|
||||
PObject * AST_G7231Capability::Clone() const
|
||||
{
|
||||
return new AST_G7231Capability(*this);
|
||||
}
|
||||
|
||||
PString AST_G7231Capability::GetFormatName() const
|
||||
{
|
||||
return (annexA ? OPAL_G7231 "A" : OPAL_G7231);
|
||||
}
|
||||
|
||||
unsigned AST_G7231Capability::GetSubType() const
|
||||
{
|
||||
return H245_AudioCapability::e_g7231;
|
||||
}
|
||||
|
||||
PBoolean AST_G7231Capability::OnSendingPDU(H245_AudioCapability & cap,
|
||||
unsigned packetSize) const
|
||||
{
|
||||
cap.SetTag(H245_AudioCapability::e_g7231);
|
||||
H245_AudioCapability_g7231 & g7231 = cap;
|
||||
g7231.m_maxAl_sduAudioFrames = packetSize;
|
||||
g7231.m_silenceSuppression = annexA;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
PBoolean AST_G7231Capability::OnReceivedPDU(const H245_AudioCapability & cap,
|
||||
unsigned & packetSize)
|
||||
{
|
||||
if (cap.GetTag() != H245_AudioCapability::e_g7231) {
|
||||
return FALSE;
|
||||
}
|
||||
const H245_AudioCapability_g7231 & g7231 = cap;
|
||||
packetSize = g7231.m_maxAl_sduAudioFrames;
|
||||
annexA = g7231.m_silenceSuppression;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
H323Codec * AST_G7231Capability::CreateCodec(H323Codec::Direction direction) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Capability: G.729
|
||||
*/
|
||||
AST_G729Capability::AST_G729Capability(int rx_frames)
|
||||
: H323AudioCapability(rx_frames, 2)
|
||||
{
|
||||
}
|
||||
|
||||
PObject * AST_G729Capability::Clone() const
|
||||
{
|
||||
return new AST_G729Capability(*this);
|
||||
}
|
||||
|
||||
unsigned AST_G729Capability::GetSubType() const
|
||||
{
|
||||
return H245_AudioCapability::e_g729;
|
||||
}
|
||||
|
||||
PString AST_G729Capability::GetFormatName() const
|
||||
{
|
||||
return OPAL_G729;
|
||||
}
|
||||
|
||||
H323Codec * AST_G729Capability::CreateCodec(H323Codec::Direction direction) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Capability: G.729A
|
||||
*/
|
||||
AST_G729ACapability::AST_G729ACapability(int rx_frames)
|
||||
: H323AudioCapability(rx_frames, 6)
|
||||
{
|
||||
}
|
||||
|
||||
PObject * AST_G729ACapability::Clone() const
|
||||
{
|
||||
return new AST_G729ACapability(*this);
|
||||
}
|
||||
|
||||
unsigned AST_G729ACapability::GetSubType() const
|
||||
{
|
||||
return H245_AudioCapability::e_g729AnnexA;
|
||||
}
|
||||
|
||||
PString AST_G729ACapability::GetFormatName() const
|
||||
{
|
||||
return OPAL_G729A;
|
||||
}
|
||||
|
||||
H323Codec * AST_G729ACapability::CreateCodec(H323Codec::Direction direction) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Capability: GSM full rate
|
||||
*/
|
||||
AST_GSM0610Capability::AST_GSM0610Capability(int rx_frames, int comfortNoise_, int scrambled_)
|
||||
: H323AudioCapability(rx_frames, 2)
|
||||
{
|
||||
comfortNoise = comfortNoise_;
|
||||
scrambled = scrambled_;
|
||||
}
|
||||
|
||||
PObject * AST_GSM0610Capability::Clone() const
|
||||
{
|
||||
return new AST_GSM0610Capability(*this);
|
||||
}
|
||||
|
||||
unsigned AST_GSM0610Capability::GetSubType() const
|
||||
{
|
||||
return H245_AudioCapability::e_gsmFullRate;
|
||||
}
|
||||
|
||||
PBoolean AST_GSM0610Capability::OnSendingPDU(H245_AudioCapability & cap,
|
||||
unsigned packetSize) const
|
||||
{
|
||||
cap.SetTag(H245_AudioCapability::e_gsmFullRate);
|
||||
H245_GSMAudioCapability & gsm = cap;
|
||||
gsm.m_audioUnitSize = packetSize * 33;
|
||||
gsm.m_comfortNoise = comfortNoise;
|
||||
gsm.m_scrambled = scrambled;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
PBoolean AST_GSM0610Capability::OnReceivedPDU(const H245_AudioCapability & cap,
|
||||
unsigned & packetSize)
|
||||
{
|
||||
if (cap.GetTag() != H245_AudioCapability::e_gsmFullRate)
|
||||
return FALSE;
|
||||
const H245_GSMAudioCapability & gsm = cap;
|
||||
packetSize = (gsm.m_audioUnitSize + 32) / 33;
|
||||
comfortNoise = gsm.m_comfortNoise;
|
||||
scrambled = gsm.m_scrambled;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
PString AST_GSM0610Capability::GetFormatName() const
|
||||
{
|
||||
return OPAL_GSM0610;
|
||||
}
|
||||
|
||||
H323Codec * AST_GSM0610Capability::CreateCodec(H323Codec::Direction direction) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Capability: G.726 32 Kbps
|
||||
*/
|
||||
AST_CiscoG726Capability::AST_CiscoG726Capability(int rx_frames)
|
||||
: H323NonStandardAudioCapability(rx_frames, 240,
|
||||
181, 0, 18,
|
||||
(const BYTE *)"G726r32", 0)
|
||||
{
|
||||
}
|
||||
|
||||
PObject *AST_CiscoG726Capability::Clone() const
|
||||
{
|
||||
return new AST_CiscoG726Capability(*this);
|
||||
}
|
||||
|
||||
H323Codec *AST_CiscoG726Capability::CreateCodec(H323Codec::Direction direction) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PString AST_CiscoG726Capability::GetFormatName() const
|
||||
{
|
||||
return PString(CISCO_G726r32);
|
||||
}
|
||||
|
||||
/*
|
||||
* Capability: Cisco RTP DTMF Relay
|
||||
*/
|
||||
AST_CiscoDtmfCapability::AST_CiscoDtmfCapability()
|
||||
: H323NonStandardDataCapability(0, 181, 0, 18, (const BYTE *)"RtpDtmfRelay", 0)
|
||||
{
|
||||
rtpPayloadType = (RTP_DataFrame::PayloadTypes)121;
|
||||
}
|
||||
|
||||
PObject *AST_CiscoDtmfCapability::Clone() const
|
||||
{
|
||||
return new AST_CiscoDtmfCapability(*this);
|
||||
}
|
||||
|
||||
H323Codec *AST_CiscoDtmfCapability::CreateCodec(H323Codec::Direction direction) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PString AST_CiscoDtmfCapability::GetFormatName() const
|
||||
{
|
||||
return PString(CISCO_DTMF_RELAY);
|
||||
}
|
@ -1,172 +0,0 @@
|
||||
#ifndef __AST_H323CAPS_H
|
||||
#define __AST_H323CAPS_H
|
||||
|
||||
/**This class describes the G.711 codec capability.
|
||||
*/
|
||||
class AST_G711Capability : public H323AudioCapability
|
||||
{
|
||||
PCLASSINFO(AST_G711Capability, H323AudioCapability);
|
||||
|
||||
public:
|
||||
AST_G711Capability(int rx_frames = 125, H323_G711Capability::Mode _mode = H323_G711Capability::muLaw, H323_G711Capability::Speed _speed = H323_G711Capability::At64k);
|
||||
virtual PObject *Clone() const;
|
||||
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
|
||||
virtual unsigned GetSubType() const;
|
||||
virtual PString GetFormatName() const;
|
||||
|
||||
protected:
|
||||
H323_G711Capability::Mode mode;
|
||||
H323_G711Capability::Speed speed;
|
||||
};
|
||||
|
||||
/**This class describes the G.723.1 codec capability.
|
||||
*/
|
||||
class AST_G7231Capability : public H323AudioCapability
|
||||
{
|
||||
PCLASSINFO(AST_G7231Capability, H323AudioCapability);
|
||||
|
||||
public:
|
||||
AST_G7231Capability(int rx_frames = 7, PBoolean annexA = TRUE);
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
virtual PObject * Clone() const;
|
||||
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
|
||||
virtual unsigned GetSubType() const;
|
||||
virtual PString GetFormatName() const;
|
||||
virtual PBoolean OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const;
|
||||
virtual PBoolean OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize);
|
||||
|
||||
protected:
|
||||
PBoolean annexA;
|
||||
};
|
||||
|
||||
/**This class describes the (fake) G729 codec capability.
|
||||
*/
|
||||
class AST_G729Capability : public H323AudioCapability
|
||||
{
|
||||
PCLASSINFO(AST_G729Capability, H323AudioCapability);
|
||||
|
||||
public:
|
||||
AST_G729Capability(int rx_frames = 24);
|
||||
/* Create a copy of the object. */
|
||||
virtual PObject * Clone() const;
|
||||
|
||||
/* Create the codec instance, allocating resources as required. */
|
||||
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
|
||||
|
||||
/* Get the sub-type of the capability. This is a code dependent on the
|
||||
main type of the capability.
|
||||
|
||||
This returns one of the four possible combinations of mode and speed
|
||||
using the enum values of the protocol ASN H245_AudioCapability class. */
|
||||
virtual unsigned GetSubType() const;
|
||||
|
||||
/* Get the name of the media data format this class represents. */
|
||||
virtual PString GetFormatName() const;
|
||||
};
|
||||
|
||||
/* This class describes the VoiceAge G729A codec capability. */
|
||||
class AST_G729ACapability : public H323AudioCapability
|
||||
{
|
||||
PCLASSINFO(AST_G729ACapability, H323AudioCapability);
|
||||
|
||||
public:
|
||||
/* Create a new G.729A capability. */
|
||||
AST_G729ACapability(int rx_frames = 24);
|
||||
|
||||
/* Create a copy of the object. */
|
||||
virtual PObject * Clone() const;
|
||||
/* Create the codec instance, allocating resources as required. */
|
||||
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
|
||||
|
||||
/* Get the sub-type of the capability. This is a code dependent on the
|
||||
main type of the capability.
|
||||
|
||||
This returns one of the four possible combinations of mode and speed
|
||||
using the enum values of the protocol ASN H245_AudioCapability class. */
|
||||
virtual unsigned GetSubType() const;
|
||||
|
||||
/* Get the name of the media data format this class represents. */
|
||||
virtual PString GetFormatName() const;
|
||||
};
|
||||
|
||||
/* This class describes the GSM-06.10 codec capability. */
|
||||
class AST_GSM0610Capability : public H323AudioCapability
|
||||
{
|
||||
PCLASSINFO(AST_GSM0610Capability, H323AudioCapability);
|
||||
|
||||
public:
|
||||
/* Create a new GSM capability. */
|
||||
AST_GSM0610Capability(int rx_frames = 24, int comfortNoise = 0, int scrambled = 0);
|
||||
|
||||
/* Create a copy of the object. */
|
||||
virtual PObject * Clone() const;
|
||||
|
||||
/* Create the codec instance, allocating resources as required. */
|
||||
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
|
||||
|
||||
/* Get the sub-type of the capability. This is a code dependent on the
|
||||
main type of the capability.
|
||||
|
||||
This returns one of the four possible combinations of mode and speed
|
||||
using the enum values of the protocol ASN H245_AudioCapability class. */
|
||||
virtual unsigned GetSubType() const;
|
||||
|
||||
/* Get the name of the media data format this class represents. */
|
||||
virtual PString GetFormatName() const;
|
||||
|
||||
PBoolean OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const;
|
||||
PBoolean OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize);
|
||||
|
||||
protected:
|
||||
int comfortNoise;
|
||||
int scrambled;
|
||||
};
|
||||
|
||||
#define CISCO_G726r32 "G726r32"
|
||||
|
||||
class AST_CiscoG726Capability : public H323NonStandardAudioCapability {
|
||||
PCLASSINFO(AST_CiscoG726Capability, H323NonStandardAudioCapability);
|
||||
|
||||
public:
|
||||
/* Create a new Cisco G.726 capability */
|
||||
AST_CiscoG726Capability(int rx_frames = 80);
|
||||
|
||||
/* Create a copy of the object. */
|
||||
virtual PObject * Clone() const;
|
||||
|
||||
/* Create the codec instance, allocating resources as required. */
|
||||
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
|
||||
|
||||
/* Get the name of the media data format this class represents. */
|
||||
virtual PString GetFormatName() const;
|
||||
};
|
||||
|
||||
#define CISCO_DTMF_RELAY "UserInput/RtpDtmfRelay"
|
||||
|
||||
class AST_CiscoDtmfCapability : public H323NonStandardDataCapability
|
||||
{
|
||||
PCLASSINFO(AST_CiscoDtmfCapability, H323NonStandardDataCapability);
|
||||
|
||||
public:
|
||||
/* Create a new Cisco RTP DTMF Relay capability */
|
||||
AST_CiscoDtmfCapability();
|
||||
|
||||
/* Create a copy of the object. */
|
||||
virtual PObject *Clone() const;
|
||||
|
||||
/* Create the codec instance, allocating resources as required. */
|
||||
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
|
||||
|
||||
/* Get the name of the media data format this class represents. */
|
||||
virtual PString GetFormatName() const;
|
||||
|
||||
virtual H323Channel *CreateChannel(H323Connection &,
|
||||
H323Channel::Directions,
|
||||
unsigned,
|
||||
const H245_H2250LogicalChannelParameters *) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* __AST_H323CAPS_H */
|
@ -1,276 +0,0 @@
|
||||
/*
|
||||
* chan_h323.h
|
||||
*
|
||||
* OpenH323 Channel Driver for ASTERISK PBX.
|
||||
* By Jeremy McNamara
|
||||
* For The NuFone Network
|
||||
*
|
||||
* This code has been derived from code created by
|
||||
* Michael Manousos and Mark Spencer
|
||||
*
|
||||
* This file is part of the chan_h323 driver for Asterisk
|
||||
*
|
||||
* chan_h323 is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* chan_h323 is distributed WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Version Info: $Id$
|
||||
*/
|
||||
|
||||
#ifndef CHAN_H323_H
|
||||
#define CHAN_H323_H
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include "asterisk/format.h"
|
||||
#include "asterisk/app.h"
|
||||
|
||||
/*
|
||||
* Enable support for sending/reception of tunnelled Q.SIG messages and
|
||||
* some sort of IEs (especially RedirectingNumber) which Cisco CallManager
|
||||
* isn't like to pass in standard Q.931 message.
|
||||
*
|
||||
*/
|
||||
#define TUNNELLING
|
||||
|
||||
#define H323_TUNNEL_CISCO (1 << 0)
|
||||
#define H323_TUNNEL_QSIG (1 << 1)
|
||||
|
||||
#define H323_HOLD_NOTIFY (1 << 0)
|
||||
#define H323_HOLD_Q931ONLY (1 << 1)
|
||||
#define H323_HOLD_H450 (1 << 2)
|
||||
|
||||
typedef int64_t h323_format;
|
||||
|
||||
/** call_option struct holds various bits
|
||||
* of information for each call */
|
||||
typedef struct call_options {
|
||||
char cid_num[80];
|
||||
char cid_name[80];
|
||||
char cid_rdnis[80];
|
||||
int redirect_reason;
|
||||
int presentation;
|
||||
int type_of_number;
|
||||
int transfer_capability;
|
||||
int fastStart;
|
||||
int h245Tunneling;
|
||||
int silenceSuppression;
|
||||
int progress_setup;
|
||||
int progress_alert;
|
||||
int progress_audio;
|
||||
int dtmfcodec[2];
|
||||
int dtmfmode;
|
||||
h323_format capability;
|
||||
int bridge;
|
||||
int nat;
|
||||
int tunnelOptions;
|
||||
int holdHandling;
|
||||
int autoframing; /*!< turn on to override local settings with remote framing length */
|
||||
struct ast_codec_pref prefs;
|
||||
} call_options_t;
|
||||
|
||||
/* structure to hold the valid asterisk users */
|
||||
struct oh323_user {
|
||||
ASTOBJ_COMPONENTS(struct oh323_user);
|
||||
// char name[80];
|
||||
char context[80];
|
||||
char secret[80];
|
||||
char accountcode[AST_MAX_ACCOUNT_CODE];
|
||||
int amaflags;
|
||||
int host;
|
||||
struct sockaddr_in addr;
|
||||
struct ast_ha *ha;
|
||||
call_options_t options;
|
||||
};
|
||||
|
||||
/* structure to hold the valid asterisk peers
|
||||
All peers are registered to a GK if there is one */
|
||||
struct oh323_peer {
|
||||
ASTOBJ_COMPONENTS(struct oh323_peer);
|
||||
char mailbox[AST_MAX_MAILBOX_UNIQUEID];
|
||||
int delme;
|
||||
struct sockaddr_in addr;
|
||||
struct ast_ha *ha;
|
||||
call_options_t options;
|
||||
};
|
||||
|
||||
/* structure to hold the H.323 aliases which get registered to
|
||||
the H.323 endpoint and gatekeeper */
|
||||
struct oh323_alias {
|
||||
ASTOBJ_COMPONENTS(struct oh323_alias);
|
||||
char e164[20]; /* tells a GK to route this E.164 to this alias */
|
||||
char prefix[500]; /* tells a GK this alias supports these prefixes */
|
||||
char secret[20]; /* the H.235 password to send to the GK for authentication */
|
||||
char context[80];
|
||||
};
|
||||
|
||||
/** call_details struct call detail records
|
||||
to asterisk for processing and used for matching up
|
||||
asterisk channels to acutal h.323 connections */
|
||||
typedef struct call_details {
|
||||
unsigned int call_reference;
|
||||
char *call_token;
|
||||
char *call_source_aliases;
|
||||
char *call_dest_alias;
|
||||
char *call_source_name;
|
||||
char *call_source_e164;
|
||||
char *call_dest_e164;
|
||||
char *redirect_number;
|
||||
int redirect_reason;
|
||||
int presentation;
|
||||
int type_of_number;
|
||||
int transfer_capability;
|
||||
char *sourceIp;
|
||||
} call_details_t;
|
||||
|
||||
typedef struct rtp_info {
|
||||
char addr[32];
|
||||
unsigned int port;
|
||||
} rtp_info_t;
|
||||
|
||||
/* This is a callback prototype function, called pass
|
||||
DTMF down the RTP. */
|
||||
typedef int (*receive_digit_cb)(unsigned, char, const char *, int);
|
||||
extern receive_digit_cb on_receive_digit;
|
||||
|
||||
/* This is a callback prototype function, called to collect
|
||||
the external RTP port from Asterisk. */
|
||||
typedef rtp_info_t *(*on_rtp_cb)(unsigned, const char *);
|
||||
extern on_rtp_cb on_external_rtp_create;
|
||||
|
||||
/* This is a callback prototype function, called to send
|
||||
the remote IP and RTP port from H.323 to Asterisk */
|
||||
typedef void (*start_rtp_cb)(unsigned int, const char *, int, const char *, int);
|
||||
extern start_rtp_cb on_start_rtp_channel;
|
||||
|
||||
/* This is a callback that happens when call progress is
|
||||
* made, and handles inband progress */
|
||||
typedef int (*progress_cb)(unsigned, const char *, int);
|
||||
extern progress_cb on_progress;
|
||||
|
||||
/* This is a callback prototype function, called upon
|
||||
an incoming call happens. */
|
||||
typedef call_options_t *(*setup_incoming_cb)(call_details_t *);
|
||||
extern setup_incoming_cb on_incoming_call;
|
||||
|
||||
/* This is a callback prototype function, called upon
|
||||
an outbound call. */
|
||||
typedef int (*setup_outbound_cb)(call_details_t *);
|
||||
extern setup_outbound_cb on_outgoing_call;
|
||||
|
||||
/* This is a callback prototype function, called when
|
||||
OnAlerting is invoked */
|
||||
typedef void (*chan_ringing_cb)(unsigned, const char *);
|
||||
extern chan_ringing_cb on_chan_ringing;
|
||||
|
||||
/* This is a callback protoype function, called when
|
||||
OnConnectionEstablished is inovked */
|
||||
typedef void (*con_established_cb)(unsigned, const char *);
|
||||
extern con_established_cb on_connection_established;
|
||||
|
||||
/* This is a callback prototype function, called when
|
||||
OnConnectionCleared callback is invoked */
|
||||
typedef void (*clear_con_cb)(unsigned, const char *);
|
||||
extern clear_con_cb on_connection_cleared;
|
||||
|
||||
/* This is a callback prototype function, called when
|
||||
an H.323 call is answered */
|
||||
typedef int (*answer_call_cb)(unsigned, const char *);
|
||||
extern answer_call_cb on_answer_call;
|
||||
|
||||
/* This is a callback prototype function, called when
|
||||
we know which RTP payload type RFC2833 will be
|
||||
transmitted */
|
||||
typedef void (*rfc2833_cb)(unsigned, const char *, int, int);
|
||||
extern rfc2833_cb on_set_rfc2833_payload;
|
||||
|
||||
typedef void (*hangup_cb)(unsigned, const char *, int);
|
||||
extern hangup_cb on_hangup;
|
||||
|
||||
typedef void (*setcapabilities_cb)(unsigned, const char *);
|
||||
extern setcapabilities_cb on_setcapabilities;
|
||||
|
||||
typedef void (*setpeercapabilities_cb)(unsigned, const char *, int, struct ast_codec_pref *);
|
||||
extern setpeercapabilities_cb on_setpeercapabilities;
|
||||
|
||||
typedef void (*onhold_cb)(unsigned, const char *, int);
|
||||
extern onhold_cb on_hold;
|
||||
|
||||
/* debug flag */
|
||||
extern int h323debug;
|
||||
|
||||
#define H323_DTMF_RFC2833 (1 << 0)
|
||||
#define H323_DTMF_CISCO (1 << 1)
|
||||
#define H323_DTMF_SIGNAL (1 << 2)
|
||||
#define H323_DTMF_INBAND (1 << 3)
|
||||
|
||||
#define H323_DTMF_RFC2833_PT 101
|
||||
#define H323_DTMF_CISCO_PT 121
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void h323_gk_urq(void);
|
||||
void h323_end_point_create(void);
|
||||
void h323_end_process(void);
|
||||
int h323_end_point_exist(void);
|
||||
|
||||
void h323_debug(int, unsigned);
|
||||
|
||||
/* callback function handler*/
|
||||
void h323_callback_register(setup_incoming_cb,
|
||||
setup_outbound_cb,
|
||||
on_rtp_cb,
|
||||
start_rtp_cb,
|
||||
clear_con_cb,
|
||||
chan_ringing_cb,
|
||||
con_established_cb,
|
||||
receive_digit_cb,
|
||||
answer_call_cb,
|
||||
progress_cb,
|
||||
rfc2833_cb,
|
||||
hangup_cb,
|
||||
setcapabilities_cb,
|
||||
setpeercapabilities_cb,
|
||||
onhold_cb);
|
||||
int h323_set_capabilities(const char *, int, int, struct ast_codec_pref *, int);
|
||||
int h323_set_alias(struct oh323_alias *);
|
||||
int h323_set_gk(int, char *, char *);
|
||||
void h323_set_id(char *);
|
||||
void h323_show_tokens(void);
|
||||
void h323_show_version(void);
|
||||
|
||||
/* H323 listener related funcions */
|
||||
int h323_start_listener(int, struct sockaddr_in);
|
||||
|
||||
void h323_native_bridge(const char *, const char *, char *);
|
||||
|
||||
/* Send a DTMF tone to remote endpoint */
|
||||
void h323_send_tone(const char *call_token, char tone);
|
||||
|
||||
/* H323 create and destroy sessions */
|
||||
int h323_make_call(char *dest, call_details_t *cd, call_options_t *);
|
||||
int h323_clear_call(const char *, int cause);
|
||||
|
||||
/* H.323 alerting and progress */
|
||||
int h323_send_alerting(const char *token);
|
||||
int h323_send_progress(const char *token);
|
||||
int h323_answering_call(const char *token, int);
|
||||
int h323_soft_hangup(const char *data);
|
||||
int h323_show_codec(int fd, int argc, char *argv[]);
|
||||
int h323_hold_call(const char *token, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,74 +0,0 @@
|
||||
CISCO-H225-MESSAGES DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
H323_UU_NonStdInfo ::= SEQUENCE
|
||||
{
|
||||
version INTEGER OPTIONAL,
|
||||
protoParam ProtoParam OPTIONAL,
|
||||
commonParam CommonParam OPTIONAL,
|
||||
...,
|
||||
dummy1 OCTET STRING OPTIONAL,
|
||||
progIndParam ProgIndParam OPTIONAL,
|
||||
callMgrParam CallMgrParam OPTIONAL,
|
||||
callSignallingParam CallSignallingParam OPTIONAL,
|
||||
dummy2 OCTET STRING OPTIONAL,
|
||||
callPreserveParam CallPreserveParam OPTIONAL
|
||||
}
|
||||
|
||||
CommonParam ::= SEQUENCE
|
||||
{
|
||||
redirectIEinfo RedirectIEinfo,
|
||||
...
|
||||
}
|
||||
|
||||
RedirectIEinfo ::= SEQUENCE
|
||||
{
|
||||
redirectIE OCTET STRING,
|
||||
...
|
||||
}
|
||||
|
||||
ProgIndParam ::= SEQUENCE
|
||||
{
|
||||
progIndIEinfo ProgIndIEinfo,
|
||||
...
|
||||
}
|
||||
|
||||
ProgIndIEinfo ::= SEQUENCE
|
||||
{
|
||||
progIndIE OCTET STRING,
|
||||
...
|
||||
}
|
||||
|
||||
ProtoParam ::= SEQUENCE
|
||||
{
|
||||
qsigNonStdInfo QsigNonStdInfo,
|
||||
...
|
||||
}
|
||||
|
||||
QsigNonStdInfo ::= SEQUENCE
|
||||
{
|
||||
iei INTEGER,
|
||||
rawMesg OCTET STRING,
|
||||
...
|
||||
}
|
||||
|
||||
CallMgrParam ::= SEQUENCE
|
||||
{
|
||||
interclusterVersion INTEGER,
|
||||
enterpriseID OCTET STRING,
|
||||
...
|
||||
}
|
||||
|
||||
CallPreserveParam ::= SEQUENCE
|
||||
{
|
||||
callPreserveIE BOOLEAN,
|
||||
...
|
||||
}
|
||||
|
||||
CallSignallingParam ::= SEQUENCE
|
||||
{
|
||||
connectedNumber OCTET STRING (1..127) OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
END
|
@ -1,853 +0,0 @@
|
||||
//
|
||||
// cisco-h225.cxx
|
||||
//
|
||||
// Code automatically generated by asnparse.
|
||||
//
|
||||
|
||||
#ifdef P_USE_PRAGMA
|
||||
#pragma implementation "cisco-h225.h"
|
||||
#endif
|
||||
|
||||
#include <ptlib.h>
|
||||
#include "cisco-h225.h"
|
||||
|
||||
#define new PNEW
|
||||
|
||||
|
||||
#if ! H323_DISABLE_CISCO_H225
|
||||
|
||||
//
|
||||
// RedirectIEinfo
|
||||
//
|
||||
|
||||
CISCO_H225_RedirectIEinfo::CISCO_H225_RedirectIEinfo(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 0, TRUE, 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_RedirectIEinfo::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
strm << setw(indent+13) << "redirectIE = " << setprecision(indent) << m_redirectIE << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_RedirectIEinfo::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_RedirectIEinfo), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_RedirectIEinfo & other = (const CISCO_H225_RedirectIEinfo &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_redirectIE.Compare(other.m_redirectIE)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_RedirectIEinfo::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
length += m_redirectIE.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_RedirectIEinfo::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (!m_redirectIE.Decode(strm))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_RedirectIEinfo::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
m_redirectIE.Encode(strm);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_RedirectIEinfo::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_RedirectIEinfo::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_RedirectIEinfo(*this);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ProgIndIEinfo
|
||||
//
|
||||
|
||||
CISCO_H225_ProgIndIEinfo::CISCO_H225_ProgIndIEinfo(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 0, TRUE, 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_ProgIndIEinfo::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
strm << setw(indent+12) << "progIndIE = " << setprecision(indent) << m_progIndIE << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_ProgIndIEinfo::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_ProgIndIEinfo), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_ProgIndIEinfo & other = (const CISCO_H225_ProgIndIEinfo &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_progIndIE.Compare(other.m_progIndIE)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_ProgIndIEinfo::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
length += m_progIndIE.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_ProgIndIEinfo::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (!m_progIndIE.Decode(strm))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_ProgIndIEinfo::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
m_progIndIE.Encode(strm);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_ProgIndIEinfo::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_ProgIndIEinfo::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_ProgIndIEinfo(*this);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// QsigNonStdInfo
|
||||
//
|
||||
|
||||
CISCO_H225_QsigNonStdInfo::CISCO_H225_QsigNonStdInfo(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 0, TRUE, 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_QsigNonStdInfo::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
strm << setw(indent+6) << "iei = " << setprecision(indent) << m_iei << '\n';
|
||||
strm << setw(indent+10) << "rawMesg = " << setprecision(indent) << m_rawMesg << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_QsigNonStdInfo::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_QsigNonStdInfo), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_QsigNonStdInfo & other = (const CISCO_H225_QsigNonStdInfo &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_iei.Compare(other.m_iei)) != EqualTo)
|
||||
return result;
|
||||
if ((result = m_rawMesg.Compare(other.m_rawMesg)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_QsigNonStdInfo::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
length += m_iei.GetObjectLength();
|
||||
length += m_rawMesg.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_QsigNonStdInfo::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (!m_iei.Decode(strm))
|
||||
return FALSE;
|
||||
if (!m_rawMesg.Decode(strm))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_QsigNonStdInfo::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
m_iei.Encode(strm);
|
||||
m_rawMesg.Encode(strm);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_QsigNonStdInfo::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_QsigNonStdInfo::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_QsigNonStdInfo(*this);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CallMgrParam
|
||||
//
|
||||
|
||||
CISCO_H225_CallMgrParam::CISCO_H225_CallMgrParam(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 0, TRUE, 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_CallMgrParam::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
strm << setw(indent+22) << "interclusterVersion = " << setprecision(indent) << m_interclusterVersion << '\n';
|
||||
strm << setw(indent+15) << "enterpriseID = " << setprecision(indent) << m_enterpriseID << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_CallMgrParam::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_CallMgrParam), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_CallMgrParam & other = (const CISCO_H225_CallMgrParam &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_interclusterVersion.Compare(other.m_interclusterVersion)) != EqualTo)
|
||||
return result;
|
||||
if ((result = m_enterpriseID.Compare(other.m_enterpriseID)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_CallMgrParam::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
length += m_interclusterVersion.GetObjectLength();
|
||||
length += m_enterpriseID.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_CallMgrParam::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (!m_interclusterVersion.Decode(strm))
|
||||
return FALSE;
|
||||
if (!m_enterpriseID.Decode(strm))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_CallMgrParam::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
m_interclusterVersion.Encode(strm);
|
||||
m_enterpriseID.Encode(strm);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_CallMgrParam::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_CallMgrParam::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_CallMgrParam(*this);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CallPreserveParam
|
||||
//
|
||||
|
||||
CISCO_H225_CallPreserveParam::CISCO_H225_CallPreserveParam(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 0, TRUE, 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_CallPreserveParam::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
strm << setw(indent+17) << "callPreserveIE = " << setprecision(indent) << m_callPreserveIE << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_CallPreserveParam::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_CallPreserveParam), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_CallPreserveParam & other = (const CISCO_H225_CallPreserveParam &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_callPreserveIE.Compare(other.m_callPreserveIE)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_CallPreserveParam::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
length += m_callPreserveIE.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_CallPreserveParam::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (!m_callPreserveIE.Decode(strm))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_CallPreserveParam::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
m_callPreserveIE.Encode(strm);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_CallPreserveParam::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_CallPreserveParam::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_CallPreserveParam(*this);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CallSignallingParam
|
||||
//
|
||||
|
||||
CISCO_H225_CallSignallingParam::CISCO_H225_CallSignallingParam(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 1, TRUE, 0)
|
||||
{
|
||||
m_connectedNumber.SetConstraints(PASN_Object::FixedConstraint, 1, 127);
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_CallSignallingParam::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
if (HasOptionalField(e_connectedNumber))
|
||||
strm << setw(indent+18) << "connectedNumber = " << setprecision(indent) << m_connectedNumber << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_CallSignallingParam::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_CallSignallingParam), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_CallSignallingParam & other = (const CISCO_H225_CallSignallingParam &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_connectedNumber.Compare(other.m_connectedNumber)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_CallSignallingParam::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
if (HasOptionalField(e_connectedNumber))
|
||||
length += m_connectedNumber.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_CallSignallingParam::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (HasOptionalField(e_connectedNumber) && !m_connectedNumber.Decode(strm))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_CallSignallingParam::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
if (HasOptionalField(e_connectedNumber))
|
||||
m_connectedNumber.Encode(strm);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_CallSignallingParam::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_CallSignallingParam::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_CallSignallingParam(*this);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CommonParam
|
||||
//
|
||||
|
||||
CISCO_H225_CommonParam::CISCO_H225_CommonParam(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 0, TRUE, 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_CommonParam::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
strm << setw(indent+17) << "redirectIEinfo = " << setprecision(indent) << m_redirectIEinfo << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_CommonParam::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_CommonParam), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_CommonParam & other = (const CISCO_H225_CommonParam &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_redirectIEinfo.Compare(other.m_redirectIEinfo)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_CommonParam::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
length += m_redirectIEinfo.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_CommonParam::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (!m_redirectIEinfo.Decode(strm))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_CommonParam::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
m_redirectIEinfo.Encode(strm);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_CommonParam::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_CommonParam::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_CommonParam(*this);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ProgIndParam
|
||||
//
|
||||
|
||||
CISCO_H225_ProgIndParam::CISCO_H225_ProgIndParam(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 0, TRUE, 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_ProgIndParam::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
strm << setw(indent+16) << "progIndIEinfo = " << setprecision(indent) << m_progIndIEinfo << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_ProgIndParam::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_ProgIndParam), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_ProgIndParam & other = (const CISCO_H225_ProgIndParam &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_progIndIEinfo.Compare(other.m_progIndIEinfo)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_ProgIndParam::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
length += m_progIndIEinfo.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_ProgIndParam::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (!m_progIndIEinfo.Decode(strm))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_ProgIndParam::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
m_progIndIEinfo.Encode(strm);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_ProgIndParam::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_ProgIndParam::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_ProgIndParam(*this);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ProtoParam
|
||||
//
|
||||
|
||||
CISCO_H225_ProtoParam::CISCO_H225_ProtoParam(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 0, TRUE, 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_ProtoParam::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
strm << setw(indent+17) << "qsigNonStdInfo = " << setprecision(indent) << m_qsigNonStdInfo << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_ProtoParam::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_ProtoParam), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_ProtoParam & other = (const CISCO_H225_ProtoParam &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_qsigNonStdInfo.Compare(other.m_qsigNonStdInfo)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_ProtoParam::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
length += m_qsigNonStdInfo.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_ProtoParam::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (!m_qsigNonStdInfo.Decode(strm))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_ProtoParam::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
m_qsigNonStdInfo.Encode(strm);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_ProtoParam::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_ProtoParam::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_ProtoParam(*this);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// H323_UU_NonStdInfo
|
||||
//
|
||||
|
||||
CISCO_H225_H323_UU_NonStdInfo::CISCO_H225_H323_UU_NonStdInfo(unsigned tag, PASN_Object::TagClass tagClass)
|
||||
: PASN_Sequence(tag, tagClass, 3, TRUE, 6)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifndef PASN_NOPRINTON
|
||||
void CISCO_H225_H323_UU_NonStdInfo::PrintOn(ostream & strm) const
|
||||
{
|
||||
int indent = strm.precision() + 2;
|
||||
strm << "{\n";
|
||||
if (HasOptionalField(e_version))
|
||||
strm << setw(indent+10) << "version = " << setprecision(indent) << m_version << '\n';
|
||||
if (HasOptionalField(e_protoParam))
|
||||
strm << setw(indent+13) << "protoParam = " << setprecision(indent) << m_protoParam << '\n';
|
||||
if (HasOptionalField(e_commonParam))
|
||||
strm << setw(indent+14) << "commonParam = " << setprecision(indent) << m_commonParam << '\n';
|
||||
if (HasOptionalField(e_dummy1))
|
||||
strm << setw(indent+9) << "dummy1 = " << setprecision(indent) << m_dummy1 << '\n';
|
||||
if (HasOptionalField(e_progIndParam))
|
||||
strm << setw(indent+15) << "progIndParam = " << setprecision(indent) << m_progIndParam << '\n';
|
||||
if (HasOptionalField(e_callMgrParam))
|
||||
strm << setw(indent+15) << "callMgrParam = " << setprecision(indent) << m_callMgrParam << '\n';
|
||||
if (HasOptionalField(e_callSignallingParam))
|
||||
strm << setw(indent+22) << "callSignallingParam = " << setprecision(indent) << m_callSignallingParam << '\n';
|
||||
if (HasOptionalField(e_dummy2))
|
||||
strm << setw(indent+9) << "dummy2 = " << setprecision(indent) << m_dummy2 << '\n';
|
||||
if (HasOptionalField(e_callPreserveParam))
|
||||
strm << setw(indent+20) << "callPreserveParam = " << setprecision(indent) << m_callPreserveParam << '\n';
|
||||
strm << setw(indent-1) << setprecision(indent-2) << "}";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PObject::Comparison CISCO_H225_H323_UU_NonStdInfo::Compare(const PObject & obj) const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(PIsDescendant(&obj, CISCO_H225_H323_UU_NonStdInfo), PInvalidCast);
|
||||
#endif
|
||||
const CISCO_H225_H323_UU_NonStdInfo & other = (const CISCO_H225_H323_UU_NonStdInfo &)obj;
|
||||
|
||||
Comparison result;
|
||||
|
||||
if ((result = m_version.Compare(other.m_version)) != EqualTo)
|
||||
return result;
|
||||
if ((result = m_protoParam.Compare(other.m_protoParam)) != EqualTo)
|
||||
return result;
|
||||
if ((result = m_commonParam.Compare(other.m_commonParam)) != EqualTo)
|
||||
return result;
|
||||
|
||||
return PASN_Sequence::Compare(other);
|
||||
}
|
||||
|
||||
|
||||
PINDEX CISCO_H225_H323_UU_NonStdInfo::GetDataLength() const
|
||||
{
|
||||
PINDEX length = 0;
|
||||
if (HasOptionalField(e_version))
|
||||
length += m_version.GetObjectLength();
|
||||
if (HasOptionalField(e_protoParam))
|
||||
length += m_protoParam.GetObjectLength();
|
||||
if (HasOptionalField(e_commonParam))
|
||||
length += m_commonParam.GetObjectLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
PBoolean CISCO_H225_H323_UU_NonStdInfo::Decode(PASN_Stream & strm)
|
||||
{
|
||||
if (!PreambleDecode(strm))
|
||||
return FALSE;
|
||||
|
||||
if (HasOptionalField(e_version) && !m_version.Decode(strm))
|
||||
return FALSE;
|
||||
if (HasOptionalField(e_protoParam) && !m_protoParam.Decode(strm))
|
||||
return FALSE;
|
||||
if (HasOptionalField(e_commonParam) && !m_commonParam.Decode(strm))
|
||||
return FALSE;
|
||||
if (!KnownExtensionDecode(strm, e_dummy1, m_dummy1))
|
||||
return FALSE;
|
||||
if (!KnownExtensionDecode(strm, e_progIndParam, m_progIndParam))
|
||||
return FALSE;
|
||||
if (!KnownExtensionDecode(strm, e_callMgrParam, m_callMgrParam))
|
||||
return FALSE;
|
||||
if (!KnownExtensionDecode(strm, e_callSignallingParam, m_callSignallingParam))
|
||||
return FALSE;
|
||||
if (!KnownExtensionDecode(strm, e_dummy2, m_dummy2))
|
||||
return FALSE;
|
||||
if (!KnownExtensionDecode(strm, e_callPreserveParam, m_callPreserveParam))
|
||||
return FALSE;
|
||||
|
||||
return UnknownExtensionsDecode(strm);
|
||||
}
|
||||
|
||||
|
||||
void CISCO_H225_H323_UU_NonStdInfo::Encode(PASN_Stream & strm) const
|
||||
{
|
||||
PreambleEncode(strm);
|
||||
|
||||
if (HasOptionalField(e_version))
|
||||
m_version.Encode(strm);
|
||||
if (HasOptionalField(e_protoParam))
|
||||
m_protoParam.Encode(strm);
|
||||
if (HasOptionalField(e_commonParam))
|
||||
m_commonParam.Encode(strm);
|
||||
KnownExtensionEncode(strm, e_dummy1, m_dummy1);
|
||||
KnownExtensionEncode(strm, e_progIndParam, m_progIndParam);
|
||||
KnownExtensionEncode(strm, e_callMgrParam, m_callMgrParam);
|
||||
KnownExtensionEncode(strm, e_callSignallingParam, m_callSignallingParam);
|
||||
KnownExtensionEncode(strm, e_dummy2, m_dummy2);
|
||||
KnownExtensionEncode(strm, e_callPreserveParam, m_callPreserveParam);
|
||||
|
||||
UnknownExtensionsEncode(strm);
|
||||
}
|
||||
|
||||
|
||||
PObject * CISCO_H225_H323_UU_NonStdInfo::Clone() const
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PAssert(IsClass(CISCO_H225_H323_UU_NonStdInfo::Class()), PInvalidCast);
|
||||
#endif
|
||||
return new CISCO_H225_H323_UU_NonStdInfo(*this);
|
||||
}
|
||||
|
||||
|
||||
#endif // if ! H323_DISABLE_CISCO_H225
|
||||
|
||||
|
||||
// End of cisco-h225.cxx
|
@ -1,300 +0,0 @@
|
||||
//
|
||||
// cisco-h225.h
|
||||
//
|
||||
// Code automatically generated by asnparse.
|
||||
//
|
||||
|
||||
#if ! H323_DISABLE_CISCO_H225
|
||||
|
||||
#ifndef __CISCO_H225_H
|
||||
#define __CISCO_H225_H
|
||||
|
||||
#ifdef P_USE_PRAGMA
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <ptclib/asner.h>
|
||||
#include "ast_ptlib.h"
|
||||
|
||||
//
|
||||
// RedirectIEinfo
|
||||
//
|
||||
|
||||
class CISCO_H225_RedirectIEinfo : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_RedirectIEinfo, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_RedirectIEinfo(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
PASN_OctetString m_redirectIE;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// ProgIndIEinfo
|
||||
//
|
||||
|
||||
class CISCO_H225_ProgIndIEinfo : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_ProgIndIEinfo, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_ProgIndIEinfo(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
PASN_OctetString m_progIndIE;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// QsigNonStdInfo
|
||||
//
|
||||
|
||||
class CISCO_H225_QsigNonStdInfo : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_QsigNonStdInfo, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_QsigNonStdInfo(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
PASN_Integer m_iei;
|
||||
PASN_OctetString m_rawMesg;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// CallMgrParam
|
||||
//
|
||||
|
||||
class CISCO_H225_CallMgrParam : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_CallMgrParam, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_CallMgrParam(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
PASN_Integer m_interclusterVersion;
|
||||
PASN_OctetString m_enterpriseID;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// CallPreserveParam
|
||||
//
|
||||
|
||||
class CISCO_H225_CallPreserveParam : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_CallPreserveParam, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_CallPreserveParam(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
PASN_Boolean m_callPreserveIE;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// CallSignallingParam
|
||||
//
|
||||
|
||||
class CISCO_H225_CallSignallingParam : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_CallSignallingParam, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_CallSignallingParam(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
enum OptionalFields {
|
||||
e_connectedNumber
|
||||
};
|
||||
|
||||
PASN_OctetString m_connectedNumber;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// CommonParam
|
||||
//
|
||||
|
||||
class CISCO_H225_CommonParam : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_CommonParam, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_CommonParam(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
CISCO_H225_RedirectIEinfo m_redirectIEinfo;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// ProgIndParam
|
||||
//
|
||||
|
||||
class CISCO_H225_ProgIndParam : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_ProgIndParam, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_ProgIndParam(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
CISCO_H225_ProgIndIEinfo m_progIndIEinfo;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// ProtoParam
|
||||
//
|
||||
|
||||
class CISCO_H225_ProtoParam : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_ProtoParam, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_ProtoParam(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
CISCO_H225_QsigNonStdInfo m_qsigNonStdInfo;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// H323_UU_NonStdInfo
|
||||
//
|
||||
|
||||
class CISCO_H225_H323_UU_NonStdInfo : public PASN_Sequence
|
||||
{
|
||||
#ifndef PASN_LEANANDMEAN
|
||||
PCLASSINFO(CISCO_H225_H323_UU_NonStdInfo, PASN_Sequence);
|
||||
#endif
|
||||
public:
|
||||
CISCO_H225_H323_UU_NonStdInfo(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);
|
||||
|
||||
enum OptionalFields {
|
||||
e_version,
|
||||
e_protoParam,
|
||||
e_commonParam,
|
||||
e_dummy1,
|
||||
e_progIndParam,
|
||||
e_callMgrParam,
|
||||
e_callSignallingParam,
|
||||
e_dummy2,
|
||||
e_callPreserveParam
|
||||
};
|
||||
|
||||
PASN_Integer m_version;
|
||||
CISCO_H225_ProtoParam m_protoParam;
|
||||
CISCO_H225_CommonParam m_commonParam;
|
||||
PASN_OctetString m_dummy1;
|
||||
CISCO_H225_ProgIndParam m_progIndParam;
|
||||
CISCO_H225_CallMgrParam m_callMgrParam;
|
||||
CISCO_H225_CallSignallingParam m_callSignallingParam;
|
||||
PASN_OctetString m_dummy2;
|
||||
CISCO_H225_CallPreserveParam m_callPreserveParam;
|
||||
|
||||
PINDEX GetDataLength() const;
|
||||
PBoolean Decode(PASN_Stream & strm);
|
||||
void Encode(PASN_Stream & strm) const;
|
||||
#ifndef PASN_NOPRINTON
|
||||
void PrintOn(ostream & strm) const;
|
||||
#endif
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
};
|
||||
|
||||
|
||||
#endif // __CISCO_H225_H
|
||||
|
||||
#endif // if ! H323_DISABLE_CISCO_H225
|
||||
|
||||
|
||||
// End of cisco-h225.h
|
@ -1,139 +0,0 @@
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
/*
|
||||
* ast_h323.cpp
|
||||
*
|
||||
* OpenH323 Channel Driver for ASTERISK PBX.
|
||||
* By Jeremy McNamara
|
||||
* For The NuFone Network
|
||||
*
|
||||
* chan_h323 has been derived from code created by
|
||||
* Michael Manousos and Mark Spencer
|
||||
*
|
||||
* This file is part of the chan_h323 driver for Asterisk
|
||||
*
|
||||
* chan_h323 is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* chan_h323 is distributed WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Version Info: $Id$
|
||||
*/
|
||||
#include <ptlib.h>
|
||||
#include <h323.h>
|
||||
#include <transports.h>
|
||||
|
||||
#include "ast_h323.h"
|
||||
#include "compat_h323.h"
|
||||
|
||||
#if VERSION(OPENH323_MAJOR,OPENH323_MINOR,OPENH323_BUILD) < VERSION(1,17,3)
|
||||
MyH323TransportTCP::MyH323TransportTCP(
|
||||
H323EndPoint & endpoint,
|
||||
PIPSocket::Address binding,
|
||||
PBoolean listen)
|
||||
: H323TransportTCP(endpoint, binding, listen)
|
||||
{
|
||||
}
|
||||
|
||||
PBoolean MyH323TransportTCP::Connect()
|
||||
{
|
||||
if (IsListening())
|
||||
return TRUE;
|
||||
|
||||
PTCPSocket * socket = new PTCPSocket(remotePort);
|
||||
Open(socket);
|
||||
|
||||
channelPointerMutex.StartRead();
|
||||
|
||||
socket->SetReadTimeout(10000/*endpoint.GetSignallingChannelConnectTimeout()*/);
|
||||
|
||||
localPort = endpoint.GetNextTCPPort();
|
||||
WORD firstPort = localPort;
|
||||
for (;;) {
|
||||
PTRACE(4, "H323TCP\tConnecting to "
|
||||
<< remoteAddress << ':' << remotePort
|
||||
<< " (local port=" << localPort << ')');
|
||||
if (socket->Connect(localAddress, localPort, remoteAddress))
|
||||
break;
|
||||
|
||||
int errnum = socket->GetErrorNumber();
|
||||
if (localPort == 0 || (errnum != EADDRINUSE && errnum != EADDRNOTAVAIL)) {
|
||||
PTRACE(1, "H323TCP\tCould not connect to "
|
||||
<< remoteAddress << ':' << remotePort
|
||||
<< " (local port=" << localPort << ") - "
|
||||
<< socket->GetErrorText() << '(' << errnum << ')');
|
||||
channelPointerMutex.EndRead();
|
||||
return SetErrorValues(socket->GetErrorCode(), errnum);
|
||||
}
|
||||
|
||||
localPort = endpoint.GetNextTCPPort();
|
||||
if (localPort == firstPort) {
|
||||
PTRACE(1, "H323TCP\tCould not bind to any port in range " <<
|
||||
endpoint.GetTCPPortBase() << " to " << endpoint.GetTCPPortMax());
|
||||
channelPointerMutex.EndRead();
|
||||
return SetErrorValues(socket->GetErrorCode(), errnum);
|
||||
}
|
||||
}
|
||||
|
||||
socket->SetReadTimeout(PMaxTimeInterval);
|
||||
|
||||
channelPointerMutex.EndRead();
|
||||
|
||||
return OnOpen();
|
||||
}
|
||||
#endif
|
||||
|
||||
PBoolean MyH323TransportUDP::DiscoverGatekeeper(H323Gatekeeper &gk, H323RasPDU &pdu, const H323TransportAddress &address)
|
||||
{
|
||||
PThread *thd = PThread::Current();
|
||||
|
||||
/* If we run in OpenH323's thread use it instead of creating new one */
|
||||
if (thd)
|
||||
return H323TransportUDP::DiscoverGatekeeper(gk, pdu, address);
|
||||
|
||||
/* Make copy of arguments to pass them into thread */
|
||||
discoverGatekeeper = &gk;
|
||||
discoverPDU = &pdu;
|
||||
discoverAddress = &address;
|
||||
|
||||
/* Assume discovery thread isn't finished */
|
||||
discoverReady = FALSE;
|
||||
|
||||
/* Create discovery thread */
|
||||
thd = PThread::Create(PCREATE_NOTIFIER(DiscoverMain), 0,
|
||||
PThread::NoAutoDeleteThread,
|
||||
PThread::NormalPriority,
|
||||
"GkDiscovery:%x");
|
||||
|
||||
/* Wait until discovery thread signal us its finished */
|
||||
for(;;) {
|
||||
discoverMutex.Wait();
|
||||
if (discoverReady) /* Thread has been finished */
|
||||
break;
|
||||
discoverMutex.Signal();
|
||||
}
|
||||
discoverMutex.Signal();
|
||||
|
||||
/* Cleanup/delete thread */
|
||||
thd->WaitForTermination();
|
||||
delete thd;
|
||||
|
||||
return discoverResult;
|
||||
}
|
||||
|
||||
void MyH323TransportUDP::DiscoverMain(PThread &thread, INT arg)
|
||||
{
|
||||
PWaitAndSignal m(discoverMutex);
|
||||
|
||||
discoverResult = H323TransportUDP::DiscoverGatekeeper(*discoverGatekeeper, *discoverPDU, *discoverAddress);
|
||||
discoverReady = TRUE;
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
#ifndef COMPAT_H323_H
|
||||
#define COMPAT_H323_H
|
||||
|
||||
#include "ast_ptlib.h"
|
||||
|
||||
#if VERSION(OPENH323_MAJOR,OPENH323_MINOR,OPENH323_BUILD) < VERSION(1,17,3)
|
||||
/**
|
||||
* Workaround for broken (less than 1.17.3) OpenH323 stack to be able to
|
||||
* make TCP connections from specific address
|
||||
*/
|
||||
class MyH323TransportTCP : public H323TransportTCP
|
||||
{
|
||||
PCLASSINFO(MyH323TransportTCP, H323TransportTCP);
|
||||
|
||||
public:
|
||||
MyH323TransportTCP(
|
||||
H323EndPoint & endpoint, ///< H323 End Point object
|
||||
PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(), ///< Local interface to use
|
||||
PBoolean listen = FALSE ///< Flag for need to wait for remote to connect
|
||||
);
|
||||
/**Connect to the remote party.
|
||||
*/
|
||||
virtual PBoolean Connect();
|
||||
};
|
||||
#else
|
||||
#define MyH323TransportTCP H323TransportTCP
|
||||
#endif /* <VERSION(1,17,3) */
|
||||
|
||||
class MyH323TransportUDP: public H323TransportUDP
|
||||
{
|
||||
PCLASSINFO(MyH323TransportUDP, H323TransportUDP);
|
||||
|
||||
public:
|
||||
MyH323TransportUDP(H323EndPoint &endpoint,
|
||||
PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(),
|
||||
WORD localPort = 0,
|
||||
WORD remotePort = 0): H323TransportUDP(endpoint, binding, localPort, remotePort)
|
||||
{
|
||||
}
|
||||
virtual PBoolean DiscoverGatekeeper(H323Gatekeeper &,
|
||||
H323RasPDU &,
|
||||
const H323TransportAddress &);
|
||||
protected:
|
||||
PDECLARE_NOTIFIER(PThread, MyH323TransportUDP, DiscoverMain);
|
||||
H323Gatekeeper *discoverGatekeeper;
|
||||
H323RasPDU *discoverPDU;
|
||||
const H323TransportAddress *discoverAddress;
|
||||
PBoolean discoverResult;
|
||||
PBoolean discoverReady;
|
||||
PMutex discoverMutex;
|
||||
};
|
||||
|
||||
template <class _Abstract_T, typename _Key_T = PString>
|
||||
class MyPFactory: public PFactory<_Abstract_T, _Key_T>
|
||||
{
|
||||
public:
|
||||
template <class _Concrete_T> class Worker: public PFactory<_Abstract_T, _Key_T>::WorkerBase
|
||||
{
|
||||
public:
|
||||
Worker(const _Key_T &_key, bool singleton = false)
|
||||
:PFactory<_Abstract_T, _Key_T>::WorkerBase(singleton), key(_key)
|
||||
{
|
||||
PFactory<_Abstract_T, _Key_T>::Register(key, this);
|
||||
}
|
||||
~Worker()
|
||||
{
|
||||
PFactory<_Abstract_T, _Key_T>::Unregister(key);
|
||||
}
|
||||
protected:
|
||||
virtual _Abstract_T *Create(const _Key_T &) const { return new _Concrete_T; }
|
||||
|
||||
private:
|
||||
PString key;
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef H323_REGISTER_CAPABILITY
|
||||
#undef H323_REGISTER_CAPABILITY
|
||||
#endif
|
||||
#define H323_REGISTER_CAPABILITY(cls, capName) static MyPFactory<H323Capability>::Worker<cls> cls##Factory(capName, true)
|
||||
|
||||
#ifdef OPAL_MEDIA_FORMAT_DECLARE
|
||||
#undef OPAL_MEDIA_FORMAT_DECLARE
|
||||
#endif
|
||||
|
||||
#define OPAL_MEDIA_FORMAT_DECLARE(classname, _fullName, _defaultSessionID, _rtpPayloadType, _needsJitter,_bandwidth, _frameSize, _frameTime, _timeUnits, _timeStamp) \
|
||||
class classname : public OpalMediaFormat \
|
||||
{ \
|
||||
public: \
|
||||
classname() \
|
||||
: OpalMediaFormat(_fullName, _defaultSessionID, _rtpPayloadType, _needsJitter, _bandwidth, \
|
||||
_frameSize, _frameTime, _timeUnits, _timeStamp){} \
|
||||
}; \
|
||||
static MyPFactory<OpalMediaFormat>::Worker<classname> classname##Factory(_fullName, true)
|
||||
|
||||
#endif /* !defined AST_H323_H */
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
global:
|
||||
_Z11PAssertFuncPKc;
|
||||
local: *;
|
||||
};
|
@ -1,27 +0,0 @@
|
||||
[general]
|
||||
;context=default ; Context to dump call into
|
||||
;bindaddr=0.0.0.0 ; Address to bind to
|
||||
;externip=127.0.0.1 ; Set your external ip if you are behind a NAT.
|
||||
;stunaddr=mystunserver.com ; Get your external ip from a STUN server.
|
||||
; Note, if the STUN query is successful, this will
|
||||
; replace any value placed in externip;
|
||||
;allowguest=yes ; Allow calls from people not in list of peers
|
||||
;disallow=all
|
||||
;allow=gsm
|
||||
;allow=ulaw
|
||||
;parkinglot=soccer ; Sets the default parking lot for call parking
|
||||
; Parkinglots are configured in features.conf
|
||||
|
||||
;[guest] ; special account for options on guest account
|
||||
;disallow=all
|
||||
;allow=ulaw
|
||||
;context=guest
|
||||
|
||||
;[ogorman]
|
||||
;username=ogorman@gmail.com ; username of the peer your
|
||||
; calling or accepting calls from
|
||||
;disallow=all
|
||||
;allow=ulaw
|
||||
;context=default
|
||||
;connection=asterisk ; client or component in jabber.conf for the
|
||||
; call to leave on.
|
@ -1,39 +0,0 @@
|
||||
[general]
|
||||
;debug=yes ; Enable debugging (disabled by default).
|
||||
;autoprune=yes ; Auto remove users from buddy list. Depending on your
|
||||
; setup (ie, using your personal Gtalk account for a test)
|
||||
; you might lose your contacts list. Default is 'no'.
|
||||
;autoregister=yes ; Auto register users from buddy list.
|
||||
;collection_nodes=yes ; Enable support for XEP-0248 for use with
|
||||
; distributed device state. Default is 'no'.
|
||||
;pubsub_autocreate=yes ; Whether or not the PubSub server supports/is using
|
||||
; auto-create for nodes. If it is, we have to
|
||||
; explicitly pre-create nodes before publishing them.
|
||||
; Default is 'no'.
|
||||
;auth_policy=accept ; Auto accept users' subscription requests (default).
|
||||
; Set to deny for auto denial.
|
||||
;[asterisk]
|
||||
;type=client ; Client or Component connection
|
||||
;serverhost=astjab.org ; Route to server for example, talk.google.com
|
||||
;pubsub_node=pubsub.astjab.org ; Node to use for publishing events via PubSub
|
||||
;username=asterisk@astjab.org/asterisk ; Username with optional resource.
|
||||
;secret=blah ; Password
|
||||
;priority=1 ; Resource priority
|
||||
;port=5222 ; Port to use defaults to 5222
|
||||
;usetls=yes ; Use tls or not
|
||||
;usesasl=yes ; Use sasl or not
|
||||
;buddy=mogorman@astjab.org ; Manual addition of buddy to list.
|
||||
; For distributed events, these buddies are
|
||||
; automatically added in the whitelist as
|
||||
; 'owners' of the node(s).
|
||||
;distribute_events=yes ; Whether or not to distribute events using
|
||||
; this connection. Default is 'no'.
|
||||
;status=available ; One of: chat, available, away, xaway, or dnd
|
||||
;statusmessage="I am available" ; Have custom status message for Asterisk
|
||||
;timeout=5 ; Timeout (in seconds) on the message stack, defaults to 5.
|
||||
; Messages stored longer than this value will be deleted by Asterisk.
|
||||
; This option applies to incoming messages only, which are intended to
|
||||
; be processed by the JABBER_RECEIVE dialplan function.
|
||||
;sendtodialplan=yes ; Send incoming messages into the dialplan. Off by default.
|
||||
;context=messages ; Dialplan context to send incoming messages to. If not set,
|
||||
; "default" will be used.
|
@ -1,20 +0,0 @@
|
||||
;[general]
|
||||
;context=default ;;Context to dump call into
|
||||
;bindaddr=0.0.0.0 ;;Address to bind to
|
||||
;allowguest=yes ;;Allow calls from people not in
|
||||
;;list of peers
|
||||
;
|
||||
;[guest] ;;special account for options on guest account
|
||||
;disallow=all
|
||||
;allow=ulaw
|
||||
;context=guest
|
||||
;
|
||||
;[ogorman]
|
||||
;username=ogorman@gmail.com ;;username of the peer your
|
||||
;;calling or accepting calls from
|
||||
;disallow=all
|
||||
;allow=ulaw
|
||||
;context=default
|
||||
;connection=asterisk ;;client or component in jabber.conf
|
||||
;;for the call to leave on.
|
||||
;
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue