more doxygenification (issue #5513)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant 2005-10-26 13:03:17 +00:00
parent c7db73070a
commit 6324072247
62 changed files with 880 additions and 810 deletions

View File

@ -18,10 +18,11 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Comma Separated Value CDR records. * \brief Comma Separated Value CDR records.
* *
* \arg See also \ref AstCDR
*/ */
#include <sys/types.h> #include <sys/types.h>

View File

@ -18,10 +18,13 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Comma Separated Value CDR records. * \brief Custom Comma Separated Value CDR records.
* *
* \arg See also \ref AstCDR
*
* Logs in LOG_DIR/cdr_custom
*/ */
#include <sys/types.h> #include <sys/types.h>

View File

@ -14,10 +14,14 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Asterisk Call Manager CDR records. * \brief Asterisk Call Manager CDR records.
* *
* See also
* \arg \ref AstCDR
* \arg \ref AstAMI
* \arg \ref Config_ami
*/ */
#include <sys/types.h> #include <sys/types.h>

View File

@ -16,10 +16,15 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* ODBC CDR Backend * \brief ODBC CDR Backend
* *
* \author Brian K. West <brian@bkw.org>
*
* See also:
* \arg http://www.unixodbc.org
* \arg \ref Config_cdr
*/ */
#include <sys/types.h> #include <sys/types.h>

View File

@ -20,10 +20,15 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* PostgreSQL CDR logger * \brief PostgreSQL CDR logger
*
* \author Matthew D. Hardeman <mhardemn@papersoft.com>
* *
* See also
* \arg \ref Config_cdr
* \arg http://www.postgresql.org/
*/ */
#include <sys/types.h> #include <sys/types.h>

View File

@ -3,7 +3,6 @@
* *
* Copyright (C) 2004 - 2005, Holger Schurig * Copyright (C) 2004 - 2005, Holger Schurig
* *
* Holger Schurig <hs4233@mail.mn-solutions.de>
* *
* Ideas taken from other cdr_*.c files * Ideas taken from other cdr_*.c files
* *
@ -18,10 +17,17 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Store CDR records in a SQLite database. * \brief Store CDR records in a SQLite database.
* *
* \author Holger Schurig <hs4233@mail.mn-solutions.de>
*
* See also
* \arg \ref Config_cdr
* \arg http://www.sqlite.org/
*
* Creates the database and table on-the-fly
*/ */
#include <sys/types.h> #include <sys/types.h>
@ -52,6 +58,7 @@ static sqlite* db = NULL;
AST_MUTEX_DEFINE_STATIC(sqlite_lock); AST_MUTEX_DEFINE_STATIC(sqlite_lock);
/*! \brief SQL table format */
static char sql_create_table[] = "CREATE TABLE cdr (" static char sql_create_table[] = "CREATE TABLE cdr ("
" AcctId INTEGER PRIMARY KEY," " AcctId INTEGER PRIMARY KEY,"
" clid VARCHAR(80)," " clid VARCHAR(80),"

View File

@ -14,10 +14,16 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* FreeTDS CDR logger * \brief FreeTDS CDR logger
* *
* See also
* \arg \ref Config_cdr
* \arg http://www.freetds.org/
*/
/*! \verbatim
* *
* Table Structure for `cdr` * Table Structure for `cdr`
* *
@ -44,6 +50,8 @@ CREATE TABLE [dbo].[cdr] (
[uniqueid] [varchar] (32) NULL [uniqueid] [varchar] (32) NULL
) ON [PRIMARY] ) ON [PRIMARY]
\endverbatim
*/ */
#include <sys/types.h> #include <sys/types.h>

View File

@ -1,9 +1,9 @@
/* /*!\file
* Signed 16-bit audio data * \brief Signed 16-bit audio data
* *
* Source: answer.raw * Source: answer.raw
* *
* Copyright (C) 1999, Mark Spencer and Linux Support Services * Copyright (C) 1999-2005, Digium, Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

File diff suppressed because it is too large Load Diff

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Implementation of Inter-Asterisk eXchange * \brief Implementation of Inter-Asterisk eXchange Protocol, v 2
* *
*/ */

View File

@ -10,6 +10,10 @@
* This program is free software, distributed under the terms of * This program is free software, distributed under the terms of
* the GNU General Public License * the GNU General Public License
*/ */
/*!\file
* \brief Implementation of the IAX2 protocol
*/
#ifndef _IAX2_PARSER_H #ifndef _IAX2_PARSER_H
#define _IAX2_PARSER_H #define _IAX2_PARSER_H

View File

@ -16,9 +16,8 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* * \brief IAX Provisioning Protocol
* IAX Provisioning Protocol
* *
*/ */

View File

@ -9,6 +9,10 @@
* *
*/ */
/*! \file
* \brief IAX2 Provisioning protocol
*/
#include "iax2-parser.h" #include "iax2-parser.h"
#define PROV_IE_USEDHCP 1 /* Presense only */ #define PROV_IE_USEDHCP 1 /* Presense only */

View File

@ -1,9 +1,9 @@
/* /*! \file
* Signed 16-bit audio data * \brief Signed 16-bit audio data
* *
* Source: /home/markster/ring10.raw * Source: /home/markster/ring10.raw
* *
* Copyright (C) 1999, Mark Spencer and Linux Support Services * Copyright (C) 1999-2005, Digium, Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,11 +1,11 @@
/* /*! \file
* adpcm_slin_ex.h -- * adpcm_slin_ex.h --
* *
* 4-bit ADPCM data, 20 milliseconds worth at 8 kHz. * \brief 4-bit ADPCM data, 20 milliseconds worth at 8 kHz.
* *
* Source: g723.example * Source: g723.example
* *
* Copyright (C) 2001, Linux Support Services, Inc. * Copyright (C) 2001-2005, Digium, Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* codec_a_mu.c - translate between alaw and ulaw directly * \brief codec_a_mu.c - translate between alaw and ulaw directly
* *
*/ */

View File

@ -20,9 +20,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* codec_adpcm.c - translate between signed linear and Dialogic ADPCM * \brief codec_adpcm.c - translate between signed linear and Dialogic ADPCM
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* codec_alaw.c - translate between signed linear and alaw * \brief codec_alaw.c - translate between signed linear and alaw
* *
*/ */
@ -56,22 +56,20 @@ static int useplc = 0;
#include "slin_ulaw_ex.h" #include "slin_ulaw_ex.h"
#include "ulaw_slin_ex.h" #include "ulaw_slin_ex.h"
/* /*!
* Private workspace for translating signed linear signals to alaw. * \brief Private workspace for translating signed linear signals to alaw.
*/ */
struct alaw_encoder_pvt struct alaw_encoder_pvt
{ {
struct ast_frame f; struct ast_frame f;
char offset[AST_FRIENDLY_OFFSET]; /* Space to build offset */ char offset[AST_FRIENDLY_OFFSET]; /*!< Space to build offset */
unsigned char outbuf[BUFFER_SIZE]; /* Encoded alaw, two nibbles to a word */ unsigned char outbuf[BUFFER_SIZE]; /*!< Encoded alaw, two nibbles to a word */
int tail; int tail;
}; };
/* /*!
* Private workspace for translating alaw signals to signed linear. * \brief Private workspace for translating alaw signals to signed linear.
*/ */
struct alaw_decoder_pvt struct alaw_decoder_pvt
{ {
struct ast_frame f; struct ast_frame f;
@ -81,8 +79,8 @@ struct alaw_decoder_pvt
plc_state_t plc; plc_state_t plc;
}; };
/* /*!
* alawToLin_New * \brief alawToLin_New
* Create a new instance of alaw_decoder_pvt. * Create a new instance of alaw_decoder_pvt.
* *
* Results: * Results:
@ -92,8 +90,7 @@ struct alaw_decoder_pvt
* None. * None.
*/ */
static struct ast_translator_pvt * static struct ast_translator_pvt * alawtolin_new (void)
alawtolin_new (void)
{ {
struct alaw_decoder_pvt *tmp; struct alaw_decoder_pvt *tmp;
tmp = malloc (sizeof (struct alaw_decoder_pvt)); tmp = malloc (sizeof (struct alaw_decoder_pvt));
@ -108,8 +105,8 @@ alawtolin_new (void)
return (struct ast_translator_pvt *) tmp; return (struct ast_translator_pvt *) tmp;
} }
/* /*!
* LinToalaw_New * \brief LinToalaw_New
* Create a new instance of alaw_encoder_pvt. * Create a new instance of alaw_encoder_pvt.
* *
* Results: * Results:
@ -119,8 +116,7 @@ alawtolin_new (void)
* None. * None.
*/ */
static struct ast_translator_pvt * static struct ast_translator_pvt * lintoalaw_new (void)
lintoalaw_new (void)
{ {
struct alaw_encoder_pvt *tmp; struct alaw_encoder_pvt *tmp;
tmp = malloc (sizeof (struct alaw_encoder_pvt)); tmp = malloc (sizeof (struct alaw_encoder_pvt));
@ -134,8 +130,8 @@ lintoalaw_new (void)
return (struct ast_translator_pvt *) tmp; return (struct ast_translator_pvt *) tmp;
} }
/* /*!
* alawToLin_FrameIn * \brief alawToLin_FrameIn
* Fill an input buffer with packed 4-bit alaw values if there is room * Fill an input buffer with packed 4-bit alaw values if there is room
* left. * left.
* *
@ -181,8 +177,8 @@ alawtolin_framein (struct ast_translator_pvt *pvt, struct ast_frame *f)
return 0; return 0;
} }
/* /*!
* alawToLin_FrameOut * \brief alawToLin_FrameOut
* Convert 4-bit alaw encoded signals to 16-bit signed linear. * Convert 4-bit alaw encoded signals to 16-bit signed linear.
* *
* Results: * Results:
@ -193,8 +189,7 @@ alawtolin_framein (struct ast_translator_pvt *pvt, struct ast_frame *f)
* None. * None.
*/ */
static struct ast_frame * static struct ast_frame * alawtolin_frameout (struct ast_translator_pvt *pvt)
alawtolin_frameout (struct ast_translator_pvt *pvt)
{ {
struct alaw_decoder_pvt *tmp = (struct alaw_decoder_pvt *) pvt; struct alaw_decoder_pvt *tmp = (struct alaw_decoder_pvt *) pvt;
@ -213,8 +208,8 @@ alawtolin_frameout (struct ast_translator_pvt *pvt)
return &tmp->f; return &tmp->f;
} }
/* /*!
* LinToalaw_FrameIn * \brief LinToalaw_FrameIn
* Fill an input buffer with 16-bit signed linear PCM values. * Fill an input buffer with 16-bit signed linear PCM values.
* *
* Results: * Results:
@ -224,8 +219,7 @@ alawtolin_frameout (struct ast_translator_pvt *pvt)
* tmp->tail is number of signal values in the input buffer. * tmp->tail is number of signal values in the input buffer.
*/ */
static int static int lintoalaw_framein (struct ast_translator_pvt *pvt, struct ast_frame *f)
lintoalaw_framein (struct ast_translator_pvt *pvt, struct ast_frame *f)
{ {
struct alaw_encoder_pvt *tmp = (struct alaw_encoder_pvt *) pvt; struct alaw_encoder_pvt *tmp = (struct alaw_encoder_pvt *) pvt;
int x; int x;
@ -242,8 +236,8 @@ lintoalaw_framein (struct ast_translator_pvt *pvt, struct ast_frame *f)
return 0; return 0;
} }
/* /*!
* LinToalaw_FrameOut * \brief LinToalaw_FrameOut
* Convert a buffer of raw 16-bit signed linear PCM to a buffer * Convert a buffer of raw 16-bit signed linear PCM to a buffer
* of 4-bit alaw packed two to a byte (Big Endian). * of 4-bit alaw packed two to a byte (Big Endian).
* *
@ -254,8 +248,7 @@ lintoalaw_framein (struct ast_translator_pvt *pvt, struct ast_frame *f)
* Leftover inbuf data gets packed, tail gets updated. * Leftover inbuf data gets packed, tail gets updated.
*/ */
static struct ast_frame * static struct ast_frame * lintoalaw_frameout (struct ast_translator_pvt *pvt)
lintoalaw_frameout (struct ast_translator_pvt *pvt)
{ {
struct alaw_encoder_pvt *tmp = (struct alaw_encoder_pvt *) pvt; struct alaw_encoder_pvt *tmp = (struct alaw_encoder_pvt *) pvt;
@ -274,12 +267,11 @@ lintoalaw_frameout (struct ast_translator_pvt *pvt)
} }
/* /*!
* alawToLin_Sample * \brief alawToLin_Sample
*/ */
static struct ast_frame * static struct ast_frame * alawtolin_sample (void)
alawtolin_sample (void)
{ {
static struct ast_frame f; static struct ast_frame f;
f.frametype = AST_FRAME_VOICE; f.frametype = AST_FRAME_VOICE;
@ -293,12 +285,11 @@ alawtolin_sample (void)
return &f; return &f;
} }
/* /*!
* LinToalaw_Sample * \brief LinToalaw_Sample
*/ */
static struct ast_frame * static struct ast_frame * lintoalaw_sample (void)
lintoalaw_sample (void)
{ {
static struct ast_frame f; static struct ast_frame f;
f.frametype = AST_FRAME_VOICE; f.frametype = AST_FRAME_VOICE;
@ -313,8 +304,8 @@ lintoalaw_sample (void)
return &f; return &f;
} }
/* /*!
* alaw_Destroy * \brief alaw_Destroy
* Destroys a private workspace. * Destroys a private workspace.
* *
* Results: * Results:
@ -324,16 +315,15 @@ lintoalaw_sample (void)
* None. * None.
*/ */
static void static void alaw_destroy (struct ast_translator_pvt *pvt)
alaw_destroy (struct ast_translator_pvt *pvt)
{ {
free (pvt); free (pvt);
localusecnt--; localusecnt--;
ast_update_use_count (); ast_update_use_count ();
} }
/* /*!
* The complete translator for alawToLin. * \brief The complete translator for alawToLin.
*/ */
static struct ast_translator alawtolin = { static struct ast_translator alawtolin = {
@ -348,8 +338,8 @@ static struct ast_translator alawtolin = {
alawtolin_sample alawtolin_sample
}; };
/* /*!
* The complete translator for LinToalaw. * \brief The complete translator for LinToalaw.
*/ */
static struct ast_translator lintoalaw = { static struct ast_translator lintoalaw = {
@ -364,8 +354,7 @@ static struct ast_translator lintoalaw = {
lintoalaw_sample lintoalaw_sample
}; };
static void static void parse_config(void)
parse_config(void)
{ {
struct ast_config *cfg; struct ast_config *cfg;
struct ast_variable *var; struct ast_variable *var;
@ -385,15 +374,13 @@ parse_config(void)
} }
} }
int int reload(void)
reload(void)
{ {
parse_config(); parse_config();
return 0; return 0;
} }
int int unload_module (void)
unload_module (void)
{ {
int res; int res;
ast_mutex_lock (&localuser_lock); ast_mutex_lock (&localuser_lock);
@ -406,8 +393,7 @@ unload_module (void)
return res; return res;
} }
int int load_module (void)
load_module (void)
{ {
int res; int res;
parse_config(); parse_config();
@ -423,22 +409,19 @@ load_module (void)
* Return a description of this module. * Return a description of this module.
*/ */
char * char * description (void)
description (void)
{ {
return tdesc; return tdesc;
} }
int int usecount (void)
usecount (void)
{ {
int res; int res;
STANDARD_USECOUNT (res); STANDARD_USECOUNT (res);
return res; return res;
} }
char * char * key ()
key ()
{ {
return ASTERISK_GPL_KEY; return ASTERISK_GPL_KEY;
} }

View File

@ -20,9 +20,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Translate between signed linear and G.723.1 * \brief Translate between signed linear and G.723.1
* *
*/ */

View File

@ -20,9 +20,9 @@
*/ */
/* /*! \file
* *
* codec_g726.c - translate between signed linear and ITU G.726-32kbps * \brief codec_g726.c - translate between signed linear and ITU G.726-32kbps
* *
*/ */

View File

@ -19,9 +19,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Translate between signed linear and Global System for Mobile Communications (GSM) * \brief Translate between signed linear and Global System for Mobile Communications (GSM)
* *
*/ */

View File

@ -18,9 +18,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Translate between signed linear and Internet Low Bitrate Codec * \brief Translate between signed linear and Internet Low Bitrate Codec
* *
*/ */

View File

@ -20,9 +20,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Translate between signed linear and LPC10 (Linear Predictor Code) * \brief Translate between signed linear and LPC10 (Linear Predictor Code)
* *
*/ */

View File

@ -5,8 +5,6 @@
* *
* Mark Spencer <markster@digium.com> * Mark Spencer <markster@digium.com>
* *
* This work was motivated by Jeremy McNamara
* hacked to be configurable by anthm and bkw 9/28/2004
* *
* See http://www.asterisk.org for more information about * See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact * the Asterisk project. Please do not directly contact
@ -19,10 +17,13 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Translate between signed linear and Speex (Open Codec) * \brief Translate between signed linear and Speex (Open Codec)
* *
* http://www.speex.org
* \note This work was motivated by Jeremy McNamara
* hacked to be configurable by anthm and bkw 9/28/2004
*/ */
#include <fcntl.h> #include <fcntl.h>

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* codec_ulaw.c - translate between signed linear and ulaw * \brief codec_ulaw.c - translate between signed linear and ulaw
* *
*/ */

View File

@ -1,9 +1,9 @@
/* /*! \file
* 8-bit raw data * \brief 8-bit raw data
* *
* Source: g723.example * Source: g723.example
* *
* Copyright (C) 1999, Mark Spencer * Copyright (C) 1999-2005, Digium, Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,11 +1,11 @@
/* /*! \file
* adpcm_slin_ex.h -- * adpcm_slin_ex.h --
* *
* 4-bit G.726 data, 20 milliseconds worth at 8 kHz. * \brief 4-bit G.726 data, 20 milliseconds worth at 8 kHz.
* *
* Source: g726.example * Source: g726.example
* *
* Copyright (C) 2001, Linux Support Services, Inc. * Copyright (C) 2001-2005, Digium, Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,9 +1,9 @@
/* /*! \file
* 8-bit raw data * \brief 8-bit raw data
* *
* Source: gsm.example * Source: gsm.example
* *
* Copyright (C) 1999, Mark Spencer * Copyright (C) 1999-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,9 +1,9 @@
/* /*! \file
* Raw 8-bit data * \brief Raw 8-bit data
* *
* Source: ilbc.out * Source: ilbc.out
* *
* Copyright (C) 1999, Mark Spencer and Linux Support Services * Copyright (C) 1999-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,10 +1,10 @@
/* log2comp.h - various base 2 log computation versions /*! \file \brief log2comp.h - various base 2 log computation versions
* *
* Asterisk -- A telephony toolkit for Linux. * Asterisk -- A telephony toolkit for Linux.
* *
* Implementation by Alex Volkov <codepro@usa.net> * \author Alex Volkov <codepro@usa.net>
* *
* Copyright (c) 2004 - 2005, Digium * Copyright (c) 2004 - 2005, Digium Inc.
* *
* This program is free software, distributed under the terms of * This program is free software, distributed under the terms of
* the GNU General Public License * the GNU General Public License

View File

@ -1,9 +1,9 @@
/* /*! \file
* 8-bit raw data * \brief 8-bit raw data
* *
* Source: example.lpc10 * Source: example.lpc10
* *
* Copyright (C) 1999, Mark Spencer and Linux Support Services * Copyright (C) 1999-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,11 +1,11 @@
/* /*! \file
* slin_adpcm_ex.h -- * \brief slin_adpcm_ex.h --
* *
* Signed 16-bit audio data, 10 milliseconds worth at 8 kHz. * Signed 16-bit audio data, 10 milliseconds worth at 8 kHz.
* *
* Source: g723.example * Source: g723.example
* *
* Copyright (C) 2001, Linux Support Services, Inc. * Copyright (C) 2001-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,9 +1,9 @@
/* /*! \file
* Signed 16-bit audio data * \brief Signed 16-bit audio data
* *
* Source: g723.example * Source: g723.example
* *
* Copyright (C) 1999, Mark Spencer * Copyright (C) 1999-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,11 +1,11 @@
/* /*! \file
* slin_adpcm_ex.h -- * \brief slin_adpcm_ex.h --
* *
* Signed 16-bit audio data, 10 milliseconds worth at 8 kHz. * Signed 16-bit audio data, 10 milliseconds worth at 8 kHz.
* *
* Source: g726.example * Source: g726.example
* *
* Copyright (C) 2001, Linux Support Services, Inc. * Copyright (C) 2001-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,9 +1,9 @@
/* /*! \file
* Signed 16-bit audio data * \brief Signed 16-bit audio data
* *
* Source: gsm.example * Source: gsm.example
* *
* Copyright (C) 1999, Mark Spencer * Copyright (C) 1999-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,9 +1,9 @@
/* /*! \file
* Signed 16-bit audio data * \brief Signed 16-bit audio data
* *
* Source: gsm.example * Source: gsm.example
* *
* Copyright (C) 1999, Mark Spencer * Copyright (C) 1999-2005, Digium Inc
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,9 +1,9 @@
/* /*! \file
* Signed 16-bit audio data * \brief Signed 16-bit audio data
* *
* Source: example.slin * Source: example.slin
* *
* Copyright (C) 1999, Mark Spencer and Linux Support Services * Copyright (C) 1999-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,9 +1,9 @@
/* /*! \file
* Signed 16-bit audio data, 500ms of speech at 8kHz to ensure no DTX triggered * \brief Signed 16-bit audio data, 500ms of speech at 8kHz to ensure no DTX triggered
* *
* Source: speex.example * Source: speex.example
* *
* Copyright (C) 1999, Mark Spencer * Copyright (C) 1999-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,11 +1,11 @@
/* /*! \file
* slin_ulaw_ex.h -- * \brief slin_ulaw_ex.h --
* *
* Signed 16-bit audio data, 10 milliseconds worth at 8 kHz. * Signed 16-bit audio data, 10 milliseconds worth at 8 kHz.
* *
* Source: g723.example * Source: g723.example
* *
* Copyright (C) 2001, Linux Support Services, Inc. * Copyright (C) 2001-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,9 +1,9 @@
/* /*! \file
* Random Data data * \brief Random Data data
* *
* Source: speex.raw * Source: speex.raw
* *
* Copyright (C) 1999, Mark Spencer and Linux Support Services * Copyright (C) 1999-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -1,11 +1,11 @@
/* /*! \file
* ulaw_slin_ex.h -- * \brief ulaw_slin_ex.h --
* *
* 4-bit ADPCM data, 20 milliseconds worth at 8 kHz. * 4-bit ADPCM data, 20 milliseconds worth at 8 kHz.
* *
* Source: g723.example * Source: g723.example
* *
* Copyright (C) 2001, Linux Support Services, Inc. * Copyright (C) 2001-2005, Digium Inc.
* *
* Distributed under the terms of the GNU General Public License * Distributed under the terms of the GNU General Public License
* *

View File

@ -15,9 +15,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Work with Sun Microsystems AU format. * \brief Work with Sun Microsystems AU format.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Old-style G.723 frame/timestamp format. * \brief Old-style G.723 frame/timestamp format.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*!\file
* *
* Headerless G.726 (16/24/32/40kbps) data format for Asterisk. * \brief Headerless G.726 (16/24/32/40kbps) data format for Asterisk.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Save to raw, headerless G729 data. * \brief Save to raw, headerless G729 data.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Save to raw, headerless GSM data. * \brief Save to raw, headerless GSM data.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Save to raw, headerless h263 data. * \brief Save to raw, headerless h263 data.
* *
*/ */

View File

@ -18,9 +18,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Save to raw, headerless iLBC data. * \brief Save to raw, headerless iLBC data.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* JPEG File format support. * \brief JPEG File format support.
* *
*/ */

View File

@ -14,9 +14,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* OGG/Vorbis streams. * \brief OGG/Vorbis streams.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Flat, binary, ulaw PCM file format. * \brief Flat, binary, ulaw PCM file format.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Flat, binary, alaw PCM file format. * \brief Flat, binary, alaw PCM file format.
* *
*/ */

View File

@ -15,9 +15,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* RAW SLINEAR Format * \brief RAW SLINEAR Format
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Flat, binary, ADPCM vox file format. * \brief Flat, binary, ADPCM vox file format.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Work with WAV in the proprietary Microsoft format. * \brief Work with WAV in the proprietary Microsoft format.
* *
*/ */

View File

@ -16,9 +16,9 @@
* at the top of the source tree. * at the top of the source tree.
*/ */
/* /*! \file
* *
* Save GSM in the proprietary Microsoft format. * \brief Save GSM in the proprietary Microsoft format.
* *
*/ */

View File

@ -11,6 +11,10 @@
* the GNU General Public License * the GNU General Public License
*/ */
/*! \file
* \brief Asterisk main include file. File version handling, generic pbx functions.
*/
#ifndef _ASTERISK_H #ifndef _ASTERISK_H
#define _ASTERISK_H #define _ASTERISK_H

View File

@ -37,6 +37,14 @@
* \arg \ref AstVar * \arg \ref AstVar
* \arg \ref AstENUM * \arg \ref AstENUM
* \arg \ref ConfigFiles * \arg \ref ConfigFiles
* \arg \ref SoundFiles
* \section wwwsites Web sites
* \arg Main: Asterisk Developer's website http://www.asterisk.org/developers/
* \arg Bugs: The Issue tracker http://bugs.digium.com
* \arg Lists: List server http://lists.digium.com
* \arg Wiki: The Asterisk Wiki http://www.voip-info.org
* \arg Docs: The Asterisk Documentation Project http://www.asteriskdocs.org
* \arg Digium: The Asterisk company http://www.digium.com
*/ */
/*! \page CodeGuide Coding Guidelines /*! \page CodeGuide Coding Guidelines
@ -45,6 +53,7 @@
* Make sure to stay up to date with the latest guidelines. * Make sure to stay up to date with the latest guidelines.
* \verbinclude CODING-GUIDELINES * \verbinclude CODING-GUIDELINES
*/ */
/*! \page AstAPI Asterisk API /*! \page AstAPI Asterisk API
* \section Asteriskapi Asterisk API * \section Asteriskapi Asterisk API
* This programmer's documentation covers the generic API. * This programmer's documentation covers the generic API.
@ -53,15 +62,19 @@
* \subsection channel Channels * \subsection channel Channels
* \verbinclude channel.txt * \verbinclude channel.txt
*/ */
/*! \page AstDebug Debugging /*! \page AstDebug Debugging
* \section debug Debugging * \section debug Debugging
* \verbinclude README.backtrace * \verbinclude README.backtrace
*/ */
/*! \page AstAMI AMI - The Manager Interface /*! \page AstAMI AMI - The Manager Interface
* \section ami AMI - The manager Interface * \section ami AMI - The manager Interface
* \arg \link Config_ami Configuration file \endlink * \arg \link Config_ami Configuration file \endlink
* \arg \ref manager.c
* \verbinclude manager.txt * \verbinclude manager.txt
*/ */
/*! \page AstARA ARA - The Asterisk Realtime Interface /*! \page AstARA ARA - The Asterisk Realtime Interface
* \section realtime ARA - a generic API to storage and retrieval * \section realtime ARA - a generic API to storage and retrieval
* Implemented in \ref config.c * Implemented in \ref config.c
@ -69,6 +82,7 @@
* \verbinclude README.realtime * \verbinclude README.realtime
* \verbinclude README.extconfig * \verbinclude README.extconfig
*/ */
/*! \page AstDUNDi DUNDi /*! \page AstDUNDi DUNDi
DUNDi is a peer-to-peer system for locating Internet gateways to telephony services. Unlike traditional centralized services (such as the remarkably simple and concise ENUM standard), DUNDi is fully-distributed with no centralized authority whatsoever. DUNDi is a peer-to-peer system for locating Internet gateways to telephony services. Unlike traditional centralized services (such as the remarkably simple and concise ENUM standard), DUNDi is fully-distributed with no centralized authority whatsoever.
@ -82,6 +96,7 @@ DUNDi is not itself a Voice-over IP signaling or media protocol. Instead, it pub
/*! \page AstCDR CDR - Call Data Records and billing /*! \page AstCDR CDR - Call Data Records and billing
* \section cdr Call Data Records * \section cdr Call Data Records
* \verbinclude README.cdr * \verbinclude README.cdr
* \arg \ref cdr.c
* \arg \ref Config_cdr CDR configuration files * \arg \ref Config_cdr CDR configuration files
*/ */
/*! \page AstREADME README - the general administrator introduction /*! \page AstREADME README - the general administrator introduction
@ -100,6 +115,9 @@ DUNDi is not itself a Voice-over IP signaling or media protocol. Instead, it pub
/*! \page AstENUM ENUM /*! \page AstENUM ENUM
* \section enumreadme ENUM * \section enumreadme ENUM
* \arg Configuration: \ref Config_enum * \arg Configuration: \ref Config_enum
* \arg \ref enum.c
* \arg \ref app_enumlookup.c
*
* \verbinclude README.enum * \verbinclude README.enum
*/ */
@ -210,19 +228,24 @@ DUNDi is not itself a Voice-over IP signaling or media protocol. Instead, it pub
/*! \page Config_rtp RTP configuration /*! \page Config_rtp RTP configuration
* \ref rtp.c * \ref rtp.c
* Used in \ref chan_sip.c and \ref chan_mgcp.c (and various H.323 channels)
* \section rtpconf rtp.conf * \section rtpconf rtp.conf
* \verbinclude rtp.conf.sample * \verbinclude rtp.conf.sample
*/ */
/*! \page Config_dun Dundi Configuration /*! \page Config_dun Dundi Configuration
* \arg See also \ref AstDundi * \arg See also \ref AstDundi
* \section dundiconf dundi.conf * \section dundiconf dundi.conf
* \verbinclude dundi.conf.sample * \verbinclude dundi.conf.sample
*/ */
/*! \page Config_enum ENUM Configuration /*! \page Config_enum ENUM Configuration
* \arg See also \ref enumreadme
* \section enumconf enum.conf * \section enumconf enum.conf
* \arg See also \ref enumreadme
* \arg \ref app_enumlookup.c
* \verbinclude enum.conf.sample * \verbinclude enum.conf.sample
*/ */
/*! \page Config_cdr CDR configuration /*! \page Config_cdr CDR configuration
* \arg \link cdrconf Main CDR Configuration \endlink * \arg \link cdrconf Main CDR Configuration \endlink
* \arg \link cdrcustom Custom CDR driver configuration \endlink * \arg \link cdrcustom Custom CDR driver configuration \endlink
@ -233,19 +256,28 @@ DUNDi is not itself a Voice-over IP signaling or media protocol. Instead, it pub
* \section cdrconf Main CDR configuration * \section cdrconf Main CDR configuration
* \verbinclude cdr.conf.sample * \verbinclude cdr.conf.sample
* \section cdrcustom Custom CDR driver configuration * \section cdrcustom Custom CDR driver configuration
* \arg \ref cdr_custom.c
* \verbinclude cdr_custom.conf.sample * \verbinclude cdr_custom.conf.sample
* \section cdrami Manager CDR driver configuration * \section cdrami Manager CDR driver configuration
* See also:
* \arg \ref AstAMI
* \arg \ref cdr_manager.c
* \verbinclude cdr_manager.conf.sample * \verbinclude cdr_manager.conf.sample
* \section cdrodbc ODBC CDR driver configuration * \section cdrodbc ODBC CDR driver configuration
* Based on http://www.unixodbc.org * See also:
* \arg http://www.unixodbc.org
* \arg \ref cdr_odbc.c
* \verbinclude cdr_odbc.conf.sample * \verbinclude cdr_odbc.conf.sample
* \section cdrpgsql Postgres CDR driver configuration * \section cdrpgsql Postgres CDR driver configuration
* \arg \ref cdr_pgsql.c
* \arg http://www.postgresql.org
* \verbinclude cdr_pgsql.conf.sample * \verbinclude cdr_pgsql.conf.sample
* \verbinclude cdr_tds.conf.sample
* \section cdrtds FreeTDS CDR driver configuration * \section cdrtds FreeTDS CDR driver configuration
* \arg http://www.freetds.org
* \verbinclude cdr_tds.conf.sample * \verbinclude cdr_tds.conf.sample
*/ */
/*! \page Config_moh Music on Hold Configuration /*! \page Config_moh Music on Hold Configuration
* \arg Implemented in \ref res_musiconhold.c * \arg Implemented in \ref res_musiconhold.c
* \section mohconf musiconhold.conf * \section mohconf musiconhold.conf
@ -284,3 +316,14 @@ DUNDi is not itself a Voice-over IP signaling or media protocol. Instead, it pub
* \verbinclude meetme.conf.sample * \verbinclude meetme.conf.sample
*/ */
/*! \page SoundFiles Sound files
* \section SecSound Asterisk Sound files
* Asterisk includes a large amount of sound files. Many of these
* are used by applications and demo scripts within asterisk.
*
* Additional sound files are available in the asterisk-addons
* repository on cvs.digium.com
*
* \section SoundList List of included sound files
* \verbinclude sounds.txt
*/

View File

@ -195,7 +195,7 @@ static int handle_showmancmd(int fd, int argc, char *argv[])
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
/*--- handle_showmancmds: CLI command */ /*! \brief handle_showmancmds: CLI command */
/* Should change to "manager show commands" */ /* Should change to "manager show commands" */
static int handle_showmancmds(int fd, int argc, char *argv[]) static int handle_showmancmds(int fd, int argc, char *argv[])
{ {
@ -215,7 +215,7 @@ static int handle_showmancmds(int fd, int argc, char *argv[])
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
/*--- handle_showmanconn: CLI command show manager connected */ /*! \brief handle_showmanconn: CLI command show manager connected */
/* Should change to "manager show connected" */ /* Should change to "manager show connected" */
static int handle_showmanconn(int fd, int argc, char *argv[]) static int handle_showmanconn(int fd, int argc, char *argv[])
{ {
@ -737,7 +737,7 @@ static int action_getvar(struct mansession *s, struct message *m)
} }
/*--- action_status: Manager "status" command to show channels */ /*! \brief action_status: Manager "status" command to show channels */
/* Needs documentation... */ /* Needs documentation... */
static int action_status(struct mansession *s, struct message *m) static int action_status(struct mansession *s, struct message *m)
{ {
@ -835,7 +835,7 @@ static char mandescr_redirect[] =
" *Priority: Priority to transfer to\n" " *Priority: Priority to transfer to\n"
" ActionID: Optional Action id for message matching.\n"; " ActionID: Optional Action id for message matching.\n";
/*--- action_redirect: The redirect manager command */ /*! \brief action_redirect: The redirect manager command */
static int action_redirect(struct mansession *s, struct message *m) static int action_redirect(struct mansession *s, struct message *m)
{ {
char *name = astman_get_header(m, "Channel"); char *name = astman_get_header(m, "Channel");
@ -892,7 +892,7 @@ static char mandescr_command[] =
" *Command: Asterisk CLI command to run\n" " *Command: Asterisk CLI command to run\n"
" ActionID: Optional Action id for message matching.\n"; " ActionID: Optional Action id for message matching.\n";
/*--- action_command: Manager command "command" - execute CLI command */ /*! \brief action_command: Manager command "command" - execute CLI command */
static int action_command(struct mansession *s, struct message *m) static int action_command(struct mansession *s, struct message *m)
{ {
char *cmd = astman_get_header(m, "Command"); char *cmd = astman_get_header(m, "Command");
@ -1477,7 +1477,7 @@ static int append_event(struct mansession *s, const char *str)
return -1; return -1;
} }
/*--- manager_event: Send AMI event to client */ /*! \brief manager_event: Send AMI event to client */
int manager_event(int category, char *event, char *fmt, ...) int manager_event(int category, char *event, char *fmt, ...)
{ {
struct mansession *s; struct mansession *s;

32
pbx.c
View File

@ -57,8 +57,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/app.h" #include "asterisk/app.h"
#include "asterisk/devicestate.h" #include "asterisk/devicestate.h"
/* /*!
* I M P O R T A N T : * \note I M P O R T A N T :
* *
* The speed of extension handling will likely be among the most important * The speed of extension handling will likely be among the most important
* aspects of this PBX. The switching scheme as it exists right now isn't * aspects of this PBX. The switching scheme as it exists right now isn't
@ -984,7 +984,7 @@ static char *substring(char *value, int offset, int length, char *workspace, siz
return ret; return ret;
} }
/*--- pbx_retrieve_variable: Support for Asterisk built-in variables and /*! \brief pbx_retrieve_variable: Support for Asterisk built-in variables and
functions in the dialplan functions in the dialplan
---*/ ---*/
void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, char *workspace, int workspacelen, struct varshead *headp) void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, char *workspace, int workspacelen, struct varshead *headp)
@ -1769,7 +1769,7 @@ static int pbx_extension_helper(struct ast_channel *c, struct ast_context *con,
} }
/*--- ast_hint_extension: Find hint for given extension in context */ /*! \brief ast_hint_extension: Find hint for given extension in context */
static struct ast_exten *ast_hint_extension(struct ast_channel *c, const char *context, const char *exten) static struct ast_exten *ast_hint_extension(struct ast_channel *c, const char *context, const char *exten)
{ {
struct ast_exten *e; struct ast_exten *e;
@ -1789,7 +1789,7 @@ static struct ast_exten *ast_hint_extension(struct ast_channel *c, const char *c
return e; return e;
} }
/*--- ast_extensions_state2: Check state of extension by using hints */ /*! \brief ast_extensions_state2: Check state of extension by using hints */
static int ast_extension_state2(struct ast_exten *e) static int ast_extension_state2(struct ast_exten *e)
{ {
char hint[AST_MAX_EXTENSION] = ""; char hint[AST_MAX_EXTENSION] = "";
@ -1863,7 +1863,7 @@ static int ast_extension_state2(struct ast_exten *e)
return AST_EXTENSION_NOT_INUSE; return AST_EXTENSION_NOT_INUSE;
} }
/*--- ast_extension_state2str: Return extension_state as string */ /*! \brief ast_extension_state2str: Return extension_state as string */
const char *ast_extension_state2str(int extension_state) const char *ast_extension_state2str(int extension_state)
{ {
int i; int i;
@ -1876,7 +1876,7 @@ const char *ast_extension_state2str(int extension_state)
return "Unknown"; return "Unknown";
} }
/*--- ast_extension_state: Check extension state for an extension by using hint */ /*! \brief ast_extension_state: Check extension state for an extension by using hint */
int ast_extension_state(struct ast_channel *c, char *context, char *exten) int ast_extension_state(struct ast_channel *c, char *context, char *exten)
{ {
struct ast_exten *e; struct ast_exten *e;
@ -1930,7 +1930,7 @@ void ast_hint_state_changed(const char *device)
ast_mutex_unlock(&hintlock); ast_mutex_unlock(&hintlock);
} }
/*--- ast_extension_state_add: Add watcher for extension states */ /*! \brief ast_extension_state_add: Add watcher for extension states */
int ast_extension_state_add(const char *context, const char *exten, int ast_extension_state_add(const char *context, const char *exten,
ast_state_cb_type callback, void *data) ast_state_cb_type callback, void *data)
{ {
@ -2013,7 +2013,7 @@ int ast_extension_state_add(const char *context, const char *exten,
return cblist->id; return cblist->id;
} }
/*--- ast_extension_state_del: Remove a watcher from the callback list */ /*! \brief ast_extension_state_del: Remove a watcher from the callback list */
int ast_extension_state_del(int id, ast_state_cb_type callback) int ast_extension_state_del(int id, ast_state_cb_type callback)
{ {
struct ast_hint *list; struct ast_hint *list;
@ -2076,7 +2076,7 @@ int ast_extension_state_del(int id, ast_state_cb_type callback)
return -1; return -1;
} }
/*--- ast_add_hint: Add hint to hint list, check initial extension state */ /*! \brief ast_add_hint: Add hint to hint list, check initial extension state */
static int ast_add_hint(struct ast_exten *e) static int ast_add_hint(struct ast_exten *e)
{ {
struct ast_hint *list; struct ast_hint *list;
@ -2119,7 +2119,7 @@ static int ast_add_hint(struct ast_exten *e)
return 0; return 0;
} }
/*--- ast_change_hint: Change hint for an extension */ /*! \brief ast_change_hint: Change hint for an extension */
static int ast_change_hint(struct ast_exten *oe, struct ast_exten *ne) static int ast_change_hint(struct ast_exten *oe, struct ast_exten *ne)
{ {
struct ast_hint *list; struct ast_hint *list;
@ -2140,7 +2140,7 @@ static int ast_change_hint(struct ast_exten *oe, struct ast_exten *ne)
return -1; return -1;
} }
/*--- ast_remove_hint: Remove hint from extension */ /*! \brief ast_remove_hint: Remove hint from extension */
static int ast_remove_hint(struct ast_exten *e) static int ast_remove_hint(struct ast_exten *e)
{ {
/* Cleanup the Notifys if hint is removed */ /* Cleanup the Notifys if hint is removed */
@ -2185,7 +2185,7 @@ static int ast_remove_hint(struct ast_exten *e)
} }
/*--- ast_get_hint: Get hint for channel */ /*! \brief ast_get_hint: Get hint for channel */
int ast_get_hint(char *hint, int hintsize, char *name, int namesize, struct ast_channel *c, const char *context, const char *exten) int ast_get_hint(char *hint, int hintsize, char *name, int namesize, struct ast_channel *c, const char *context, const char *exten)
{ {
struct ast_exten *e; struct ast_exten *e;
@ -3129,7 +3129,7 @@ static int handle_show_application(int fd, int argc, char *argv[])
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
/*--- handle_show_hints: CLI support for listing registred dial plan hints */ /*! \brief handle_show_hints: CLI support for listing registred dial plan hints */
static int handle_show_hints(int fd, int argc, char *argv[]) static int handle_show_hints(int fd, int argc, char *argv[])
{ {
struct ast_hint *hint; struct ast_hint *hint;
@ -3164,7 +3164,7 @@ static int handle_show_hints(int fd, int argc, char *argv[])
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
/*--- handle_show_switches: CLI support for listing registred dial plan switches */ /*! \brief handle_show_switches: CLI support for listing registred dial plan switches */
static int handle_show_switches(int fd, int argc, char *argv[]) static int handle_show_switches(int fd, int argc, char *argv[])
{ {
struct ast_switch *sw; struct ast_switch *sw;
@ -3927,7 +3927,7 @@ static char *days[] =
"sat", "sat",
}; };
/*--- get_dow: Get day of week */ /*! \brief get_dow: Get day of week */
static unsigned int get_dow(char *dow) static unsigned int get_dow(char *dow)
{ {
char *c; char *c;

46
say.c
View File

@ -402,7 +402,7 @@ static int wait_file(struct ast_channel *chan, const char *ints, const char *fil
return res; return res;
} }
/*--- ast_say_number_full: call language-specific functions */ /*! \brief ast_say_number_full: call language-specific functions */
/* Called from AGI */ /* Called from AGI */
int ast_say_number_full(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd) int ast_say_number_full(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
{ {
@ -446,13 +446,13 @@ int ast_say_number_full(struct ast_channel *chan, int num, const char *ints, con
return(ast_say_number_full_en(chan, num, ints, language, audiofd, ctrlfd)); return(ast_say_number_full_en(chan, num, ints, language, audiofd, ctrlfd));
} }
/*--- ast_say_number: call language-specific functions without file descriptors */ /*! \brief ast_say_number: call language-specific functions without file descriptors */
int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options) int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options)
{ {
return(ast_say_number_full(chan, num, ints, language, options, -1, -1)); return(ast_say_number_full(chan, num, ints, language, options, -1, -1));
} }
/*--- ast_say_number_full_en: English syntax */ /*! \brief ast_say_number_full_en: English syntax */
/* This is the default syntax, if no other syntax defined in this file is used */ /* This is the default syntax, if no other syntax defined in this file is used */
static int ast_say_number_full_en(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd) static int ast_say_number_full_en(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd)
{ {
@ -526,7 +526,7 @@ static int exp10_int(int power)
return res; return res;
} }
/*--- ast_say_number_full_cz: Czech syntax */ /*! \brief ast_say_number_full_cz: Czech syntax */
/* files needed: /* files needed:
* 1m,2m - gender male * 1m,2m - gender male
* 1w,2w - gender female * 1w,2w - gender female
@ -641,7 +641,7 @@ static int ast_say_number_full_cz(struct ast_channel *chan, int num, const char
return res; return res;
} }
/*--- ast_say_number_full_da: Danish syntax */ /*! \brief ast_say_number_full_da: Danish syntax */
/* New files: /* New files:
In addition to English, the following sounds are required: "1N", "millions", "and" and "1-and" through "9-and" In addition to English, the following sounds are required: "1N", "millions", "and" and "1-and" through "9-and"
*/ */
@ -749,7 +749,7 @@ static int ast_say_number_full_da(struct ast_channel *chan, int num, const char
return res; return res;
} }
/*--- ast_say_number_full_de: German syntax */ /*! \brief ast_say_number_full_de: German syntax */
/* New files: /* New files:
In addition to English, the following sounds are required: In addition to English, the following sounds are required:
"millions" "millions"
@ -889,7 +889,7 @@ static int ast_say_number_full_de(struct ast_channel *chan, int num, const char
return res; return res;
} }
/*--- ast_say_number_full_en_GB: British and Norwegian syntax */ /*! \brief ast_say_number_full_en_GB: British and Norwegian syntax */
/* New files: /* New files:
In addition to American English, the following sounds are required: "and" In addition to American English, the following sounds are required: "and"
*/ */
@ -965,7 +965,7 @@ static int ast_say_number_full_en_GB(struct ast_channel *chan, int num, const ch
return res; return res;
} }
/*--- ast_say_number_full_es: Spanish syntax */ /*! \brief ast_say_number_full_es: Spanish syntax */
/* New files: /* New files:
Requires a few new audios: Requires a few new audios:
1F.gsm: feminine 'una' 1F.gsm: feminine 'una'
@ -1071,7 +1071,7 @@ static int ast_say_number_full_es(struct ast_channel *chan, int num, const char
return res; return res;
} }
/*--- ast_say_number_full_fr: French syntax */ /*! \brief ast_say_number_full_fr: French syntax */
/* Extra sounds needed: /* Extra sounds needed:
1F: feminin 'une' 1F: feminin 'une'
et: 'and' */ et: 'and' */
@ -1163,7 +1163,7 @@ static int ast_say_number_full_fr(struct ast_channel *chan, int num, const char
/*--- ast_say_number_full_he: Hebrew syntax */ /*! \brief ast_say_number_full_he: Hebrew syntax */
/* Extra sounds needed: /* Extra sounds needed:
1F: feminin 'one' 1F: feminin 'one'
ve: 'and' ve: 'and'
@ -1307,7 +1307,7 @@ static int ast_say_number_full_he(struct ast_channel *chan, int num,
return res; return res;
} }
/*--- ast_say_number_full_it: Italian */ /*! \brief ast_say_number_full_it: Italian */
static int ast_say_number_full_it(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd) static int ast_say_number_full_it(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd)
{ {
int res = 0; int res = 0;
@ -1460,7 +1460,7 @@ static int ast_say_number_full_it(struct ast_channel *chan, int num, const char
return res; return res;
} }
/*--- ast_say_number_full_nl: dutch syntax */ /*! \brief ast_say_number_full_nl: dutch syntax */
/* New files: digits/nl-en /* New files: digits/nl-en
*/ */
static int ast_say_number_full_nl(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd) static int ast_say_number_full_nl(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd)
@ -1537,7 +1537,7 @@ static int ast_say_number_full_nl(struct ast_channel *chan, int num, const char
return res; return res;
} }
/*--- ast_say_number_full_no: Norwegian syntax */ /*! \brief ast_say_number_full_no: Norwegian syntax */
/* New files: /* New files:
In addition to American English, the following sounds are required: "and", "1N" In addition to American English, the following sounds are required: "and", "1N"
*/ */
@ -2018,7 +2018,7 @@ static int ast_say_number_full_pt(struct ast_channel *chan, int num, const char
return res; return res;
} }
/*--- ast_say_number_full_se: Swedish syntax */ /*! \brief ast_say_number_full_se: Swedish syntax */
static int ast_say_number_full_se(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd) static int ast_say_number_full_se(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
{ {
int res = 0; int res = 0;
@ -2090,7 +2090,7 @@ static int ast_say_number_full_se(struct ast_channel *chan, int num, const char
return res; return res;
} }
/*--- ast_say_number_full_tw: Taiwanese syntax */ /*! \brief ast_say_number_full_tw: Taiwanese syntax */
static int ast_say_number_full_tw(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd) static int ast_say_number_full_tw(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd)
{ {
int res = 0; int res = 0;
@ -2156,7 +2156,7 @@ static int ast_say_number_full_tw(struct ast_channel *chan, int num, const char
} }
/*--- determine last digits for thousands/millions (ru) */ /*! \brief determine last digits for thousands/millions (ru) */
static int get_lastdigits_ru(int num) { static int get_lastdigits_ru(int num) {
if (num < 20) { if (num < 20) {
return num; return num;
@ -2169,8 +2169,8 @@ static int get_lastdigits_ru(int num) {
} }
/*--- ast_say_number_full_ru: Russian syntax */ /*! \brief ast_say_number_full_ru: Russian syntax */
/*--- additional files: /*! \brief additional files:
n00.gsm (one hundred, two hundred, ...) n00.gsm (one hundred, two hundred, ...)
thousand.gsm thousand.gsm
million.gsm million.gsm
@ -2262,7 +2262,7 @@ static int ast_say_number_full_ru(struct ast_channel *chan, int num, const char
} }
/*--- ast_say_enumeration_full: call language-specific functions */ /*! \brief ast_say_enumeration_full: call language-specific functions */
/* Called from AGI */ /* Called from AGI */
int ast_say_enumeration_full(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd) int ast_say_enumeration_full(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
{ {
@ -2278,13 +2278,13 @@ int ast_say_enumeration_full(struct ast_channel *chan, int num, const char *ints
return(ast_say_enumeration_full_en(chan, num, ints, language, audiofd, ctrlfd)); return(ast_say_enumeration_full_en(chan, num, ints, language, audiofd, ctrlfd));
} }
/*--- ast_say_enumeration: call language-specific functions without file descriptors */ /*! \brief ast_say_enumeration: call language-specific functions without file descriptors */
int ast_say_enumeration(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options) int ast_say_enumeration(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options)
{ {
return(ast_say_enumeration_full(chan, num, ints, language, options, -1, -1)); return(ast_say_enumeration_full(chan, num, ints, language, options, -1, -1));
} }
/*--- ast_say_enumeration_full_en: English syntax */ /*! \brief ast_say_enumeration_full_en: English syntax */
/* This is the default syntax, if no other syntax defined in this file is used */ /* This is the default syntax, if no other syntax defined in this file is used */
static int ast_say_enumeration_full_en(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd) static int ast_say_enumeration_full_en(struct ast_channel *chan, int num, const char *ints, const char *language, int audiofd, int ctrlfd)
{ {
@ -2383,7 +2383,7 @@ static int ast_say_enumeration_full_en(struct ast_channel *chan, int num, const
return res; return res;
} }
/*--- ast_say_enumeration_full_da: Danish syntax */ /*! \brief ast_say_enumeration_full_da: Danish syntax */
static int ast_say_enumeration_full_da(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd) static int ast_say_enumeration_full_da(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
{ {
/* options can be: '' or 'm' male gender; 'f' female gender; 'n' neuter gender; 'p' plural */ /* options can be: '' or 'm' male gender; 'f' female gender; 'n' neuter gender; 'p' plural */
@ -2546,7 +2546,7 @@ static int ast_say_enumeration_full_da(struct ast_channel *chan, int num, const
return res; return res;
} }
/*--- ast_say_enumeration_full_de: German syntax */ /*! \brief ast_say_enumeration_full_de: German syntax */
static int ast_say_enumeration_full_de(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd) static int ast_say_enumeration_full_de(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
{ {
/* options can be: '' or 'm' male gender; 'f' female gender; 'n' neuter gender; 'p' plural */ /* options can be: '' or 'm' male gender; 'f' female gender; 'n' neuter gender; 'p' plural */

16
utils.c
View File

@ -167,7 +167,7 @@ static int gethostbyname_r (const char *name, struct hostent *ret, char *buf,
#endif #endif
/* Re-entrant (thread safe) version of gethostbyname that replaces the /*! \brief Re-entrant (thread safe) version of gethostbyname that replaces the
standard gethostbyname (which is not thread safe) standard gethostbyname (which is not thread safe)
*/ */
struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp) struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp)
@ -217,9 +217,6 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp)
} }
/* This is a regression test for recursive mutexes.
test_for_thread_safety() will return 0 if recursive mutex locks are
working properly, and non-zero if they are not working properly. */
AST_MUTEX_DEFINE_STATIC(test_lock); AST_MUTEX_DEFINE_STATIC(test_lock);
AST_MUTEX_DEFINE_STATIC(test_lock2); AST_MUTEX_DEFINE_STATIC(test_lock2);
@ -227,6 +224,9 @@ static pthread_t test_thread;
static int lock_count = 0; static int lock_count = 0;
static int test_errors = 0; static int test_errors = 0;
/*! \brief This is a regression test for recursive mutexes.
test_for_thread_safety() will return 0 if recursive mutex locks are
working properly, and non-zero if they are not working properly. */
static void *test_thread_body(void *data) static void *test_thread_body(void *data)
{ {
ast_mutex_lock(&test_lock); ast_mutex_lock(&test_lock);
@ -278,7 +278,7 @@ int test_for_thread_safety(void)
return(test_errors); /* return 0 on success. */ return(test_errors); /* return 0 on success. */
} }
/*--- ast_md5_hash: Produce 16 char MD5 hash of value. ---*/ /*! \brief ast_md5_hash: Produce 16 char MD5 hash of value. ---*/
void ast_md5_hash(char *output, char *input) void ast_md5_hash(char *output, char *input)
{ {
struct MD5Context md5; struct MD5Context md5;
@ -409,7 +409,7 @@ static void base64_init(void)
#endif #endif
} }
/*--- ast_uri_encode: Turn text string to URI-encoded %XX version ---*/ /*! \brief ast_uri_encode: Turn text string to URI-encoded %XX version ---*/
/* At this point, we're converting from ISO-8859-x (8-bit), not UTF8 /* At this point, we're converting from ISO-8859-x (8-bit), not UTF8
as in the SIP protocol spec as in the SIP protocol spec
If doreserved == 1 we will convert reserved characters also. If doreserved == 1 we will convert reserved characters also.
@ -451,7 +451,7 @@ char *ast_uri_encode(char *string, char *outbuf, int buflen, int doreserved)
return outbuf; return outbuf;
} }
/*--- ast_uri_decode: Decode SIP URI, URN, URL (overwrite the string) ---*/ /*! \brief ast_uri_decode: Decode SIP URI, URN, URL (overwrite the string) ---*/
void ast_uri_decode(char *s) void ast_uri_decode(char *s)
{ {
char *o; char *o;
@ -468,7 +468,7 @@ void ast_uri_decode(char *s)
*o = '\0'; *o = '\0';
} }
/*--- ast_inet_ntoa: Recursive thread safe replacement of inet_ntoa */ /*! \brief ast_inet_ntoa: Recursive thread safe replacement of inet_ntoa */
const char *ast_inet_ntoa(char *buf, int bufsiz, struct in_addr ia) const char *ast_inet_ntoa(char *buf, int bufsiz, struct in_addr ia)
{ {
return inet_ntop(AF_INET, &ia, buf, bufsiz); return inet_ntop(AF_INET, &ia, buf, bufsiz);