# This only stops targets within the root Makefile from building in parallel.
.NOTPARALLEL:
-
ALL_C_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.c,%,$(wildcard $(p)_*.c)))
ALL_CC_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.cc,%,$(wildcard $(p)_*.cc)))
endif
-
+
C_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_C_MODS))
CC_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_CC_MODS))
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile rules
#
# Copyright (C) 2006-2010, Digium, Inc.
ECHO_PREFIX=@
CMD_PREFIX=@
else
- ECHO_PREFIX=@\#
+ ECHO_PREFIX=@\#
CMD_PREFIX=
endif
Agents:
-* The default for ackcall has been changed to "no" instead of "yes"
+* The default for ackcall has been changed to "no" instead of "yes"
because of a bug which caused the "yes" behavior to generally act like
- "no". You may need to adjust the value if your agents behave
+ "no". You may need to adjust the value if your agents behave
differently than you expect with respect to acknowledgement.
* The AgentCallBackLogin application now requires a second '|' before
Dialing:
-* The Caller*ID of the outbound leg is now the extension that was
- called, rather than the Caller*ID of the inbound leg of the call. The
- "o" flag for Dial can be used to restore the original behavior if
+* The Caller*ID of the outbound leg is now the extension that was
+ called, rather than the Caller*ID of the inbound leg of the call. The
+ "o" flag for Dial can be used to restore the original behavior if
desired. Note that if you are looking for the originating callerid
- from the manager event, there is a new manager event "Dial" which
+ from the manager event, there is a new manager event "Dial" which
provides the source and destination channels and callerid.
-IAX:
+IAX:
-* The naming convention for IAX channels has changed in two ways:
+* The naming convention for IAX channels has changed in two ways:
1. The call number follows a "-" rather than a "/" character.
2. The name of the channel has been simplified to IAX2/peer-callno,
rather than IAX2/peer@peer-callno or even IAX2/peer@peer/callno.
the other channel drivers and to avoid confusion with the "port"
option for users/peers.
-* The "Registry" event now uses "Username" rather than "User" for
+* The "Registry" event now uses "Username" rather than "User" for
consistency with IAX.
Applications:
* With the addition of dialplan functions (which operate similarly
to variables), the SetVar application has been renamed to Set.
-* The CallerPres application has been removed. Use SetCallerPres
+* The CallerPres application has been removed. Use SetCallerPres
instead. It accepts both numeric and symbolic names.
* The applications GetGroupCount, GetGroupMatchCount, SetGroup, and
moved to option 5.
* The application VoiceMailMain now only matches the 'default' context if
- none is specified in the arguments. (This was the previously
+ none is specified in the arguments. (This was the previously
documented behavior, however, we didn't follow that behavior.) The old
behavior can be restored by setting searchcontexts=yes in voicemail.conf.
* A queue is now considered empty not only if there are no members but if
none of the members are available (e.g. agents not logged on). To
- restore the original behavior, use "leavewhenempty=strict" or
+ restore the original behavior, use "leavewhenempty=strict" or
"joinwhenempty=strict" instead of "=yes" for those options.
* It is now possible to use multi-digit extensions in the exit context
Extensions:
* By default, there is a new option called "autofallthrough" in
- extensions.conf that is set to yes. Asterisk 1.0 (and earlier)
- behavior was to wait for an extension to be dialed after there were no
+ extensions.conf that is set to yes. Asterisk 1.0 (and earlier)
+ behavior was to wait for an extension to be dialed after there were no
more extensions to execute. "autofallthrough" changes this behavior
so that the call will immediately be terminated with BUSY,
CONGESTION, or HANGUP based on Asterisk's best guess. If you are
AGI:
-* AGI scripts did not always get SIGHUP at the end, previously. That
- behavior has been fixed. If you do not want your script to terminate
- at the end of AGI being called (e.g. on a hangup) then set SIGHUP to
+* AGI scripts did not always get SIGHUP at the end, previously. That
+ behavior has been fixed. If you do not want your script to terminate
+ at the end of AGI being called (e.g. on a hangup) then set SIGHUP to
be ignored within your application.
* CallerID is reported with agi_callerid and agi_calleridname instead
MeetMe:
* The conference application now allows users to increase/decrease their
- speaking volume and listening volume (independently of each other and
- other users); the 'admin' and 'user' menus have changed, and new sound
- files are included with this release. However, if a user calling in
- over a Zaptel channel that does NOT have hardware DTMF detection
- increases their speaking volume, it is likely they will no longer be
- able to enter/exit the menu or make any further adjustments, as the
- software DTMF detector will not be able to recognize the DTMF coming
+ speaking volume and listening volume (independently of each other and
+ other users); the 'admin' and 'user' menus have changed, and new sound
+ files are included with this release. However, if a user calling in
+ over a Zaptel channel that does NOT have hardware DTMF detection
+ increases their speaking volume, it is likely they will no longer be
+ able to enter/exit the menu or make any further adjustments, as the
+ software DTMF detector will not be able to recognize the DTMF coming
from their device.
GetVar Manager Action:
the configure script was added to the build process (except for having to run
'make' again after the configure script is run). Note that the configure script
does NOT need to be re-run just to rebuild Asterisk; you only need to re-run it
-when your system configuration changes or you wish to build Asterisk with
+when your system configuration changes or you wish to build Asterisk with
different options.
Build Process (module selection):
The Asterisk source tree now includes a basic module selection and build option
selection tool called 'menuselect'. Run 'make menuselect' to make your choices.
In this tool, you can disable building of modules that you don't care about,
-turn on/off global options for the build and see which modules will not
+turn on/off global options for the build and see which modules will not
(and cannot) be built because your system does not have the required external
dependencies installed.
not which ones are not in use.
If you would like to save your choices and have them applied against all
-builds, the file can be copied to '~/.asterisk.makeopts' or
+builds, the file can be copied to '~/.asterisk.makeopts' or
'/etc/asterisk.makeopts'.
Build Process (Makefile targets):
* The (very old and undocumented) ability to use BYEXTENSION for dialing
instead of ${EXTEN} has been removed.
-
+
* Builtin (res_features) transfer functionality attempts to use the context
defined in TRANSFER_CONTEXT variable of the transferer channel first. If
- not set, it uses the transferee variable. If not set in any channel, it will
+ not set, it uses the transferee variable. If not set in any channel, it will
attempt to use the last non macro context. If not possible, it will default
to the current context.
if your dialplan relies on the ability to 'run off the end' of an extension
and wait for a new extension without using WaitExten() to accomplish that,
you will need set autofallthrough to 'no' in your extensions.conf file.
-
+
Command Line Interface:
* 'show channels concise', designed to be used by applications that will parse
* OSPAuth is added to authenticate OSP tokens in in_bound call setup messages.
-* The CONNECT event in the queue_log from app_queue now has a second field
- in addition to the holdtime field. It contains the unique ID of the
- queue member channel that is taking the call. This is useful when trying
- to link recording filenames back to a particular call from the queue.
+* The CONNECT event in the queue_log from app_queue now has a second field
+ in addition to the holdtime field. It contains the unique ID of the
+ queue member channel that is taking the call. This is useful when trying
+ to link recording filenames back to a particular call from the queue.
* The old/current behavior of app_queue has a serial type behavior
in that the queue will make all waiting callers wait in the queue
waits while this happens. This cycle continues until there are
no more available members or waiting callers, whichever comes first.
The new behavior, enabled by setting autofill=yes in queues.conf
- either at the [general] level to default for all queues or
- to set on a per-queue level, makes sure that when the waiting
- callers are connecting with available members in a parallel fashion
+ either at the [general] level to default for all queues or
+ to set on a per-queue level, makes sure that when the waiting
+ callers are connecting with available members in a parallel fashion
until there are no more available members or no more waiting callers,
whichever comes first. This is probably more along the lines of how
- one would expect a queue should work and in most cases, you will want
- to enable this new behavior. If you do not specify or comment out this
- option, it will default to "no" to keep backward compatability with the old
+ one would expect a queue should work and in most cases, you will want
+ to enable this new behavior. If you do not specify or comment out this
+ option, it will default to "no" to keep backward compatability with the old
behavior.
* Queues depend on the channel driver reporting the proper state
call-limit=10
-* The app_queue application now has the ability to use MixMonitor to
+* The app_queue application now has the ability to use MixMonitor to
record conversations queue members are having with queue callers. Please
see configs/queues.conf.sample for more information on this option.
other external program in order to mix the audio.
* app_meetme: The 'm' option (monitor) is renamed to 'l' (listen only), and
- the 'm' option now provides the functionality of "initially muted".
+ the 'm' option now provides the functionality of "initially muted".
In practice, most existing dialplans using the 'm' flag should not notice
- any difference, unless the keypad menu is enabled, allowing the user
+ any difference, unless the keypad menu is enabled, allowing the user
to unmute themsleves.
* ast_play_and_record would attempt to cancel the recording if a DTMF
previously used only by EXTENDED_ODBC_STORAGE. This means that you will need to update
your table format using the schema provided in doc/odbcstorage.txt
-* app_waitforsilence: Fixes have been made to this application which changes the
+* app_waitforsilence: Fixes have been made to this application which changes the
default behavior with how quickly it returns. You can maintain "old-style" behavior
with the addition/use of a third "timeout" parameter.
- Please consult the application documentation and make changes to your dialplan
+ Please consult the application documentation and make changes to your dialplan
if appropriate.
Manager:
until after the release of 1.4, when it will be removed. Please use the time
during the 1.4 release to make this transition.
-* The AgentConnect event now has an additional field called "BridgedChannel"
- which contains the unique ID of the queue member channel that is taking the
- call. This is useful when trying to link recording filenames back to
+* The AgentConnect event now has an additional field called "BridgedChannel"
+ which contains the unique ID of the queue member channel that is taking the
+ call. This is useful when trying to link recording filenames back to
a particular call from the queue.
* app_userevent has been modified to always send Event: UserEvent with the
functions. You are encouraged to move towards the associated dialplan
function, as these variables will be removed in a future release.
-* The CDR-CSV variables uniqueid, userfield, and basing time on GMT are now
+* The CDR-CSV variables uniqueid, userfield, and basing time on GMT are now
adjustable from cdr.conf, instead of recompiling.
* OSP applications exports several new variables, ${OSPINHANDLE},
${OSPOUTHANDLE}, ${OSPINTOKEN}, ${OSPOUTTOKEN}, ${OSPCALLING},
${OSPINTIMELIMIT}, and ${OSPOUTTIMELIMIT}
-
+
* Builtin transfer functionality sets the variable ${TRANSFERERNAME} in the new
created channel. This variables holds the channel name of the transferer.
-* The dial plan variable PRI_CAUSE will be removed from future versions
+* The dial plan variable PRI_CAUSE will be removed from future versions
of Asterisk.
It is replaced by adding a cause value to the hangup() application.
modules.conf file then you will need to explicitly load the modules that
contain the functions you want to use.
-* The ENUMLOOKUP() function with the 'c' option (for counting the number of
- records), but the lookup fails to match any records, the returned value will
+* The ENUMLOOKUP() function with the 'c' option (for counting the number of
+ records), but the lookup fails to match any records, the returned value will
now be "0" instead of blank.
* The REALTIME() function is now available in version 1.4 and app_realtime has
which user you want based on host.
If you would like to go ahead and use the new behavior which doesn't use the
- order in the config file to influence matching order, then change the
+ order in the config file to influence matching order, then change the
MAX_PEER_BUCKETS define in chan_iax2.c to a value greater than one. An
example is provided there. By changing this, you will get *much* better
performance on systems that do a lot of peer and user lookups as they will be
The SIP channel:
-* The "incominglimit" setting is replaced by the "call-limit" setting in
+* The "incominglimit" setting is replaced by the "call-limit" setting in
sip.conf.
-* OSP support code is removed from SIP channel to OSP applications. ospauth
+* OSP support code is removed from SIP channel to OSP applications. ospauth
option in sip.conf is removed to osp.conf as authpolicy. allowguest option
- in sip.conf cannot be set as osp anymore.
+ in sip.conf cannot be set as osp anymore.
* The Asterisk RTP stack has been changed in regards to RFC2833 reception
and transmission. Packets will now be sent with proper duration instead of all
Installation:
* On BSD systems, the installation directories have changed to more "FreeBSDish"
- directories. On startup, Asterisk will look for the main configuration in
+ directories. On startup, Asterisk will look for the main configuration in
/usr/local/etc/asterisk/asterisk.conf
- If you have an old installation, you might want to remove the binaries and
- move the configuration files to the new locations. The following directories
+ If you have an old installation, you might want to remove the binaries and
+ move the configuration files to the new locations. The following directories
are now default:
ASTLIBDIR /usr/local/lib/asterisk
ASTVARLIBDIR /usr/local/share/asterisk
set. When using the "callerid" option for various channel drivers, some
would set ANI and some would not. This has been cleared up so that all
channel drivers set ANI. If you would like to change the callerid number
- on the channel from the dialplan and have that change also show up in the
+ on the channel from the dialplan and have that change also show up in the
CDR, then you *must* set CALLERID(ANI) as well as CALLERID(num).
API:
* format_wav: The GAIN preprocessor definition has been changed from 2 to 0
in Asterisk 1.4. This change was made in response to user complaints of
choppiness or the clipping of loud signal peaks. The GAIN preprocessor
- definition will be retained in Asterisk 1.4, but will be removed in a
+ definition will be retained in Asterisk 1.4, but will be removed in a
future release. The use of GAIN for the increasing of voicemail message
volume should use the 'volgain' option in voicemail.conf
-
sound file installer in the Makefile).
* The ast_expr2 stuff has been modified to handle floating-point numbers.
- Numbers of the format D.D are now acceptable input for the expr parser,
+ Numbers of the format D.D are now acceptable input for the expr parser,
Where D is a string of base-10 digits. All math is now done in "long double",
if it is available on your compiler/architecture. This was half-way between
a bug-fix (because the MATH func returns fp by default), and an enhancement.
of rounding/truncation, along with a set of common floating point operations,
like sin, cos, tan, log, pow, etc. The ability to call external functions
like CDR(), etc. was also added, without having to use the ${...} notation.
-
+
* The delimiter passed to applications has been changed to the comma (','), as
that is what people are used to using within extensions.conf. If you are
using realtime extensions, you will need to translate your existing dialplan
Channel Drivers:
* SIP: a small upgrade to support the "Record" button on the SNOM360,
- which sends a sip INFO message with a "Record: on" or "Record: off"
+ which sends a sip INFO message with a "Record: on" or "Record: off"
header. If Asterisk is set up (via features.conf) to accept "One Touch Monitor"
requests (by default, via '*1'), then the user-configured dialpad sequence
is generated, and recording can be started and stopped via this button. The
now renamed to "counteronpeer".
* SIP: The "username" option is now renamed to "defaultuser" to match "defaultip".
- These are used only before registration to call a peer with the uri
+ These are used only before registration to call a peer with the uri
sip:defaultuser@defaultip
- The "username" setting still work, but is deprecated and will not work in
+ The "username" setting still work, but is deprecated and will not work in
the next version of Asterisk.
* SIP: The old "insecure" options, deprecated in 1.4, have been removed.
Configuration:
* pbx_dundi.c: tos parameter changed to use new values. Old values like lowdelay,
- lowcost and other is not acceptable now. Look into qos.tex for description of
+ lowcost and other is not acceptable now. Look into qos.tex for description of
this parameter.
* queues.conf: the queue-lessthan sound file option is no longer available, and the
Manager:
-* Manager has been upgraded to version 1.1 with a lot of changes.
+* Manager has been upgraded to version 1.1 with a lot of changes.
Please check doc/manager_1_1.txt for information
* The IAXpeers command output has been changed to more closely resemble the
it is set to load. If not, then any module which uses RTP (such as chan_sip)
will not be able to send or receive calls.
-* The app_dahdiscan.c file has been removed, but the dialplan app DAHDIScan still
- remains. It now exists within app_chanspy.c and retains the exact same
- functionality as before.
+* The app_dahdiscan.c file has been removed, but the dialplan app DAHDIScan still
+ remains. It now exists within app_chanspy.c and retains the exact same
+ functionality as before.
* The default behavior for Set, AGI, and pbx_realtime has been changed to implement
1.6 behavior by default, if there is no [compat] section in asterisk.conf. In
* ExternalIVR will now send Z events for invalid or missing files, T events
now include the interrupted file and bugs in argument parsing have been
fixed so there may be arguments specified in incorrect ways that were
- working that will no longer work. Please see
+ working that will no longer work. Please see
https://wiki.asterisk.org/wiki/display/AST/External+IVR+Interface for details.
* OSP lookup application changes following variable names:
* SIP no longer sends the 183 progress message for early media by
default. Applications requiring early media should use the
- progress() dialplan app to generate the progress message.
+ progress() dialplan app to generate the progress message.
* The firmware for the IAXy has been removed from Asterisk. It can be
downloaded from http://downloads.digium.com/pub/iaxy/. To have Asterisk
* DAHDISendCallreroutingFacility() parameters are now comma-separated,
instead of the old pipe.
-* res_jabber: autoprune has been disabled by default, to avoid misconfiguration
- that would end up being interpreted as a bug once Asterisk started removing
+* res_jabber: autoprune has been disabled by default, to avoid misconfiguration
+ that would end up being interpreted as a bug once Asterisk started removing
the contacts from a user list.
* The cdr.conf file must exist and be configured correctly in order for CDR
* If you use ODBC storage for voicemail, there is a new field called "flag"
which should be a char(8) or larger. This field specifies whether or not a
message has been designated to be "Urgent", "PRIORITY", or not.
-
convert an existing astdb to the SQLite3 version automatically at runtime.
Module Support Level
- - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
+ - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
formats, funcs, pbx, and res have been updated to include MODULEINFO data
that includes <support_level> tags with a value of core, extended, or deprecated.
- More information is available on the Asterisk wiki at
+ More information is available on the Asterisk wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
Deprecated modules are now marked to not build by default and must be explicitly
configuration option. Symptoms of this include one way media or no media flow.
chan_unistim
- - Due to massive update in chan_unistim phone keys functions and on-screen
+ - Due to massive update in chan_unistim phone keys functions and on-screen
information changed.
users.conf:
unchanged.
Module Support Level
- - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
+ - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
formats, funcs, pbx, and res have been updated to include MODULEINFO data
that includes <support_level> tags with a value of core, extended, or deprecated.
- More information is available on the Asterisk wiki at
+ More information is available on the Asterisk wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
Deprecated modules are now marked to not build by default and must be explicitly
- Configuration is found in res_parking.conf. It is no longer supported in
features.conf
- - The arguments for the Park, ParkedCall, and ParkAndAnnounce applications
- have been modified significantly. See the application documents for
+ - The arguments for the Park, ParkedCall, and ParkAndAnnounce applications
+ have been modified significantly. See the application documents for
specific details.
- Numerous changes to Parking related applications, AMI and CLI commands and
- internal inter-workings have been made. Please read the CHANGES file for
+ internal inter-workings have been made. Please read the CHANGES file for
the detailed list.
Security Events Framework:
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page app_mysql.conf app_mysql.conf
* \verbinclude app_mysql.conf.sample
*/
unsigned int port = 0;
char *port_str;
char *parse = ast_strdupa(data);
-
+
AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
if (args.argc < 6) {
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
}
AST_MODULE_INFO_STANDARD_DEPRECATED(ASTERISK_GPL_KEY, "Simple Mysql Interface");
-
.unload = unload_module,
.reload = reload,
);
-
* at the top of the source tree.
*/
-/*!
+/*!
* \file
* \brief Bluetooth Mobile Device channel driver
*
* \verbatim
* \r\n<result code>\r\n
* <at command>\r
- * \r\n>
+ * \r\n>
* \endverbatim
*
* These formats correspond to AT result codes, AT commands, and the AT SMS
int index = -1;
/* parse cmti info in the following format:
- * +CMTI: <mem>,<index>
+ * +CMTI: <mem>,<index>
*/
if (!sscanf(buf, "+CMTI: %*[^,],%d", &index)) {
ast_debug(2, "[%s] error parsing CMTI event '%s'\n", hfp->owner->id, buf);
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
static enum ast_rtp_glue_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp);
static enum ast_rtp_glue_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp);
-static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *rtp,
+static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *rtp,
struct ast_rtp_instance *vrtp, struct ast_rtp_instance *trtp, const struct ast_format_cap *codecs, int nat_active);
static void ooh323_get_codec(struct ast_channel *chan, struct ast_format_cap *result);
void setup_rtp_remote(ooCallData *call, const char *remoteIp, int remotePort);
char callee_dialedDigits[AST_MAX_EXTENSION];
char callee_email[AST_MAX_EXTENSION];
char callee_url[AST_MAX_EXTENSION];
-
+
int port;
struct ast_format *readformat; /* negotiated read format */
struct ast_format *writeformat; /* negotiated write format */
static struct ast_sched_context *sched;
static struct io_context *io;
-/* Protect the monitoring thread, so only one process can kill or start it,
+/* Protect the monitoring thread, so only one process can kill or start it,
and not when it's doing something critical. */
AST_MUTEX_DEFINE_STATIC(monlock);
static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
- const char *host, struct ast_format_cap *cap,
+ const char *host, struct ast_format_cap *cap,
const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
struct ast_format_cap *caps = NULL;
/* Don't hold a h323 pvt lock while we allocate a channel */
ast_mutex_unlock(&i->lock);
ast_mutex_lock(&ooh323c_cn_lock);
- ch = ast_channel_alloc(1, state, i->callerid_num, i->callerid_name,
+ ch = ast_channel_alloc(1, state, i->callerid_num, i->callerid_name,
i->accountcode, i->exten, i->context, assignedids, requestor, i->amaflags,
"OOH323/%s-%ld", host, callnumber);
callnumber++;
ast_mutex_unlock(&ooh323c_cn_lock);
-
+
ast_mutex_lock(&i->lock);
if (ch && caps) {
ast_channel_priority_set(ch, 1);
if(!ast_test_flag(i, H323_OUTGOING)) {
-
+
if (!ast_strlen_zero(i->caller_h323id)) {
pbx_builtin_setvar_helper(ch, "_CALLER_H323ID", i->caller_h323id);
}
if (!ast_strlen_zero(i->caller_dialedDigits)) {
- pbx_builtin_setvar_helper(ch, "_CALLER_H323DIALEDDIGITS",
+ pbx_builtin_setvar_helper(ch, "_CALLER_H323DIALEDDIGITS",
i->caller_dialedDigits);
}
if (!ast_strlen_zero(i->caller_email)) {
- pbx_builtin_setvar_helper(ch, "_CALLER_H323EMAIL",
+ pbx_builtin_setvar_helper(ch, "_CALLER_H323EMAIL",
i->caller_email);
}
if (!ast_strlen_zero(i->caller_url)) {
if (!ast_strlen_zero(i->accountcode))
ast_channel_accountcode_set(ch, i->accountcode);
-
+
if (i->amaflags)
ast_channel_amaflags_set(ch, i->amaflags);
ast_channel_unlock(ch);
ast_hangup(ch);
ch = NULL;
- }
+ }
}
if (ch) {
-static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken)
+static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken)
{
struct ooh323_pvt *pvt = NULL;
pvt->aniasdni = gANIasDNI;
- ast_mutex_unlock(&pvt->lock);
+ ast_mutex_unlock(&pvt->lock);
/* Add to interface list */
ast_mutex_lock(&iflock);
pvt->next = iflist;
struct ast_channel *chan = NULL;
struct ooh323_pvt *p = NULL;
struct ooh323_peer *peer = NULL;
- char *dest = NULL;
+ char *dest = NULL;
char *ext = NULL;
char tmp[256];
int port = 0;
dest = strchr(tmp, '/');
- if (dest) {
+ if (dest) {
*dest = '\0';
dest++;
ext = dest;
chan = ooh323_new(p, AST_STATE_DOWN, p->username, cap,
assignedids, requestor);
-
+
ast_mutex_unlock(&p->lock);
if (!chan) {
struct ooh323_peer *find_friend(const char *name, int port)
{
- struct ooh323_peer *peer;
+ struct ooh323_peer *peer;
if (gH323Debug)
ast_verb(0, "--- find_friend \"%s\"\n", name);
ast_verb(0, "+++ find_friend \"%s\"\n", name);
}
- return peer;
+ return peer;
}
ast_verb(0, "+++ find_peer \"%s\"\n", name);
}
- return peer;
+ return peer;
}
static int ooh323_digit_begin(struct ast_channel *chan, char digit)
char dtmf[2];
struct ooh323_pvt *p = (struct ooh323_pvt *) ast_channel_tech_pvt(chan);
int res = 0;
-
+
if (gH323Debug)
ast_verb(0, "--- ooh323_digit_begin\n");
if ((val = pbx_builtin_getvar_helper(ast, "CALLER_H323ID"))) {
ast_copy_string(p->caller_h323id, val, sizeof(p->caller_h323id));
}
-
+
if ((val = pbx_builtin_getvar_helper(ast, "CALLER_H323DIALEDDIGITS"))) {
ast_copy_string(p->caller_dialedDigits, val, sizeof(p->caller_dialedDigits));
if(!p->callerid_num)
if (gH323Debug)
ast_verb(0, " hanging %s with cause: %d\n", p->username, q931cause);
- ast_channel_tech_pvt_set(ast, NULL);
+ ast_channel_tech_pvt_set(ast, NULL);
if (!ast_test_flag(p, H323_ALREADYGONE)) {
- ooHangCall(p->callToken,
+ ooHangCall(p->callToken,
ooh323_convert_hangupcause_asteriskToH323(q931cause), q931cause);
ast_set_flag(p, H323_ALREADYGONE);
/* ast_mutex_unlock(&p->lock); */
- } else
+ } else
ast_set_flag(p, H323_NEEDDESTROY);
/* detach channel here */
if (p->owner) {
/* Notify the module monitors that use count for resource has changed */
ast_update_use_count();
-
+
} else {
ast_debug(1, "No call to hangup\n" );
}
-
+
if (gH323Debug)
ast_verb(0, "+++ ooh323_hangup\n");
ast_channel_lock(ast);
if (!p->alertsent) {
if (gH323Debug) {
- ast_debug(1, "Sending forced ringback for %s, res = %u\n",
+ ast_debug(1, "Sending forced ringback for %s, res = %u\n",
callToken, ooManualRingback(callToken));
} else {
ooManualRingback(callToken);
return res;
}
-
+
if (f->frametype == AST_FRAME_VOICE) {
/* sending progress for first */
if (!ast_test_flag(p, H323_OUTGOING) && !p->progsent &&
ast_mutex_unlock(&p->lock);
return 0;
} else {
- ast_log(LOG_WARNING, "Can't send %u type frames with OOH323 write\n",
+ ast_log(LOG_WARNING, "Can't send %u type frames with OOH323 write\n",
f->frametype);
ast_mutex_unlock(&p->lock);
return 0;
if (gH323Debug) {
ast_verb(0, "----- ooh323_indicate %d on call %s\n", condition, callToken);
}
-
+
ast_mutex_lock(&p->lock);
switch (condition) {
case AST_CONTROL_INCOMPLETE:
if (!p->progsent) {
if (gH323Debug) {
ast_debug(1, "Sending manual progress for %s, res = %u\n", callToken,
- ooManualProgress(callToken));
+ ooManualProgress(callToken));
} else {
ooManualProgress(callToken);
}
if (gH323Debug)
ast_verb(0, "----- ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
-
+
switch (option) {
case AST_OPTION_T38_STATE:
if (gH323Debug)
ast_verb(0, "+++++ ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
-
+
ast_mutex_unlock(&p->lock);
return res;
struct ooh323_pvt *p = NULL;
if (gH323Debug)
- ast_verb(0, "--- ooh323_update_writeformat %s/%d\n",
+ ast_verb(0, "--- ooh323_update_writeformat %s/%d\n",
ast_format_get_name(fmt), txframes);
-
+
p = find_call(call);
if (!p) {
ast_log(LOG_ERROR, "No matching call found for %s\n", call->callToken);
}
if (gH323Debug) {
struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
- ast_verb(0, "Writeformat before update %s/%s\n",
+ ast_verb(0, "Writeformat before update %s/%s\n",
ast_format_get_name(ast_channel_writeformat(p->owner)),
ast_format_cap_get_names(ast_channel_nativeformats(p->owner), &codec_buf));
}
struct ooh323_pvt *p = NULL;
if (gH323Debug)
- ast_verb(0, "--- ooh323_update_readformat %s\n",
+ ast_verb(0, "--- ooh323_update_readformat %s\n",
ast_format_get_name(fmt));
-
+
p = find_call(call);
if (!p) {
ast_log(LOG_ERROR, "No matching call found for %s\n", call->callToken);
}
if (gH323Debug) {
- ast_verb(0, "Readformat before update %s\n",
+ ast_verb(0, "Readformat before update %s\n",
ast_format_get_name(ast_channel_readformat(p->owner)));
}
ast_format_cap_append(caps, fmt, 0);
if(!p) {
ast_log(LOG_ERROR, "No matching call found\n");
return -1;
- }
+ }
ast_mutex_lock(&p->lock);
if (!p->owner) {
ast_mutex_unlock(&p->lock);
if(!p) {
ast_log(LOG_ERROR, "No matching call found\n");
return -1;
- }
+ }
ast_mutex_lock(&p->lock);
if (!p->owner) {
ast_mutex_unlock(&p->lock);
}
ast_mutex_lock(&p->lock);
ast_clear_flag(p, H323_OUTGOING);
-
+
if (call->remoteDisplayName) {
p->callerid_name = ast_strdup(call->remoteDisplayName);
{
if(!p->callerid_num)
p->callerid_num = ast_strdup(alias->value);
- ast_copy_string(p->caller_dialedDigits, alias->value,
+ ast_copy_string(p->caller_dialedDigits, alias->value,
sizeof(p->caller_dialedDigits));
}
else if(alias->type == T_H225AliasAddress_email_ID)
if (user->rtpmask && user->rtpmaskstr[0]) {
p->rtpmask = user->rtpmask;
- ast_copy_string(p->rtpmaskstr, user->rtpmaskstr,
+ ast_copy_string(p->rtpmaskstr, user->rtpmaskstr,
sizeof(p->rtpmaskstr));
}
if (user->rtdrcount > 0 && user->rtdrinterval > 0) {
ooCallSetCallerId(call, p->callerid_num);
}
}
-
+
if (!ast_strlen_zero(p->caller_h323id))
ooCallAddAliasH323ID(call, p->caller_h323id);
ooCallSetCallerId(call, p->callerid_num);
}
}
-
+
if (!ast_strlen_zero(p->caller_h323id))
ooCallAddAliasH323ID(call, p->caller_h323id);
ooCallAddAliasH323ID(call, p->callerid_num);
}
}
-
+
if (!ast_strlen_zero(p->exten)) {
if (ooIsDailedDigit(p->exten)) {
if (gH323Debug) {
struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
- ast_verb(0, " Outgoing call %s(%s) - Codec prefs - %s\n",
+ ast_verb(0, " Outgoing call %s(%s) - Codec prefs - %s\n",
p->username?p->username:"NULL", call->callToken,
ast_format_cap_get_names(p->cap, &codec_buf));
}
ast_log(LOG_ERROR, "Channel has no owner\n");
return -1;
}
-
+
while (p->owner && ast_channel_trylock(p->owner)) {
ast_debug(1, "Failed to grab lock, trying again\n");
DEADLOCK_AVOIDANCE(&p->lock);
if ((p = find_call(call))) {
ast_mutex_lock(&p->lock);
-
+
while (p->owner) {
if (ast_channel_trylock(p->owner)) {
ooTrace(OOTRCLVLINFO, "Failed to grab lock, trying again\n");
}
if (ownerLock) {
- if (!ast_test_flag(p, H323_ALREADYGONE)) {
+ if (!ast_test_flag(p, H323_ALREADYGONE)) {
ast_set_flag(p, H323_ALREADYGONE);
ast_channel_hangupcause_set(p->owner, call->q931cause);
if (gH323Debug)
ast_verb(0, "--- ooh323_delete_user\n");
- if (user) {
+ if (user) {
cur = userl.users;
ast_mutex_lock(&userl.lock);
while (cur) {
ast_mutex_unlock(&userl.lock);
ast_free(user);
- }
+ }
if (gH323Debug)
ast_verb(0, "+++ ooh323_delete_user\n");
if (gH323Debug)
ast_verb(0, "--- ooh323_delete_peer\n");
- if (peer) {
+ if (peer) {
cur = peerl.peers;
ast_mutex_lock(&peerl.lock);
while(cur) {
ao2_cleanup(peer->cap);
ast_free(peer);
- }
+ }
if (gH323Debug)
ast_verb(0, "+++ ooh323_delete_peer\n");
user->rtptimeout = gRTPTimeout;
} else if (!strcasecmp(v->name, "rtpmask")) {
if ((user->rtpmask = ast_calloc(1, sizeof(struct OOH323Regex))) &&
- (regcomp(&user->rtpmask->regex, v->value, REG_EXTENDED)
+ (regcomp(&user->rtpmask->regex, v->value, REG_EXTENDED)
== 0)) {
ast_mutex_init(&user->rtpmask->lock);
user->rtpmask->inuse = 1;
- ast_copy_string(user->rtpmaskstr, v->value,
+ ast_copy_string(user->rtpmaskstr, v->value,
sizeof(user->rtpmaskstr));
} else user->rtpmask = NULL;
} else if (!strcasecmp(v->name, "disallow")) {
struct ast_sockaddr p;
if (!ast_parse_arg(v->value, PARSE_ADDR, &p)) {
ast_copy_string(user->mIP, ast_sockaddr_stringify_addr(&p), sizeof(user->mIP)-1);
- } else {
+ } else {
ast_copy_string(user->mIP, v->value, sizeof(user->mIP)-1);
}
user->mUseIP = 1;
struct ast_sockaddr p;
if (!ast_parse_arg(v->value, PARSE_ADDR, &p)) {
ast_copy_string(peer->ip, ast_sockaddr_stringify_host(&p), sizeof(peer->ip));
- } else {
+ } else {
ast_copy_string(peer->ip, v->value, sizeof(peer->ip));
}
-
+
} else if (!strcasecmp(v->name, "outgoinglimit")) {
peer->outgoinglimit = atoi(v->value);
if (peer->outgoinglimit < 0)
peer->rtptimeout = gRTPTimeout;
} else if (!strcasecmp(v->name, "rtpmask")) {
if ((peer->rtpmask = ast_calloc(1, sizeof(struct OOH323Regex))) &&
- (regcomp(&peer->rtpmask->regex, v->value, REG_EXTENDED)
+ (regcomp(&peer->rtpmask->regex, v->value, REG_EXTENDED)
== 0)) {
ast_mutex_init(&peer->rtpmask->lock);
peer->rtpmask->inuse = 1;
- ast_copy_string(peer->rtpmaskstr, v->value,
+ ast_copy_string(peer->rtpmaskstr, v->value,
sizeof(peer->rtpmaskstr));
} else peer->rtpmask = NULL;
} else if (!strcasecmp(v->name, "disallow")) {
reload_config(1);
/* Gatekeeper */
- if (gRasGkMode == RasUseSpecificGatekeeper ||
+ if (gRasGkMode == RasUseSpecificGatekeeper ||
gRasGkMode == RasDiscoverGatekeeper) {
- ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
+ ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
gGatekeeper : 0, 0);
ooGkClientStart(gH323ep.gkClient);
}
case T_H225AliasAddress_h323_ID:
ooH323EpAddAliasH323ID(pNewAlias->value);
break;
- case T_H225AliasAddress_dialedDigits:
+ case T_H225AliasAddress_dialedDigits:
ooH323EpAddAliasDialedDigits(pNewAlias->value);
break;
- case T_H225AliasAddress_email_ID:
+ case T_H225AliasAddress_email_ID:
ooH323EpAddAliasEmailID(pNewAlias->value);
break;
default:
v = v->next;
continue;
}
-
+
if (!strcasecmp(v->name, "port")) {
gPort = (int)strtol(v->value, NULL, 10);
} else if (!strcasecmp(v->name, "bindaddr")) {
gMediaWaitForConnect = ast_true(v->value);
if (gMediaWaitForConnect)
ooH323EpEnableMediaWaitForConnect();
- else
+ else
ooH323EpDisableMediaWaitForConnect();
} else if (!strcasecmp(v->name, "h245tunneling")) {
gTunneling = ast_true(v->value);
gBeMaster = ast_true(v->value);
if (gBeMaster)
ooH323EpTryBeMaster(1);
- else
+ else
ooH323EpTryBeMaster(0);
} else if (!strcasecmp(v->name, "h323id")) {
pNewAlias = ast_calloc(1, sizeof(struct ooAliases));
else if (!strcasecmp(v->value, "h245signal"))
gDTMFMode = H323_DTMF_H245SIGNAL;
else {
- ast_log(LOG_WARNING, "Unknown dtmf mode '%s', using rfc2833\n",
+ ast_log(LOG_WARNING, "Unknown dtmf mode '%s', using rfc2833\n",
v->value);
gDTMFMode = H323_DTMF_RFC2833;
}
}
v = v->next;
}
-
+
for (cat = ast_category_browse(cfg, NULL); cat; cat = ast_category_browse(cfg, cat)) {
if (strcasecmp(cat, "general")) {
int friend_type = 0;
{
char ip_port[64];
struct ooh323_peer *prev = NULL, *peer = NULL;
-
+
switch (cmd) {
case CLI_INIT:
e->command = "ooh323 show peer";
while (peer) {
ast_mutex_lock(&peer->lock);
snprintf(ip_port, sizeof(ip_port), "%s:%hu", peer->ip, peer->port);
- ast_cli(a->fd, FORMAT, peer->name,
+ ast_cli(a->fd, FORMAT, peer->name,
peer->accountcode,
ip_port,
ast_format_cap_get_names(peer->cap, &codec_buf));
while(user)
{
ast_mutex_lock(&user->lock);
- ast_cli(a->fd, FORMAT1, user->name,
+ ast_cli(a->fd, FORMAT1, user->name,
user->accountcode, user->context,
ast_format_cap_get_names(user->cap, &codec_buf));
prev = user;
.onMediaChanged = (cb_OnMediaChanged) setup_rtp_remote,
};
if (!(gCap = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
- return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_DECLINE;
}
if (!(ooh323_tech.capabilities = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
ao2_ref(gCap, -1);
ast_mutex_init(&userl.lock);
peerl.peers = NULL;
ast_mutex_init(&peerl.lock);
-
-#if 0
+
+#if 0
ast_register_atexit(&ast_ooh323c_exit);
#endif
if (!reload_config(0)) {
- /* fire up the H.323 Endpoint */
+ /* fire up the H.323 Endpoint */
if (OO_OK != ooH323EpInitialize(OO_CALLMODE_AUDIOCALL, gLogFile)) {
ast_log(LOG_ERROR, "Failed to initialize OOH323 endpoint-"
"OOH323 Disabled\n");
ast_debug(1, "OOH323 channel is in IP6 mode\n");
}
ooH323EpSetCallerID(gCallerID);
-
+
if(ooH323EpSetTCPPortRange(ooconfig.mTCPPortStart, ooconfig.mTCPPortEnd) == OO_FAILED) {
ast_log(LOG_ERROR, "h225portrange: Failed to set range\n");
}
case T_H225AliasAddress_h323_ID:
ooH323EpAddAliasH323ID(pNewAlias->value);
break;
- case T_H225AliasAddress_dialedDigits:
+ case T_H225AliasAddress_dialedDigits:
ooH323EpAddAliasDialedDigits(pNewAlias->value);
break;
- case T_H225AliasAddress_email_ID:
+ case T_H225AliasAddress_email_ID:
ooH323EpAddAliasEmailID(pNewAlias->value);
break;
default:
peer = peer->next;
}
ast_mutex_unlock(&peerl.lock);
-
+
if (gMediaWaitForConnect)
ooH323EpEnableMediaWaitForConnect();
- else
+ else
ooH323EpDisableMediaWaitForConnect();
/* Fast start and tunneling options */
ooh323_tech.capabilities = NULL;
return 1;
}
-
+
/* Create H.323 listener */
if (ooCreateH323Listener() != OO_OK) {
ast_log(LOG_ERROR, "OOH323 Listener Creation failure. "
"OOH323 DISABLED\n");
-
+
ooH323EpDestroy();
ao2_ref(gCap, -1);
gCap = NULL;
if (gH323ep.gkClient && gH323ep.gkClient->state == GkClientStopped) {
ooGkClientDestroy();
ast_verb(0, "Restart stopped gatekeeper client\n");
- ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
+ ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
gGatekeeper : 0, 0);
ooGkClientStart(gH323ep.gkClient);
}
ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n", ast_channel_name(h323->owner), (long) (t - h323->lastrtprx));
ast_channel_unlock(h323->owner);
}
-
+
}
if (ast_test_flag(h323, H323_NEEDDESTROY)) {
iflist = cur->next;
if (cur->callToken) {
- if (gH323Debug)
+ if (gH323Debug)
ast_verb(0, " Destroying %s\n", cur->callToken);
ast_free(cur->callToken);
cur->callToken = 0;
ast_free(cur->callerid_name);
cur->callerid_name = 0;
}
-
+
if (cur->callerid_num) {
ast_free(cur->callerid_num);
cur->callerid_num = 0;
ast_udptl_destroy(cur->udptl);
cur->udptl = NULL;
}
-
+
/* Unlink us from the owner if we have one */
if (cur->owner) {
while(ast_channel_trylock(cur->owner)) {
ast_debug(1, "Failed to grab lock, trying again\n");
DEADLOCK_AVOIDANCE(&cur->lock);
- }
+ }
ast_debug(1, "Detaching from %s\n", ast_channel_name(cur->owner));
ast_channel_tech_pvt_set(cur->owner, NULL);
ast_channel_unlock(cur->owner);
cur->owner = NULL;
ast_module_unref(myself);
}
-
+
if (cur->vad) {
ast_dsp_free(cur->vad);
cur->vad = NULL;
if (gH323Debug) {
ast_verb(0, " unload_module - stopping monitor thread\n");
- }
+ }
if (monitor_thread != AST_PTHREADT_NULL) {
if (!ast_mutex_lock(&monlock)) {
if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) {
ast_log(LOG_WARNING, "Unable to lock the interface list\n");
return -1;
}
-
+
if (gH323Debug) {
ast_verb(0, " unload_module - deleting users\n");
ast_rtp_instance_set_timeout(p->rtp, p->rtptimeout);
}
ast_rtp_instance_set_prop(p->rtp, AST_RTP_PROPERTY_RTCP, 1);
-
+
}
if (p->rtdrcount) {
udptl handling functions
*/
-void setup_udptl_connection(ooCallData *call, const char *remoteIp,
+void setup_udptl_connection(ooCallData *call, const char *remoteIp,
int remotePort)
{
struct ooh323_pvt *p = NULL;
ast_verb(0, "--- setup_udptl_connection\n");
/* Find the call or allocate a private structure if call not found */
- p = find_call(call);
+ p = find_call(call);
if (!p) {
ast_log(LOG_ERROR, "Something is wrong: rtp\n");
{
int updated = -1;
ooAliases *psAlias = NULL;
-
+
if (!call->ourAliases)
return updated;
for (psAlias = call->ourAliases; psAlias; psAlias = psAlias->next) {
updated = 1;
}
if (psAlias->type == T_H225AliasAddress_dialedDigits) {
- ast_copy_string(p->callee_dialedDigits, psAlias->value,
+ ast_copy_string(p->callee_dialedDigits, psAlias->value,
sizeof(p->callee_dialedDigits));
updated = 1;
}
}
parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
parameters.rate = AST_T38_RATE_14400;
- ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
+ ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
¶meters, sizeof(parameters));
p->faxmode = 1;
parameters.request_response = AST_T38_REQUEST_TERMINATE;
parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
parameters.rate = AST_T38_RATE_14400;
- ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
+ ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
¶meters, sizeof(parameters));
}
p->faxmode = 0;
switch (cause) {
case OO_REASON_REMOTE_REJECTED:
return AST_CAUSE_CALL_REJECTED;
- case OO_REASON_NOUSER:
+ case OO_REASON_NOUSER:
return AST_CAUSE_UNALLOCATED;
case OO_REASON_REMOTE_BUSY:
case OO_REASON_LOCAL_BUSY:
return AST_CAUSE_CONGESTION;
case OO_REASON_REMOTE_NOANSWER:
return AST_CAUSE_NO_ANSWER;
- case OO_REASON_UNKNOWN:
+ case OO_REASON_UNKNOWN:
case OO_REASON_INVALIDMESSAGE:
case OO_REASON_TRANSPORTFAILURE:
return AST_CAUSE_FAILURE;
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/* Helper functions */
struct ooh323_user *find_user(const char * name, const char *ip);
struct ooh323_peer *find_peer(const char * name, int port);
-void ooh323_delete_peer(struct ooh323_peer *peer);
+void ooh323_delete_peer(struct ooh323_peer *peer);
int delete_users(void);
int delete_peers(void);
int restart_monitor(void);
int configure_local_rtp(struct ooh323_pvt *p, ooCallData* call);
-void setup_rtp_connection(ooCallData *call, const char *remoteIp,
+void setup_rtp_connection(ooCallData *call, const char *remoteIp,
int remotePort);
void close_rtp_connection(ooCallData *call);
struct ast_frame *ooh323_rtp_read
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "MP3 format [Any rate but 8000hz mono is optimal]");
-
Objective Open H.323 stack is a simple H.323 implementation in C. This
package contains the core stack code. For complete H.323 stack package with
examples or for more information visit www.obj-sys.com/open
- The ASN.1 messaging code was developed using the Objective Systems ASN1C
-compiler to implement the core H.323 specifications (H.225, H.235,
-and H.245). Additional code was then developed which makes use of
-the compiler generated code for presenting a comparatively high level
+ The ASN.1 messaging code was developed using the Objective Systems ASN1C
+compiler to implement the core H.323 specifications (H.225, H.235,
+and H.245). Additional code was then developed which makes use of
+the compiler generated code for presenting a comparatively high level
stack API.
Features
Features supported in this package include the following:
-* H.225/Q.931 - the following message types are supported (including
- support for FastStart and H.245 tunneling):
- - Setup
+* H.225/Q.931 - the following message types are supported (including
+ support for FastStart and H.245 tunneling):
+ - Setup
- Connect
- Call Proceeding
- - Alerting
+ - Alerting
- Facility
- ReleaseComplete
To run the stack test application chansetup
chansetup - This is a sample program developed for testing multiple calls.
This program allows stack testing by placing multiple calls. The number of
- calls, duration of each call and interval between successive calls are
- configurable.
+ calls, duration of each call and interval between successive calls are
+ configurable.
1. Two instances of this program have to be run. Can be run on same machine or
different machines.
cd tests/chansetup
-2. For running listener instance,
+2. For running listener instance,
./h323peer [--use-ip ip] [--use-port port]
- where local ip address and port can be specified for listening to incoming
+ where local ip address and port can be specified for listening to incoming
calls. By default, application determines ip address and uses default H323
port number 1720.
3. For running calling instance
-
+
./h323peer [--use-ip ip] -n <number of calls> -duration <call duration>
-interval <inetrval between successive calls> destination
-
+
where all times are in seconds. Interval of 0 means next call will be placed
after current call finishes. "destination" is the dotted ip address of the
endpoint running listener instance.
Reporting Problems:
-Report problems you encounter by sending E-mail to support@obj-sys.com.
+Report problems you encounter by sending E-mail to support@obj-sys.com.
If you have any further questions or comments on what you would like to
-see in the product or what is difficult to use or understand, please
+see in the product or what is difficult to use or understand, please
communicate them to us. Your feedback is important to us. Please let us
-know how it works out for you - either good or bad.
-
+know how it works out for you - either good or bad.
INCLUDES = -Ih323
-#include_HEADERS = ooUtils.h memheap.h ooCommon.h ooDateTime.h ooGkClient.h ooasn1.h oochannels.h ootrace.h ooh245.h ooports.h ooq931.h oohdr.h ooper.h ooSocket.h ooTimer.h ootypes.h eventHandler.h ooCapability.h ooCalls.h ooStackCmds.h ooh323.h ooh323ep.h printHandler.h rtctype.h h323/H235-SECURITY-MESSAGES.h h323/H323-MESSAGES.h h323/MULTIMEDIA-SYSTEM-CONTROL.h
+#include_HEADERS = ooUtils.h memheap.h ooCommon.h ooDateTime.h ooGkClient.h ooasn1.h oochannels.h ootrace.h ooh245.h ooports.h ooq931.h oohdr.h ooper.h ooSocket.h ooTimer.h ootypes.h eventHandler.h ooCapability.h ooCalls.h ooStackCmds.h ooh323.h ooh323ep.h printHandler.h rtctype.h h323/H235-SECURITY-MESSAGES.h h323/H323-MESSAGES.h h323/MULTIMEDIA-SYSTEM-CONTROL.h
EXTRA_DIST = oostk.dsp
subdir = ooh323c/src
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
h323/MULTIMEDIA-SYSTEM-CONTROLDec.c
MULTIMEDIA-SYSTEM-CONTROLEnc.$(OBJEXT): \
h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
-libooh323c.a: $(libooh323c_a_OBJECTS) $(libooh323c_a_DEPENDENCIES)
+libooh323c.a: $(libooh323c_a_OBJECTS) $(libooh323c_a_DEPENDENCIES)
-rm -f libooh323c.a
$(libooh323c_a_AR) libooh323c.a $(libooh323c_a_OBJECTS) $(libooh323c_a_LIBADD)
$(RANLIB) libooh323c.a
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
return ASN_OK;
}
-int initContextBuffer
+int initContextBuffer
(OOCTXT* pctxt, const ASN1OCTET* bufaddr, ASN1UINT bufsiz)
{
if (bufaddr == 0) {
/* dynamic buffer */
if (bufsiz == 0) bufsiz = ASN_K_ENCBUFSIZ;
- pctxt->buffer.data = (ASN1OCTET*)
+ pctxt->buffer.data = (ASN1OCTET*)
memHeapAlloc (&pctxt->pMsgMemHeap, bufsiz);
if (!pctxt->buffer.data) return ASN_E_NOMEM;
pctxt->buffer.size = bufsiz;
return ASN_OK;
}
-int initSubContext (OOCTXT* pctxt, OOCTXT* psrc)
+int initSubContext (OOCTXT* pctxt, OOCTXT* psrc)
{
/* ast_mutex_lock(&pctxt->pLock); */
int stat = ASN_OK;
ASN1BOOL saveBuf;
ast_mutex_lock(&pctxt->pLock);
saveBuf = (pctxt->flags & ASN1SAVEBUF) != 0;
-
+
if (pctxt->buffer.dynamic && pctxt->buffer.data) {
if (saveBuf) {
memHeapMarkSaved (&pctxt->pMsgMemHeap, pctxt->buffer.data, TRUE);
{
int stat;
ast_mutex_lock(&pTarget->pLock); ast_mutex_lock(&pSource->pLock);
- stat = initContextBuffer
+ stat = initContextBuffer
(pTarget, pSource->buffer.data, pSource->buffer.size);
if (ASN_OK == stat) {
ast_mutex_unlock(&pctxt->pLock);
if(stat != ASN_OK) return stat;
-
+
return ASN_OK;
}
-OOCTXT* newContext ()
+OOCTXT* newContext ()
{
/* OOCTXT* pctxt = (OOCTXT*) ASN1CRTMALLOC0 (sizeof(OOCTXT)); */
OOCTXT* pctxt = ast_malloc(sizeof(OOCTXT));
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
#include "ooasn1.h"
-static int decode16BitConstrainedString
+static int decode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet);
-static int decodeOctets
+static int decodeOctets
(OOCTXT* pctxt, ASN1OCTET* pbuffer, ASN1UINT bufsiz, ASN1UINT nbits);
static int getComponentLength (OOCTXT* pctxt, ASN1UINT itemBits);
int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
-{
+{
unsigned char mask;
if (nbits == 0) {
pctxt->buffer.bitOffset -= nbits;
- *pvalue = ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
+ *pvalue = ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
pctxt->buffer.bitOffset) & ((1 << nbits) - 1);
return ASN_OK;
/* Check if buffer contains number of bits requested */
int nbytes = (((nbits - pctxt->buffer.bitOffset) + 7) / 8);
-
+
if ((pctxt->buffer.byteIndex + nbytes) >= pctxt->buffer.size) {
return LOG_ASN1ERR (pctxt, ASN_E_ENDOFBUF);
}
/* second read bytes from next byteIndex */
while (nbits >= 8) {
- *pvalue = (*pvalue << 8) |
+ *pvalue = (*pvalue << 8) |
(pctxt->buffer.data[pctxt->buffer.byteIndex]);
pctxt->buffer.byteIndex++;
nbits -= 8;
/* third read bits & set bitoffset of the byteIndex */
if (nbits > 0) {
pctxt->buffer.bitOffset = 8 - nbits;
- *pvalue = (*pvalue << nbits) |
- ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
+ *pvalue = (*pvalue << nbits) |
+ ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
pctxt->buffer.bitOffset);
}
}
}
-int decodeBitString
+int decodeBitString
(OOCTXT* pctxt, ASN1UINT* numbits_p, ASN1OCTET* buffer, ASN1UINT bufsiz)
{
ASN1UINT bitcnt;
if (bitcnt > 0) {
*numbits_p += bitcnt;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, bitcnt, TRUE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
return ASN_OK;
}
-int decodeBMPString
+int decodeBMPString
(OOCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet)
{
Asn116BitCharSet charSet;
return ASN_OK;
}
-int decodeConstrainedStringEx
+int decodeConstrainedStringEx
(OOCTXT* pctxt, const char** string, const char* charSet,
ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits)
{
return ASN_OK;
}
-int decodeConsInteger
+int decodeConsInteger
(OOCTXT* pctxt, ASN1INT* pvalue, ASN1INT lower, ASN1INT upper)
-{
+{
ASN1UINT range_value = upper - lower;
ASN1UINT adjusted_value;
int stat = ASN_OK;
return stat;
}
-int decodeConsUInt8
+int decodeConsUInt8
(OOCTXT* pctxt, ASN1UINT8* pvalue, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value, value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
return stat;
}
-int decodeConsUInt16
+int decodeConsUInt16
(OOCTXT* pctxt, ASN1USINT* pvalue, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value, value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
return stat;
}
-int decodeConsUnsigned
+int decodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
return stat;
}
-int decodeConsWholeNumber
+int decodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT* padjusted_value, ASN1UINT range_value)
-{
+{
ASN1UINT nocts, range_bitcnt;
int stat;
/* If "fast copy" option is not set (ASN1FATSCOPY) or if constructed,
* copy the bit string value into a dynamic memory buffer;
- * otherwise, store the pointer to the value in the decode
+ * otherwise, store the pointer to the value in the decode
* buffer in the data pointer argument. */
-
+
if (pctxt->flags & ASN1FASTCOPY) {
/* check is it possible to do optimized decoding */
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = DECODEBIT (pctxt, &bit); /* read first bit of length determinant */
- if (bit == 1 && stat == ASN_OK)
+ if (bit == 1 && stat == ASN_OK)
stat = DECODEBIT (pctxt, &bit); /* read second bit */
pctxt->buffer.byteIndex = byteIndex; /* restore byte index */
/* if either first or second bit != 0 - not fragmented */
- if (bit == 0 && stat == ASN_OK) {
+ if (bit == 0 && stat == ASN_OK) {
ASN1UINT bitcnt;
-
+
stat = decodeLength (pctxt, &bitcnt);
if (stat != 0) return LOG_ASN1ERR (pctxt, stat);
stat = moveBitCursor (pctxt, bitcnt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
- else
+ else
pBitStr->data = 0;
-
+
return stat;
}
}
}
nocts = (nbits + 7) / 8;
-
+
/* Allocate memory for the target string */
if (nocts > 0) {
ptmp = (ASN1OCTET*) ASN1MALLOC (pctxt, nocts);
if (0 == ptmp) return LOG_ASN1ERR (pctxt, ASN_E_NOMEM);
-
+
/* Call static bit string decode function */
stat = decodeBitString (pctxt, &pBitStr->numbits, ptmp, nocts);
/* If "fast copy" option is not set (ASN1FASTCOPY) or if constructed,
* copy the octet string value into a dynamic memory buffer;
- * otherwise, store the pointer to the value in the decode
+ * otherwise, store the pointer to the value in the decode
* buffer in the data pointer argument. */
if (pctxt->flags & ASN1FASTCOPY) {
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = DECODEBIT (pctxt, &bit); /* read first bit of length determinant */
- if (bit == 1 && stat == ASN_OK)
+ if (bit == 1 && stat == ASN_OK)
stat = DECODEBIT (pctxt, &bit); /* read second bit */
pctxt->buffer.byteIndex = byteIndex; /* restore byte index */
/* if either first or second bit != 0 - not fragmented */
- if (bit == 0 && stat == ASN_OK) {
+ if (bit == 0 && stat == ASN_OK) {
ASN1UINT octcnt;
-
+
stat = decodeLength (pctxt, &octcnt);
if (stat != 0) return LOG_ASN1ERR (pctxt, stat);
stat = moveBitCursor (pctxt, octcnt * 8);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
- else
+ else
pOctStr->data = 0;
-
+
return stat;
}
}
-
+
nocts = getComponentLength (pctxt, 8);
if (nocts < 0) return LOG_ASN1ERR (pctxt, nocts);
if (j == 0) {
subid = pvalue->subid[0];
pvalue->subid[0] = ((subid / 40) >= 2) ? 2 : subid / 40;
- pvalue->subid[1] = (pvalue->subid[0] == 2) ?
+ pvalue->subid[1] = (pvalue->subid[0] == 2) ?
subid - 80 : subid % 40;
j = 2;
}
else j++;
}
else
- stat = ASN_E_INVOBJID;
+ stat = ASN_E_INVOBJID;
}
pvalue->numids = j;
return (stat);
}
-static int decodeOctets
+static int decodeOctets
(OOCTXT* pctxt, ASN1OCTET* pbuffer, ASN1UINT bufsiz, ASN1UINT nbits)
-{
+{
ASN1UINT nbytes = (nbits + 7) / 8 ;
ASN1UINT i = 0, j;
ASN1UINT rshift = pctxt->buffer.bitOffset;
/* Copy last partial byte */
if (nbits >= rshift) {
- pbuffer[i] =
+ pbuffer[i] =
pctxt->buffer.data[pctxt->buffer.byteIndex++] << lshift;
nbitsInLastOctet = nbits - rshift;
if (nbitsInLastOctet > 0) {
- pbuffer[i] |=
+ pbuffer[i] |=
pctxt->buffer.data[pctxt->buffer.byteIndex] >> rshift;
}
pctxt->buffer.bitOffset = 8 - nbitsInLastOctet;
}
else if (nbits > 0) { /* nbits < rshift */
- pbuffer[i] =
+ pbuffer[i] =
pctxt->buffer.data[pctxt->buffer.byteIndex] << lshift;
pctxt->buffer.bitOffset = rshift - nbits;
}
return ASN_OK;
}
-int decodeOctetString
+int decodeOctetString
(OOCTXT* pctxt, ASN1UINT* numocts_p, ASN1OCTET* buffer, ASN1UINT bufsiz)
{
ASN1UINT octcnt;
if (TRUE) {
ASN1BOOL doAlign;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, octcnt, FALSE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
}
- stat = decodeOctets (pctxt, &buffer[octidx],
+ stat = decodeOctets (pctxt, &buffer[octidx],
bufsiz - octidx, (octcnt * 8));
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
return ASN_OK;
}
-int decodeOpenType
+int decodeOpenType
(OOCTXT* pctxt, const ASN1OCTET** object_p2, ASN1UINT* numocts_p)
{
ASN1DynOctStr octStr;
stat = decodeLength (pctxt, &nbytes);
if (stat < 0) return LOG_ASN1ERR (pctxt, stat);
-
+
if (nbytes > 0) {
stat = decodeByteAlign (pctxt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
int decodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT* pvalue)
-{
+{
ASN1BOOL bitValue;
ASN1UINT len;
int ret;
return ASN_OK;
}
-static int decode16BitConstrainedString
+static int decode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet)
{
ASN1UINT i, idx, nbits = pCharSet->alignedBits;
stat = decodeBits (pctxt, &idx, nbits);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
- pString->data[i] = (pCharSet->charSet.data == 0) ?
+ pString->data[i] = (pCharSet->charSet.data == 0) ?
idx + pCharSet->firstChar : pCharSet->charSet.data[idx];
}
}
if (pctxt->buffer.byteIndex > pctxt->buffer.size) {
return (ASN_E_ENDOFBUF);
}
-
+
return ASN_OK;
}
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
DListNode* dListAppend (OOCTXT* pctxt, DList* pList, void* pData)
{
- DListNode* pListNode = (DListNode*)
+ DListNode* pListNode = (DListNode*)
memAlloc (pctxt, sizeof(DListNode));
if (0 != pListNode) {
DListNode* dListAppendNode (OOCTXT* pctxt, DList* pList, void* pData)
{
- DListNode* pListNode =
+ DListNode* pListNode =
(DListNode*) (((char*)pData) - sizeof(DListNode));
if (0 != pListNode) {
for (pNode = pList->head; pNode != 0; pNode = pNextNode) {
pNextNode = pNode->next;
-
+
memFreePtr (pctxt, pNode->data);
memFreePtr (pctxt, pNode);
}
memFreePtr(pctxt, pNode);
}
}
-
-DListNode* dListFindByIndex (DList* pList, int index)
+
+DListNode* dListFindByIndex (DList* pList, int index)
{
DListNode* curNode;
int i;
/* Insert item before given node */
-DListNode* dListInsertBefore
+DListNode* dListInsertBefore
(OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData)
{
DListNode* pListNode = (DListNode*) memAlloc (pctxt, sizeof(DListNode));
-
+
if (0 != pListNode) {
pListNode->data = (void*)pData;
/* Insert item after given node */
-DListNode* dListInsertAfter
+DListNode* dListInsertAfter
(OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData)
{
DListNode* pListNode = (DListNode*) memAlloc (pctxt, sizeof(DListNode));
return pListNode;
}
-
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/**
- * @file dlist.h
+/**
+ * @file dlist.h
* Doubly-linked list structures and utility functions.
*/
#ifndef _OODLIST_H_
* @param pData A pointer to a data item to be appended to the list.
* @return A pointer to an allocated node structure used to link
* the given data value into the list.
- */
-EXTERN DListNode* dListAppend
+ */
+EXTERN DListNode* dListAppend
(struct OOCTXT* pctxt, DList* pList, void* pData);
-EXTERN DListNode* dListAppendNode
+EXTERN DListNode* dListAppendNode
(struct OOCTXT* pctxt, DList* pList, void* pData);
/**
- * This function delete the head item from the list and returns a pointer
- * the data item stored in that node. The memory for the node structure
+ * This function delete the head item from the list and returns a pointer
+ * the data item stored in that node. The memory for the node structure
* is released.
*
* @param pctxt A pointer to a context structure. This provides a
* storage area for the function to store all working
* variables that must be maintained between function
* calls.
- * @param pList A pointer to the linked list structure from which
+ * @param pList A pointer to the linked list structure from which
* the node will be deleted.
* @return A pointer to the data item stored in the deleted node.
- */
+ */
EXTERN void* dListDeleteHead (struct OOCTXT* pctxt, DList* pList);
EXTERN DListNode* dListFindByIndex (DList* pList, int index);
/**
* This function initializes a doubly linked list structure. It sets the number
* of elements to zero and sets all internal pointer values to NULL. A doubly
- * linked-list structure is described by the DList type. Nodes of the list
+ * linked-list structure is described by the DList type. Nodes of the list
* are of type DListNode.
*
* Memory for the structures is allocated using the memAlloc run-time
*/
EXTERN void dListFreeNodes (struct OOCTXT* pctxt, DList* pList);
-/**
+/**
* This function removes all nodes from the linked list structure and releases
* the memory that was allocated for storing the node structures
* (DListNode) and for data. The memory for data in each node must have
EXTERN void dListFreeAll (struct OOCTXT* pctxt, DList* pList);
/**
- * This function inserts an item into the linked list structure before the
+ * This function inserts an item into the linked list structure before the
* specified element.
- *
+ *
* @param pctxt Pointer to a context structure.
- * @param pList A pointer to a linked list structure into which the
+ * @param pList A pointer to a linked list structure into which the
* data item is to be inserted.
- * @param node The position in the list where the item is to be
- * inserted. The item will be inserted before this
+ * @param node The position in the list where the item is to be
+ * inserted. The item will be inserted before this
* node or appended to the list if node is null.
* @param pData A pointer to the data item to be inserted to the list.
- * @return A pointer to an allocated node structure used to
+ * @return A pointer to an allocated node structure used to
* link the given data value into the list.
*/
-EXTERN DListNode* dListInsertBefore
+EXTERN DListNode* dListInsertBefore
(struct OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData);
/**
- * This function inserts an item into the linked list structure after the
+ * This function inserts an item into the linked list structure after the
* specified element.
- *
+ *
* @param pctxt Pointer to a context structure.
- * @param pList A pointer to a linked list structure into which the
+ * @param pList A pointer to a linked list structure into which the
* data item is to be inserted.
- * @param node The position in the list where the item is to be
- * inserted. The item will be inserted after this
+ * @param node The position in the list where the item is to be
+ * inserted. The item will be inserted after this
* node or added as the head element if node is null.
* @param pData A pointer to the data item to be inserted to the list.
- * @return A pointer to an allocated node structure used to
+ * @return A pointer to an allocated node structure used to
* link the given data value into the list.
*/
-EXTERN DListNode* dListInsertAfter
+EXTERN DListNode* dListInsertAfter
(struct OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData);
/**
EXTERN void dListRemove (DList* pList, DListNode* node);
EXTERN void dListFindAndRemove(struct OOCTXT* pctxt, DList* pList, void* data);
-/**
+/**
* @}
*/
#ifdef __cplusplus
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
#include "ooasn1.h"
-static int encode16BitConstrainedString
+static int encode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet);
static int encode2sCompBinInt (OOCTXT* pctxt, ASN1INT value);
int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
-{
+{
int stat = ASN_OK;
/* If start of new byte, init to zero */
/* Set single-bit value */
if (value) {
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
( 1 << pctxt->buffer.bitOffset );
}
}
int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
-{
+{
int nbytes = (nbits + 7)/ 8, stat = ASN_OK;
if (nbits == 0) return stat;
if (nbits < (unsigned)pctxt->buffer.bitOffset) {
pctxt->buffer.bitOffset -= nbits;
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
( value << pctxt->buffer.bitOffset );
return stat;
}
/* to set bits in subsequent bytes.. */
nbits -= pctxt->buffer.bitOffset;
- pctxt->buffer.data[pctxt->buffer.byteIndex++] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex++] |=
(ASN1OCTET)( value >> nbits );
- pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
+ pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
while (nbits >= 8) {
nbits -= 8;
- pctxt->buffer.data[pctxt->buffer.byteIndex++] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex++] =
(ASN1OCTET)( value >> nbits );
- pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
+ pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
}
/* copy final partial byte */
pctxt->buffer.bitOffset = 8 - nbits;
if (nbits > 0) {
- pctxt->buffer.data[pctxt->buffer.byteIndex] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)((value & ((1 << nbits)-1)) << pctxt->buffer.bitOffset);
}
else
}
int encodeBitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
-{
+{
int lshift = pctxt->buffer.bitOffset;
int rshift = 8 - pctxt->buffer.bitOffset;
int stat = ASN_OK;
- ASN1OCTET mask = 0x0;
+ ASN1OCTET mask = 0x0;
if (nbits == 0) return ASN_OK;
/* possibly some bits in the following octet.. */
else {
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
(ASN1OCTET)(value >> rshift);
pctxt->buffer.bitOffset -= nbits;
if (pctxt->buffer.bitOffset < 0) {
pctxt->buffer.byteIndex++;
- pctxt->buffer.data[pctxt->buffer.byteIndex] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)(value << lshift);
pctxt->buffer.bitOffset += 8;
}
if (enclen > 0) {
ASN1BOOL doAlign;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, numbits, TRUE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
return ASN_OK;
}
-int encodeBMPString
+int encodeBMPString
(OOCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet)
{
Asn116BitCharSet charSet;
return (stat);
}
-int encodeConsInteger
+int encodeConsInteger
(OOCTXT* pctxt, ASN1INT value, ASN1INT lower, ASN1INT upper)
-{
+{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat;
else {
range_value = upper + abs(lower);
adjusted_value = value + abs(lower);
- }
+ }
if (range_value != ASN1UINT_MAX) { range_value += 1; }
return stat;
}
-int encodeConsUnsigned
+int encodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat;
return stat;
}
-int encodeConsWholeNumber
+int encodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT adjusted_value, ASN1UINT range_value)
-{
+{
ASN1UINT nocts, range_bitcnt = getUIntBitCount (range_value - 1);
int stat;
}
}
-int encodeConstrainedStringEx (OOCTXT* pctxt,
- const char* string,
+int encodeConstrainedStringEx (OOCTXT* pctxt,
+ const char* string,
const char* charSet,
ASN1UINT abits, /* aligned char bits */
ASN1UINT ubits, /* unaligned char bits */
pctxt->buffer.data = (ASN1OCTET*) memHeapRealloc
(&pctxt->pMsgMemHeap, pctxt->buffer.data, pctxt->buffer.size);
-
+
if (!pctxt->buffer.data) return (ASN_E_NOMEM);
return (ASN_OK);
return pctxt->buffer.data;
}
-int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
+int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
{
ASN1UINT mask;
int nshifts = 0, stat;
}
int encodeLength (OOCTXT* pctxt, ASN1UINT value)
-{
+{
ASN1BOOL extendable;
- Asn1SizeCnst* pSize =
+ Asn1SizeCnst* pSize =
checkSize (pctxt->pSizeConstraint, value, &extendable);
ASN1UINT lower = (pSize) ? pSize->lower : 0;
ASN1UINT upper = (pSize) ? pSize->upper : ASN1UINT_MAX;
/* within the range of any of them, signal constraint violation */
/* error.. */
- if (pctxt->pSizeConstraint && !pSize)
+ if (pctxt->pSizeConstraint && !pSize)
return LOG_ASN1ERR (pctxt, ASN_E_CONSVIO);
/* Reset the size constraint in the context block structure */
if (0 == pvalue) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
if (numids < 2) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
if (pvalue->subid[0] > 2) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
- if (pvalue->subid[0] != 2 && pvalue->subid[1] > 39)
+ if (pvalue->subid[0] != 2 && pvalue->subid[1] > 39)
return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
/* Passed checks, encode object identifier */
-
+
/* Munge first two sub ID's and encode */
temp = ((pvalue->subid[0] * 40) + pvalue->subid[1]);
}
int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
-{
+{
int lshift = pctxt->buffer.bitOffset;
int rshift = 8 - pctxt->buffer.bitOffset;
int stat = ASN_OK;
/* possibly some bits in the following octet.. */
else {
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
(ASN1OCTET)(value >> rshift);
pctxt->buffer.bitOffset -= nbits;
if (pctxt->buffer.bitOffset < 0) {
pctxt->buffer.byteIndex++;
- pctxt->buffer.data[pctxt->buffer.byteIndex] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)(value << lshift);
pctxt->buffer.bitOffset += 8;
}
}
int encodeOctets (OOCTXT* pctxt, const ASN1OCTET* pvalue, ASN1UINT nbits)
-{
+{
int i = 0, stat;
int numFullOcts = nbits / 8;
/* encode buffer.. */
if (pctxt->buffer.bitOffset == 8) {
- memcpy (&pctxt->buffer.data[pctxt->buffer.byteIndex], pvalue,
+ memcpy (&pctxt->buffer.data[pctxt->buffer.byteIndex], pvalue,
numFullOcts);
pctxt->buffer.byteIndex += numFullOcts;
pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
if (enclen > 0) {
ASN1BOOL doAlign;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, numocts, FALSE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = encodeByteAlign (pctxt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
- stat = encodeOpenType
+ stat = encodeOpenType
(pctxt, pOpenType->numocts, pOpenType->data);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
if (lower > ASN1INT_MIN)
value -= lower;
-
+
/* Calculate signed number value length */
for ( ; shift > 0; shift -= 8) {
if ((stat = encodeLength (pctxt, nbytes)) < 0) {
return stat;
}
-
+
if ((stat = encodeByteAlign (pctxt)) != ASN_OK)
return stat;
-
+
/* Encode additional zero byte if necessary */
if (nbytes > sizeof(value)) {
}
int encodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT value)
-{
+{
int stat;
if (value < 64) {
return ASN_OK;
}
-static int encode16BitConstrainedString
+static int encode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet)
{
ASN1UINT i, pos;
for (i = 0; i < value.nchars; i++) {
if (pCharSet->charSet.data == 0) {
- stat = encodeBits
+ stat = encodeBits
(pctxt, value.data[i] - pCharSet->firstChar, nbits);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
/* multiple of 8 bits and also satisifies the condition that the */
/* leading eight bits of the field shall not be zero unless the */
/* field is precisely 8 bits long. */
-
+
ASN1UINT bitcnt = (value == 0) ? 1 : getUIntBitCount (value);
/* round-up to nearest 8-bit boundary */
return enclen;
}
-static int getIdentByteCount (ASN1UINT ident)
+static int getIdentByteCount (ASN1UINT ident)
{
if (ident < (1u << 7)) { /* 7 */
return 1;
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
"Value constraint violation: field %s, value %s",
"Value range error: lower bound is greater than upper",
"Unexpected end of file detected",
- "Invalid UTF-8 character at index %d",
- "List error: concurrent modification attempt while iterating",
+ "Invalid UTF-8 character at index %d",
+ "List error: concurrent modification attempt while iterating",
"List error: illegal state for attempted operation",
"Array index out of bounds",
"Invalid parameter passed to function or method",
"Invalid time string format",
- "Context is not initialized",
- "ASN.1 value will not fit in target variable",
- "Character is not within the defined character set",
- "Invalid XML state for attempted operation",
- "Error condition returned from XML parser:\n%s",
+ "Context is not initialized",
+ "ASN.1 value will not fit in target variable",
+ "Character is not within the defined character set",
+ "Invalid XML state for attempted operation",
+ "Error condition returned from XML parser:\n%s",
"SEQUENCE elements not in correct order",
"Invalid index for table constraint identifier",
- "Invalid value for relational table constraint fixed type field",
- "File not found",
+ "Invalid value for relational table constraint fixed type field",
+ "File not found",
"File read error",
"File write error",
"Invalid Base64 string",
j = pcnt = 0;
tp = g_status_text[i];
- while (*tp)
+ while (*tp)
{
if (*tp == '%' && *(tp+1) == 's')
{
}
else
strcpy (bufp, "unrecognized completion status");
- }
+ }
else strcpy (bufp, "normal completion status");
return (bufp);
}
/* Get error text in a dynamic memory buffer. This allocates memory */
-/* using the 'memAlloc' function. This memory is automatically freed */
+/* using the 'memAlloc' function. This memory is automatically freed */
/* at the time the 'memFree' function is called. */
char* errGetText (OOCTXT* pctxt)
while (pctxt->errInfo.stkx > 0) {
pctxt->errInfo.stkx--;
- sprintf (lbuf, " Module: %s, Line %d\n",
+ sprintf (lbuf, " Module: %s, Line %d\n",
pctxt->errInfo.stack[pctxt->errInfo.stkx].module,
pctxt->errInfo.stack[pctxt->errInfo.stkx].lineno);
strcat(pBuf, lbuf);
printf ("Stack trace:");
while (pErrInfo->stkx > 0) {
pErrInfo->stkx--;
- printf (" Module: %s, Line %d\n",
+ printf (" Module: %s, Line %d\n",
pErrInfo->stack[pErrInfo->stkx].module,
pErrInfo->stack[pErrInfo->stkx].lineno);
}
for (i = 0; i < pSrcErrInfo->stkx; i++) {
if (pDestErrInfo->stkx < ASN_K_MAXERRSTK) {
- pDestErrInfo->stack[pDestErrInfo->stkx].module =
+ pDestErrInfo->stack[pDestErrInfo->stkx].module =
pSrcErrInfo->stack[i].module;
- pDestErrInfo->stack[pDestErrInfo->stkx++].lineno =
+ pDestErrInfo->stack[pDestErrInfo->stkx++].lineno =
pSrcErrInfo->stack[i].lineno;
}
}
}
-int errSetData (ASN1ErrInfo* pErrInfo, int status,
- const char* module, int lno)
-{
+int errSetData (ASN1ErrInfo* pErrInfo, int status,
+ const char* module, int lno)
+{
if (pErrInfo->status == 0) {
pErrInfo->status = status;
}
ooLogAsn1Error(status, module, lno);
- return status;
+ return status;
}
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
}
}
-void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
+void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
}
}
-void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts,
+void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
}
}
-void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars,
+void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars,
ASN116BITCHAR* data)
{
if (0 != pctxt->pEventHandler) {
}
}
-void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts,
+void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file eventHandler.h
- * C event handler structure. This structure holds event handler function
+ * @file eventHandler.h
+ * C event handler structure. This structure holds event handler function
* callbacks for use by the generated code.
*/
/**
/**
- * This is a function pointer for a callback function which is invoked
- * from within a decode function when an element of a SEQUENCE, SET,
+ * This is a function pointer for a callback function which is invoked
+ * from within a decode function when an element of a SEQUENCE, SET,
* SEQUENCE OF, SET OF, or CHOICE construct is parsed.
*
* @param name For SEQUENCE, SET, or CHOICE, this is the name of the
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when parsing is complete on an element of a
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when parsing is complete on an element of a
* SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE construct.
*
* @param name For SEQUENCE, SET, or CHOICE, this is the name of the
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the BOOLEAN ASN.1 type is parsed.
*
* @param value Parsed value.
typedef void (*BoolValue) (ASN1BOOL value);
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the INTERGER ASN.1 type is parsed.
*
* @param value Parsed value.
typedef void (*IntValue) (ASN1INT value);
/**
- * This is a function pointer for a callback function which is invoked
- * from within a decode function when a value of the INTEGER ASN.1 type
- * is parsed. In this case, constraints on the integer value forced the
+ * This is a function pointer for a callback function which is invoked
+ * from within a decode function when a value of the INTEGER ASN.1 type
+ * is parsed. In this case, constraints on the integer value forced the
* use of unsigned integer C type to represent the value.
*
* @param value Parsed value.
typedef void (*UIntValue) (ASN1UINT value);
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of the BIT STRING ASN.1 type is
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of the BIT STRING ASN.1 type is
* parsed.
*
- * @param numbits - Number of bits in the parsed value.
- * @param data - Pointer to a byte array that contains the bit
+ * @param numbits - Number of bits in the parsed value.
+ * @param data - Pointer to a byte array that contains the bit
* string data.
* @return - none
- */
+ */
typedef void (*BitStrValue) (ASN1UINT numbits, const ASN1OCTET* data);
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of one of the OCTET STRING ASN.1 type
* is parsed.
*
typedef void (*OctStrValue) (ASN1UINT numocts, const ASN1OCTET* data) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of one of the 8-bit ASN.1 character
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of one of the 8-bit ASN.1 character
* string types is parsed.
*
* @param value Null terminated character string value.
typedef void (*CharStrValue) (const char* value) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of one of the 16-bit ASN.1 character
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of one of the 16-bit ASN.1 character
* string types is parsed.
*
* This is used for the ASN.1 BmpString type.
typedef void (*CharStrValue16Bit) (ASN1UINT nchars, ASN116BITCHAR* data) ;
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the NULL ASN.1 type is parsed.
*
* @param - none
typedef void (*NullValue) (void) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is
* parsed.
*
* @param numSubIds Number of subidentifiers in the object identifier.
typedef void (*OidValue) (ASN1UINT numSubIds, ASN1UINT* pSubIds) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of the ENUMERATED ASN.1 type is
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of the ENUMERATED ASN.1 type is
* parsed.
*
* @param value - Parsed enumerated value
typedef void (*EnumValue) (ASN1UINT value) ;
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when an ASN.1 open type is parsed.
*
* @param numocts Number of octets in the parsed value.
/**
- * This function sets the event handler object within the context. It
+ * This function sets the event handler object within the context. It
* will overwrite the definition of any handler that was set previously.
*
* @param pctxt Context to which event handler has to be added.
EXTERN void setEventHandler (OOCTXT* pctxt, EventHandler* pHandler);
/**
- * This function is called to remove the event handler current defined
- * in the context. This is done by setting the event handler object
+ * This function is called to remove the event handler current defined
+ * in the context. This is done by setting the event handler object
* pointer to NULL.
*
* @param pctxt Context from which event handler has to be removed.
EXTERN void removeEventHandler (OOCTXT* pctxt);
/**
- * The following functions are invoked from within the generated
+ * The following functions are invoked from within the generated
* code to call the various user-defined event handler methods ..
*/
EXTERN void invokeStartElement (OOCTXT* pctxt, const char* name, int index);
EXTERN void invokeIntValue (OOCTXT* pctxt, ASN1INT value);
EXTERN void invokeUIntValue (OOCTXT* pctxt, ASN1UINT value);
-EXTERN void invokeBitStrValue
+EXTERN void invokeBitStrValue
(OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data);
-EXTERN void invokeOctStrValue
+EXTERN void invokeOctStrValue
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
EXTERN void invokeCharStrValue (OOCTXT* pctxt, const char* value);
-EXTERN void invokeCharStr16BitValue
+EXTERN void invokeCharStr16BitValue
(OOCTXT* pctxt, ASN1UINT nchars, ASN116BITCHAR* data);
EXTERN void invokeNullValue (OOCTXT* pctxt);
-EXTERN void invokeOidValue
+EXTERN void invokeOidValue
(OOCTXT* pctxt, ASN1UINT numSubIds, ASN1UINT* pSubIds);
EXTERN void invokeEnumValue (OOCTXT* pctxt, ASN1UINT value);
-EXTERN void invokeOpenTypeValue
+EXTERN void invokeOpenTypeValue
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
#endif
-#endif
+#endif
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
return (stat);
}
-
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
return (stat);
}
-
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
EXTERN const char* gs_H323_MESSAGES_AliasAddress_dialedDigits_CharSet =
"#*,0123456789";
-
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
return (stat);
}
-