mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 07:01:09 +00:00
Doxygen additions, corrections
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -19,6 +19,14 @@
|
|||||||
* this code.
|
* this code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*! \file
|
||||||
|
*
|
||||||
|
* \brief Answering machine detection
|
||||||
|
*
|
||||||
|
* \author Claude Klimos (claude.klimos@aheeva.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "asterisk.h"
|
#include "asterisk.h"
|
||||||
|
|
||||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||||
|
@@ -334,6 +334,7 @@ struct volume {
|
|||||||
int actual; /*!< Actual volume adjustment (for channels that can't adjust) */
|
int actual; /*!< Actual volume adjustment (for channels that can't adjust) */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*! \brief The MeetMe User object */
|
||||||
struct ast_conf_user {
|
struct ast_conf_user {
|
||||||
int user_no; /*!< User Number */
|
int user_no; /*!< User Number */
|
||||||
int userflags; /*!< Flags as set in the conference */
|
int userflags; /*!< Flags as set in the conference */
|
||||||
|
@@ -120,10 +120,9 @@ setcapabilities_cb on_setcapabilities;
|
|||||||
setpeercapabilities_cb on_setpeercapabilities;
|
setpeercapabilities_cb on_setpeercapabilities;
|
||||||
onhold_cb on_hold;
|
onhold_cb on_hold;
|
||||||
|
|
||||||
/* global debug flag */
|
int h323debug; /*!< global debug flag */
|
||||||
int h323debug;
|
|
||||||
|
|
||||||
/*! Global jitterbuffer configuration - by default, jb is disabled */
|
/*! \brief Global jitterbuffer configuration - by default, jb is disabled */
|
||||||
static struct ast_jb_conf default_jbconf =
|
static struct ast_jb_conf default_jbconf =
|
||||||
{
|
{
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
@@ -156,79 +155,81 @@ static unsigned int unique = 0;
|
|||||||
|
|
||||||
static call_options_t global_options;
|
static call_options_t global_options;
|
||||||
|
|
||||||
/** Private structure of a OpenH323 channel */
|
/*! \brief Private structure of a OpenH323 channel */
|
||||||
struct oh323_pvt {
|
struct oh323_pvt {
|
||||||
ast_mutex_t lock; /* Channel private lock */
|
ast_mutex_t lock; /*!< Channel private lock */
|
||||||
call_options_t options; /* Options to be used during call setup */
|
call_options_t options; /*!<!< Options to be used during call setup */
|
||||||
int alreadygone; /* Whether or not we've already been destroyed by our peer */
|
int alreadygone; /*!< Whether or not we've already been destroyed by our peer */
|
||||||
int needdestroy; /* if we need to be destroyed */
|
int needdestroy; /*!< if we need to be destroyed */
|
||||||
call_details_t cd; /* Call details */
|
call_details_t cd; /*!< Call details */
|
||||||
struct ast_channel *owner; /* Who owns us */
|
struct ast_channel *owner; /*!< Who owns us */
|
||||||
struct sockaddr_in sa; /* Our peer */
|
struct sockaddr_in sa; /*!< Our peer */
|
||||||
struct sockaddr_in redirip; /* Where our RTP should be going if not to us */
|
struct sockaddr_in redirip; /*!< Where our RTP should be going if not to us */
|
||||||
int nonCodecCapability; /* non-audio capability */
|
int nonCodecCapability; /*!< non-audio capability */
|
||||||
int outgoing; /* Outgoing or incoming call? */
|
int outgoing; /*!< Outgoing or incoming call? */
|
||||||
char exten[AST_MAX_EXTENSION]; /* Requested extension */
|
char exten[AST_MAX_EXTENSION]; /*!< Requested extension */
|
||||||
char context[AST_MAX_CONTEXT]; /* Context where to start */
|
char context[AST_MAX_CONTEXT]; /*!< Context where to start */
|
||||||
char accountcode[256]; /* Account code */
|
char accountcode[256]; /*!< Account code */
|
||||||
char rdnis[80]; /* Referring DNIS, if available */
|
char rdnis[80]; /*!< Referring DNIS, if available */
|
||||||
int amaflags; /* AMA Flags */
|
int amaflags; /*!< AMA Flags */
|
||||||
struct ast_rtp *rtp; /* RTP Session */
|
struct ast_rtp *rtp; /*!< RTP Session */
|
||||||
struct ast_dsp *vad; /* Used for in-band DTMF detection */
|
struct ast_dsp *vad; /*!< Used for in-band DTMF detection */
|
||||||
int nativeformats; /* Codec formats supported by a channel */
|
int nativeformats; /*!< Codec formats supported by a channel */
|
||||||
int needhangup; /* Send hangup when Asterisk is ready */
|
int needhangup; /*!< Send hangup when Asterisk is ready */
|
||||||
int hangupcause; /* Hangup cause from OpenH323 layer */
|
int hangupcause; /*!< Hangup cause from OpenH323 layer */
|
||||||
int newstate; /* Pending state change */
|
int newstate; /*!< Pending state change */
|
||||||
int newcontrol; /* Pending control to send */
|
int newcontrol; /*!< Pending control to send */
|
||||||
int newdigit; /* Pending DTMF digit to send */
|
int newdigit; /*!< Pending DTMF digit to send */
|
||||||
int newduration; /* Pending DTMF digit duration to send */
|
int newduration; /*!< Pending DTMF digit duration to send */
|
||||||
int pref_codec; /* Preferred codec */
|
int pref_codec; /*!< Preferred codec */
|
||||||
int peercapability; /* Capabilities learned from peer */
|
int peercapability; /*!< Capabilities learned from peer */
|
||||||
int jointcapability; /* Common capabilities for local and remote side */
|
int jointcapability; /*!< Common capabilities for local and remote side */
|
||||||
struct ast_codec_pref peer_prefs; /* Preferenced list of codecs which remote side supports */
|
struct ast_codec_pref peer_prefs; /*!< Preferenced list of codecs which remote side supports */
|
||||||
int dtmf_pt[2]; /* Payload code used for RFC2833/CISCO messages */
|
int dtmf_pt[2]; /*!< Payload code used for RFC2833/CISCO messages */
|
||||||
int curDTMF; /* DTMF tone being generated to Asterisk side */
|
int curDTMF; /*!< DTMF tone being generated to Asterisk side */
|
||||||
int DTMFsched; /* Scheduler descriptor for DTMF */
|
int DTMFsched; /*!< Scheduler descriptor for DTMF */
|
||||||
int update_rtp_info; /* Configuration of fd's array is pending */
|
int update_rtp_info; /*!< Configuration of fd's array is pending */
|
||||||
int recvonly; /* Peer isn't wish to receive our voice stream */
|
int recvonly; /*!< Peer isn't wish to receive our voice stream */
|
||||||
int txDtmfDigit; /* DTMF digit being to send to H.323 side */
|
int txDtmfDigit; /*!< DTMF digit being to send to H.323 side */
|
||||||
int noInbandDtmf; /* Inband DTMF processing by DSP isn't available */
|
int noInbandDtmf; /*!< Inband DTMF processing by DSP isn't available */
|
||||||
int connection_established; /* Call got CONNECT message */
|
int connection_established; /*!< Call got CONNECT message */
|
||||||
int got_progress; /* Call got PROGRESS message, pass inband audio */
|
int got_progress; /*!< Call got PROGRESS message, pass inband audio */
|
||||||
struct oh323_pvt *next; /* Next channel in list */
|
struct oh323_pvt *next; /*!< Next channel in list */
|
||||||
} *iflist = NULL;
|
} *iflist = NULL;
|
||||||
|
|
||||||
static struct ast_user_list {
|
/*! \brief H323 User list */
|
||||||
|
static struct h323_user_list {
|
||||||
ASTOBJ_CONTAINER_COMPONENTS(struct oh323_user);
|
ASTOBJ_CONTAINER_COMPONENTS(struct oh323_user);
|
||||||
} userl;
|
} userl;
|
||||||
|
|
||||||
static struct ast_peer_list {
|
/*! \brief H323 peer list */
|
||||||
|
static struct h323_peer_list {
|
||||||
ASTOBJ_CONTAINER_COMPONENTS(struct oh323_peer);
|
ASTOBJ_CONTAINER_COMPONENTS(struct oh323_peer);
|
||||||
} peerl;
|
} peerl;
|
||||||
|
|
||||||
static struct ast_alias_list {
|
/*! \brief H323 alias list */
|
||||||
|
static struct h323_alias_list {
|
||||||
ASTOBJ_CONTAINER_COMPONENTS(struct oh323_alias);
|
ASTOBJ_CONTAINER_COMPONENTS(struct oh323_alias);
|
||||||
} aliasl;
|
} aliasl;
|
||||||
|
|
||||||
/** Asterisk RTP stuff */
|
/* Asterisk RTP stuff */
|
||||||
static struct sched_context *sched;
|
static struct sched_context *sched;
|
||||||
static struct io_context *io;
|
static struct io_context *io;
|
||||||
|
|
||||||
/** Protect the interface list (oh323_pvt) */
|
AST_MUTEX_DEFINE_STATIC(iflock); /*!< Protect the interface list (oh323_pvt) */
|
||||||
AST_MUTEX_DEFINE_STATIC(iflock);
|
|
||||||
|
|
||||||
/* Protect the monitoring thread, so only one process can kill or start it, and not
|
/*! \brief Protect the H.323 monitoring thread, so only one process can kill or start it, and not
|
||||||
when it's doing something critical. */
|
when it's doing something critical. */
|
||||||
AST_MUTEX_DEFINE_STATIC(monlock);
|
AST_MUTEX_DEFINE_STATIC(monlock);
|
||||||
|
|
||||||
/* Protect the H.323 capabilities list, to avoid more than one channel to set the capabilities simultaneaously in the h323 stack. */
|
/*! \brief Protect the H.323 capabilities list, to avoid more than one channel to set the capabilities simultaneaously in the h323 stack. */
|
||||||
AST_MUTEX_DEFINE_STATIC(caplock);
|
AST_MUTEX_DEFINE_STATIC(caplock);
|
||||||
|
|
||||||
/* Protect the reload process */
|
/*! \brief Protect the reload process */
|
||||||
AST_MUTEX_DEFINE_STATIC(h323_reload_lock);
|
AST_MUTEX_DEFINE_STATIC(h323_reload_lock);
|
||||||
static int h323_reloading = 0;
|
static int h323_reloading = 0;
|
||||||
|
|
||||||
/* This is the thread for the monitor which checks for input on the channels
|
/*! \brief This is the thread for the monitor which checks for input on the channels
|
||||||
which are not currently in use. */
|
which are not currently in use. */
|
||||||
static pthread_t monitor_thread = AST_PTHREADT_NULL;
|
static pthread_t monitor_thread = AST_PTHREADT_NULL;
|
||||||
static int restart_monitor(void);
|
static int restart_monitor(void);
|
||||||
@@ -336,7 +337,7 @@ static int oh323_simulate_dtmf_end(void *data)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Channel and private structures should be already locked */
|
/*! \brief Channel and private structures should be already locked */
|
||||||
static void __oh323_update_info(struct ast_channel *c, struct oh323_pvt *pvt)
|
static void __oh323_update_info(struct ast_channel *c, struct oh323_pvt *pvt)
|
||||||
{
|
{
|
||||||
if (c->nativeformats != pvt->nativeformats) {
|
if (c->nativeformats != pvt->nativeformats) {
|
||||||
@@ -402,7 +403,7 @@ static void __oh323_update_info(struct ast_channel *c, struct oh323_pvt *pvt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only channel structure should be locked */
|
/*! \brief Only channel structure should be locked */
|
||||||
static void oh323_update_info(struct ast_channel *c)
|
static void oh323_update_info(struct ast_channel *c)
|
||||||
{
|
{
|
||||||
struct oh323_pvt *pvt = c->tech_pvt;
|
struct oh323_pvt *pvt = c->tech_pvt;
|
||||||
@@ -546,7 +547,7 @@ static int oh323_digit_begin(struct ast_channel *c, char digit)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Send (play) the specified digit to the channel.
|
* Send (play) the specified digit to the channel.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -584,7 +585,7 @@ static int oh323_digit_end(struct ast_channel *c, char digit, unsigned int durat
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Make a call over the specified channel to the specified
|
* Make a call over the specified channel to the specified
|
||||||
* destination.
|
* destination.
|
||||||
* Returns -1 on error, 0 on success.
|
* Returns -1 on error, 0 on success.
|
||||||
@@ -757,9 +758,9 @@ static int oh323_hangup(struct ast_channel *c)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! \brief Retrieve audio/etc from channel. Assumes pvt->lock is already held. */
|
||||||
static struct ast_frame *oh323_rtp_read(struct oh323_pvt *pvt)
|
static struct ast_frame *oh323_rtp_read(struct oh323_pvt *pvt)
|
||||||
{
|
{
|
||||||
/* Retrieve audio/etc from channel. Assumes pvt->lock is already held. */
|
|
||||||
struct ast_frame *f;
|
struct ast_frame *f;
|
||||||
|
|
||||||
/* Only apply it for the first packet, we just need the correct ip/port */
|
/* Only apply it for the first packet, we just need the correct ip/port */
|
||||||
@@ -1004,7 +1005,7 @@ static int __oh323_rtp_create(struct oh323_pvt *pvt)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Private structure should be locked on a call */
|
/*! \brief Private structure should be locked on a call */
|
||||||
static struct ast_channel *__oh323_new(struct oh323_pvt *pvt, int state, const char *host)
|
static struct ast_channel *__oh323_new(struct oh323_pvt *pvt, int state, const char *host)
|
||||||
{
|
{
|
||||||
struct ast_channel *ch;
|
struct ast_channel *ch;
|
||||||
@@ -1811,7 +1812,7 @@ static struct ast_channel *oh323_request(const char *type, int format, void *dat
|
|||||||
return tmpc;
|
return tmpc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Find a call by alias */
|
/*! \brief Find a call by alias */
|
||||||
static struct oh323_alias *find_alias(const char *source_aliases, int realtime)
|
static struct oh323_alias *find_alias(const char *source_aliases, int realtime)
|
||||||
{
|
{
|
||||||
struct oh323_alias *a;
|
struct oh323_alias *a;
|
||||||
@@ -1824,7 +1825,7 @@ static struct oh323_alias *find_alias(const char *source_aliases, int realtime)
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Callback for sending digits from H.323 up to asterisk
|
* Callback for sending digits from H.323 up to asterisk
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -1895,10 +1896,10 @@ static int receive_digit(unsigned call_reference, char digit, const char *token,
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Callback function used to inform the H.323 stack of the local rtp ip/port details
|
* Callback function used to inform the H.323 stack of the local rtp ip/port details
|
||||||
*
|
*
|
||||||
* Returns the local RTP information
|
* \return Returns the local RTP information
|
||||||
*/
|
*/
|
||||||
static struct rtp_info *external_rtp_create(unsigned call_reference, const char * token)
|
static struct rtp_info *external_rtp_create(unsigned call_reference, const char * token)
|
||||||
{
|
{
|
||||||
@@ -1936,7 +1937,7 @@ static struct rtp_info *external_rtp_create(unsigned call_reference, const char
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Definition taken from rtp.c for rtpPayloadType because we need it here.
|
* Definition taken from rtp.c for rtpPayloadType because we need it here.
|
||||||
*/
|
*/
|
||||||
struct rtpPayloadType {
|
struct rtpPayloadType {
|
||||||
@@ -1944,7 +1945,7 @@ struct rtpPayloadType {
|
|||||||
int code;
|
int code;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Call-back function passing remote ip/port information from H.323 to asterisk
|
* Call-back function passing remote ip/port information from H.323 to asterisk
|
||||||
*
|
*
|
||||||
* Returns nothing
|
* Returns nothing
|
||||||
@@ -2054,7 +2055,7 @@ static void setup_rtp_connection(unsigned call_reference, const char *remoteIp,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Call-back function to signal asterisk that the channel has been answered
|
* Call-back function to signal asterisk that the channel has been answered
|
||||||
* Returns nothing
|
* Returns nothing
|
||||||
*/
|
*/
|
||||||
@@ -2108,7 +2109,7 @@ static int progress(unsigned call_reference, const char *token, int inband)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Call-back function for incoming calls
|
* Call-back function for incoming calls
|
||||||
*
|
*
|
||||||
* Returns 1 on success
|
* Returns 1 on success
|
||||||
@@ -2228,7 +2229,7 @@ static call_options_t *setup_incoming_call(call_details_t *cd)
|
|||||||
return &pvt->options;
|
return &pvt->options;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Call-back function to start PBX when OpenH323 ready to serve incoming call
|
* Call-back function to start PBX when OpenH323 ready to serve incoming call
|
||||||
*
|
*
|
||||||
* Returns 1 on success
|
* Returns 1 on success
|
||||||
@@ -2307,7 +2308,7 @@ static int answer_call(unsigned call_reference, const char *token)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Call-back function to establish an outgoing H.323 call
|
* Call-back function to establish an outgoing H.323 call
|
||||||
*
|
*
|
||||||
* Returns 1 on success
|
* Returns 1 on success
|
||||||
@@ -2320,7 +2321,7 @@ static int setup_outgoing_call(call_details_t *cd)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Call-back function to signal asterisk that the channel is ringing
|
* Call-back function to signal asterisk that the channel is ringing
|
||||||
* Returns nothing
|
* Returns nothing
|
||||||
*/
|
*/
|
||||||
@@ -2346,7 +2347,7 @@ static void chan_ringing(unsigned call_reference, const char *token)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*! \brief
|
||||||
* Call-back function to cleanup communication
|
* Call-back function to cleanup communication
|
||||||
* Returns nothing,
|
* Returns nothing,
|
||||||
*/
|
*/
|
||||||
|
@@ -1,3 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Asterisk -- An open source telephony toolkit.
|
||||||
|
*
|
||||||
|
* Copyright (C) 1999 - 2007, Digium, Inc.
|
||||||
|
*
|
||||||
|
* Mark Spencer <markster@digium.com>
|
||||||
|
*
|
||||||
|
* See http://www.asterisk.org for more information about
|
||||||
|
* the Asterisk project. Please do not directly contact
|
||||||
|
* any of the maintainers of this project for assistance;
|
||||||
|
* the project provides a web site, mailing lists and IRC
|
||||||
|
* channels for your use.
|
||||||
|
*
|
||||||
|
* This program is free software, distributed under the terms of
|
||||||
|
* the GNU General Public License Version 2. See the LICENSE file
|
||||||
|
* at the top of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file
|
||||||
|
* \brief Structures for AEL - the Asterisk extension language
|
||||||
|
*
|
||||||
|
* \ref pbx_ael.c
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _ASTERISK_AEL_STRUCTS_H
|
#ifndef _ASTERISK_AEL_STRUCTS_H
|
||||||
#define _ASTERISK_AEL_STRUCTS_H
|
#define _ASTERISK_AEL_STRUCTS_H
|
||||||
|
|
||||||
@@ -22,8 +46,7 @@
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
PV_WORD, /* an ident, string, name, label, etc. A user-supplied string. */ /* 0 */
|
PV_WORD, /* an ident, string, name, label, etc. A user-supplied string. */ /* 0 */
|
||||||
PV_MACRO, /* 1 */
|
PV_MACRO, /* 1 */
|
||||||
PV_CONTEXT, /* 2 */
|
PV_CONTEXT, /* 2 */
|
||||||
|
@@ -33,6 +33,8 @@ struct ast_config;
|
|||||||
|
|
||||||
struct ast_category;
|
struct ast_category;
|
||||||
|
|
||||||
|
/*! \brief Structure for variables, used for configurations and for channel variables
|
||||||
|
*/
|
||||||
struct ast_variable {
|
struct ast_variable {
|
||||||
char *name;
|
char *name;
|
||||||
char *value;
|
char *value;
|
||||||
@@ -50,6 +52,7 @@ typedef struct ast_variable *realtime_var_get(const char *database, const char *
|
|||||||
typedef struct ast_config *realtime_multi_get(const char *database, const char *table, va_list ap);
|
typedef struct ast_config *realtime_multi_get(const char *database, const char *table, va_list ap);
|
||||||
typedef int realtime_update(const char *database, const char *table, const char *keyfield, const char *entity, va_list ap);
|
typedef int realtime_update(const char *database, const char *table, const char *keyfield, const char *entity, va_list ap);
|
||||||
|
|
||||||
|
/*! \brief Configuration engine structure, used to define realtime drivers */
|
||||||
struct ast_config_engine {
|
struct ast_config_engine {
|
||||||
char *name;
|
char *name;
|
||||||
config_load_func *load_func;
|
config_load_func *load_func;
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
* at the top of the source tree.
|
* at the top of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* \file This file generates Doxygen pages from files in the /doc
|
/*! \file This file generates Doxygen pages from files in the /doc
|
||||||
directory of the Asterisk source code tree
|
directory of the Asterisk source code tree
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -147,6 +147,7 @@ int ssl_setup(struct tls_config *cfg);
|
|||||||
*/
|
*/
|
||||||
typedef struct ast_str *(*ast_http_callback)(struct sockaddr_in *requestor, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength);
|
typedef struct ast_str *(*ast_http_callback)(struct sockaddr_in *requestor, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength);
|
||||||
|
|
||||||
|
/*! \brief Definition of a URI reachable in the embedded HTTP server */
|
||||||
struct ast_http_uri {
|
struct ast_http_uri {
|
||||||
AST_LIST_ENTRY(ast_http_uri) entry;
|
AST_LIST_ENTRY(ast_http_uri) entry;
|
||||||
const char *description;
|
const char *description;
|
||||||
|
@@ -16,6 +16,15 @@
|
|||||||
* at the top of the source tree.
|
* at the top of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*! \file
|
||||||
|
* \brief Jingle definitions for chan_jingle
|
||||||
|
*
|
||||||
|
* \ref chan_jingle.c
|
||||||
|
*
|
||||||
|
* \author Matt O'Gorman <mogorman@digium.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _ASTERISK_JINGLE_H
|
#ifndef _ASTERISK_JINGLE_H
|
||||||
#define _ASTERISK_JINGLE_H
|
#define _ASTERISK_JINGLE_H
|
||||||
|
|
||||||
|
@@ -39,8 +39,8 @@
|
|||||||
#include "asterisk/logger.h"
|
#include "asterisk/logger.h"
|
||||||
#include "asterisk/compiler.h"
|
#include "asterisk/compiler.h"
|
||||||
|
|
||||||
/*! \note
|
/*!
|
||||||
\verbatim
|
\note \verbatim
|
||||||
Note:
|
Note:
|
||||||
It is very important to use only unsigned variables to hold
|
It is very important to use only unsigned variables to hold
|
||||||
bit flags, as otherwise you can fall prey to the compiler's
|
bit flags, as otherwise you can fall prey to the compiler's
|
||||||
@@ -141,6 +141,8 @@ extern unsigned int __unsigned_int_flags_dummy;
|
|||||||
|
|
||||||
#define AST_FLAGS_ALL UINT_MAX
|
#define AST_FLAGS_ALL UINT_MAX
|
||||||
|
|
||||||
|
/*! \brief Structure used to handle boolean flags
|
||||||
|
*/
|
||||||
struct ast_flags {
|
struct ast_flags {
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
};
|
};
|
||||||
@@ -150,22 +152,21 @@ struct ast_hostent {
|
|||||||
char buf[1024];
|
char buf[1024];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*! \brief Thread-safe gethostbyname function to use in Asterisk */
|
||||||
struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp);
|
struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp);
|
||||||
|
|
||||||
/* ast_md5_hash
|
/*! \brief Produces MD5 hash based on input string */
|
||||||
\brief Produces MD5 hash based on input string */
|
|
||||||
void ast_md5_hash(char *output, char *input);
|
void ast_md5_hash(char *output, char *input);
|
||||||
/* ast_sha1_hash
|
/*! \brief Produces SHA1 hash based on input string */
|
||||||
\brief Produces SHA1 hash based on input string */
|
|
||||||
void ast_sha1_hash(char *output, char *input);
|
void ast_sha1_hash(char *output, char *input);
|
||||||
|
|
||||||
int ast_base64encode_full(char *dst, const unsigned char *src, int srclen, int max, int linebreaks);
|
int ast_base64encode_full(char *dst, const unsigned char *src, int srclen, int max, int linebreaks);
|
||||||
int ast_base64encode(char *dst, const unsigned char *src, int srclen, int max);
|
int ast_base64encode(char *dst, const unsigned char *src, int srclen, int max);
|
||||||
int ast_base64decode(unsigned char *dst, const char *src, int max);
|
int ast_base64decode(unsigned char *dst, const char *src, int max);
|
||||||
|
|
||||||
/*! ast_uri_encode
|
/*! \brief Turn text string to URI-encoded %XX version
|
||||||
\brief Turn text string to URI-encoded %XX version
|
|
||||||
At this point, we're converting from ISO-8859-x (8-bit), not UTF8
|
\note 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.
|
||||||
RFC 2396, section 2.4
|
RFC 2396, section 2.4
|
||||||
@@ -238,7 +239,7 @@ const char *ast_inet_ntoa(struct in_addr ia);
|
|||||||
int ast_utils_init(void);
|
int ast_utils_init(void);
|
||||||
int ast_wait_for_input(int fd, int ms);
|
int ast_wait_for_input(int fd, int ms);
|
||||||
|
|
||||||
/*! ast_carefulwrite
|
/*!
|
||||||
\brief Try to write string, but wait no more than ms milliseconds
|
\brief Try to write string, but wait no more than ms milliseconds
|
||||||
before timing out.
|
before timing out.
|
||||||
|
|
||||||
@@ -249,7 +250,7 @@ int ast_wait_for_input(int fd, int ms);
|
|||||||
*/
|
*/
|
||||||
int ast_carefulwrite(int fd, char *s, int len, int timeoutms);
|
int ast_carefulwrite(int fd, char *s, int len, int timeoutms);
|
||||||
|
|
||||||
/*! Compares the source address and port of two sockaddr_in */
|
/*! \brief Compares the source address and port of two sockaddr_in */
|
||||||
static force_inline int inaddrcmp(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2)
|
static force_inline int inaddrcmp(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2)
|
||||||
{
|
{
|
||||||
return ((sin1->sin_addr.s_addr != sin2->sin_addr.s_addr)
|
return ((sin1->sin_addr.s_addr != sin2->sin_addr.s_addr)
|
||||||
|
@@ -17,6 +17,11 @@
|
|||||||
* for less than ten lines of preprocessor directives...
|
* for less than ten lines of preprocessor directives...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*! \file
|
||||||
|
* \brief Stub to find zaptel headers
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stub to find the zaptel headers. The configure script will
|
* Stub to find the zaptel headers. The configure script will
|
||||||
* define HAVE_ZAPTEL_VERSION according to what it has found.
|
* define HAVE_ZAPTEL_VERSION according to what it has found.
|
||||||
|
@@ -72,12 +72,15 @@ struct channel_spy_trans {
|
|||||||
struct ast_trans_pvt *path;
|
struct ast_trans_pvt *path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*! \brief List of SPY structures
|
||||||
|
*/
|
||||||
struct ast_channel_spy_list {
|
struct ast_channel_spy_list {
|
||||||
struct channel_spy_trans read_translator;
|
struct channel_spy_trans read_translator;
|
||||||
struct channel_spy_trans write_translator;
|
struct channel_spy_trans write_translator;
|
||||||
AST_LIST_HEAD_NOLOCK(, ast_channel_spy) list;
|
AST_LIST_HEAD_NOLOCK(, ast_channel_spy) list;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*! \brief Definition of the Whisper buffer */
|
||||||
struct ast_channel_whisper_buffer {
|
struct ast_channel_whisper_buffer {
|
||||||
ast_mutex_t lock;
|
ast_mutex_t lock;
|
||||||
struct ast_slinfactory sf;
|
struct ast_slinfactory sf;
|
||||||
@@ -88,10 +91,10 @@ struct ast_channel_whisper_buffer {
|
|||||||
/* uncomment if you have problems with 'monitoring' synchronized files */
|
/* uncomment if you have problems with 'monitoring' synchronized files */
|
||||||
#if 0
|
#if 0
|
||||||
#define MONITOR_CONSTANT_DELAY
|
#define MONITOR_CONSTANT_DELAY
|
||||||
#define MONITOR_DELAY 150 * 8 /* 150 ms of MONITORING DELAY */
|
#define MONITOR_DELAY 150 * 8 /*!< 150 ms of MONITORING DELAY */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! Prevent new channel allocation if shutting down. */
|
/*! \brief Prevent new channel allocation if shutting down. */
|
||||||
static int shutting_down;
|
static int shutting_down;
|
||||||
|
|
||||||
static int uniqueint;
|
static int uniqueint;
|
||||||
@@ -101,22 +104,25 @@ unsigned long global_fin, global_fout;
|
|||||||
AST_THREADSTORAGE(state2str_threadbuf);
|
AST_THREADSTORAGE(state2str_threadbuf);
|
||||||
#define STATE2STR_BUFSIZE 32
|
#define STATE2STR_BUFSIZE 32
|
||||||
|
|
||||||
/*! 100ms */
|
#define AST_DEFAULT_EMULATE_DTMF_DURATION 100 /*!< 100ms */
|
||||||
#define AST_DEFAULT_EMULATE_DTMF_DURATION 100
|
|
||||||
|
|
||||||
|
/*! \brief List of channel drivers */
|
||||||
struct chanlist {
|
struct chanlist {
|
||||||
const struct ast_channel_tech *tech;
|
const struct ast_channel_tech *tech;
|
||||||
AST_LIST_ENTRY(chanlist) list;
|
AST_LIST_ENTRY(chanlist) list;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! the list of registered channel types */
|
/*! \brief the list of registered channel types */
|
||||||
static AST_LIST_HEAD_NOLOCK_STATIC(backends, chanlist);
|
static AST_LIST_HEAD_NOLOCK_STATIC(backends, chanlist);
|
||||||
|
|
||||||
/*! the list of channels we have. Note that the lock for this list is used for
|
/*! \brief the list of channels we have. Note that the lock for this list is used for
|
||||||
both the channels list and the backends list. */
|
both the channels list and the backends list. */
|
||||||
static AST_LIST_HEAD_STATIC(channels, ast_channel);
|
static AST_LIST_HEAD_STATIC(channels, ast_channel);
|
||||||
|
|
||||||
/*! map AST_CAUSE's to readable string representations */
|
/*! \brief map AST_CAUSE's to readable string representations
|
||||||
|
*
|
||||||
|
* \ref causes.h
|
||||||
|
*/
|
||||||
const struct ast_cause {
|
const struct ast_cause {
|
||||||
int cause;
|
int cause;
|
||||||
const char *name;
|
const char *name;
|
||||||
@@ -184,6 +190,7 @@ struct ast_variable *ast_channeltype_list(void)
|
|||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! \brief Show channel types - CLI command */
|
||||||
static int show_channeltypes(int fd, int argc, char *argv[])
|
static int show_channeltypes(int fd, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#define FORMAT "%-10.10s %-40.40s %-12.12s %-12.12s %-12.12s\n"
|
#define FORMAT "%-10.10s %-40.40s %-12.12s %-12.12s %-12.12s\n"
|
||||||
@@ -211,6 +218,7 @@ static int show_channeltypes(int fd, int argc, char *argv[])
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! \brief Show details about a channel driver - CLI command */
|
||||||
static int show_channeltype(int fd, int argc, char *argv[])
|
static int show_channeltype(int fd, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct chanlist *cl = NULL;
|
struct chanlist *cl = NULL;
|
||||||
@@ -428,6 +436,7 @@ int ast_channel_register(const struct ast_channel_tech *tech)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! \brief Unregister channel driver */
|
||||||
void ast_channel_unregister(const struct ast_channel_tech *tech)
|
void ast_channel_unregister(const struct ast_channel_tech *tech)
|
||||||
{
|
{
|
||||||
struct chanlist *chan;
|
struct chanlist *chan;
|
||||||
@@ -451,6 +460,7 @@ void ast_channel_unregister(const struct ast_channel_tech *tech)
|
|||||||
AST_LIST_UNLOCK(&channels);
|
AST_LIST_UNLOCK(&channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! \brief Get handle to channel driver based on name */
|
||||||
const struct ast_channel_tech *ast_get_channel_tech(const char *name)
|
const struct ast_channel_tech *ast_get_channel_tech(const char *name)
|
||||||
{
|
{
|
||||||
struct chanlist *chanls;
|
struct chanlist *chanls;
|
||||||
|
@@ -70,6 +70,7 @@ static char *lline_buffer; /*!< A buffer for stuff behind the ; */
|
|||||||
static int lline_buffer_size;
|
static int lline_buffer_size;
|
||||||
|
|
||||||
|
|
||||||
|
/*! \brief Structure to keep comments for rewriting configuration files */
|
||||||
struct ast_comment {
|
struct ast_comment {
|
||||||
struct ast_comment *next;
|
struct ast_comment *next;
|
||||||
char cmt[0];
|
char cmt[0];
|
||||||
|
10
main/rtp.c
10
main/rtp.c
@@ -3277,10 +3277,6 @@ static enum ast_bridge_result bridge_p2p_loop(struct ast_channel *c0, struct ast
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Bridge calls. If possible and allowed, initiate
|
|
||||||
re-invite so the peers exchange media directly outside
|
|
||||||
of Asterisk.
|
|
||||||
*/
|
|
||||||
/*! \page AstRTPbridge The Asterisk RTP bridge
|
/*! \page AstRTPbridge The Asterisk RTP bridge
|
||||||
The RTP bridge is called from the channel drivers that are using the RTP
|
The RTP bridge is called from the channel drivers that are using the RTP
|
||||||
subsystem in Asterisk - like SIP, H.323 and Jingle/Google Talk.
|
subsystem in Asterisk - like SIP, H.323 and Jingle/Google Talk.
|
||||||
@@ -3306,6 +3302,12 @@ static enum ast_bridge_result bridge_p2p_loop(struct ast_channel *c0, struct ast
|
|||||||
- ast_rtp_bridge()
|
- ast_rtp_bridge()
|
||||||
- ast_channel_early_bridge()
|
- ast_channel_early_bridge()
|
||||||
- ast_channel_bridge()
|
- ast_channel_bridge()
|
||||||
|
- rtp.c
|
||||||
|
- rtp.h
|
||||||
|
*/
|
||||||
|
/*! \brief Bridge calls. If possible and allowed, initiate
|
||||||
|
re-invite so the peers exchange media directly outside
|
||||||
|
of Asterisk.
|
||||||
*/
|
*/
|
||||||
enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc, int timeoutms)
|
enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc, int timeoutms)
|
||||||
{
|
{
|
||||||
|
@@ -70,7 +70,7 @@ static int notes;
|
|||||||
development, this code can be properly re-instated
|
development, this code can be properly re-instated
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* null definitions for structs passed down the infrastructure */
|
/*! \brief null definitions for structs passed down the infrastructure */
|
||||||
struct argapp
|
struct argapp
|
||||||
{
|
{
|
||||||
struct argapp *next;
|
struct argapp *next;
|
||||||
@@ -151,7 +151,7 @@ static pval *get_contxt(pval *p);
|
|||||||
static void remove_spaces_before_equals(char *str);
|
static void remove_spaces_before_equals(char *str);
|
||||||
static void substitute_commas(char *str);
|
static void substitute_commas(char *str);
|
||||||
|
|
||||||
/* I am adding this code to substitute commas with vertbars in the args to apps */
|
/*! \brief I am adding this code to substitute commas with vertbars in the args to apps */
|
||||||
static void substitute_commas(char *str)
|
static void substitute_commas(char *str)
|
||||||
{
|
{
|
||||||
char *p = str;
|
char *p = str;
|
||||||
|
@@ -11,6 +11,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*! \file
|
||||||
|
*
|
||||||
|
* \brief Resource limits
|
||||||
|
*
|
||||||
|
* \author Tilghman Lesher <res_limit_200607@the-tilghman.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "asterisk.h"
|
#include "asterisk.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
Reference in New Issue
Block a user