[asterisk-commits] oej: branch oej/realtimetext-t140 r49085 - in
/team/oej/realtimetext-t140: ./...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Dec 31 03:25:38 MST 2006
Author: oej
Date: Sun Dec 31 04:25:37 2006
New Revision: 49085
URL: http://svn.digium.com/view/asterisk?view=rev&rev=49085
Log:
Update to sync with trunk before merge
Modified:
team/oej/realtimetext-t140/ (props changed)
team/oej/realtimetext-t140/BUGS
team/oej/realtimetext-t140/CHANGES
team/oej/realtimetext-t140/UPGRADE.txt
team/oej/realtimetext-t140/apps/app_sms.c
team/oej/realtimetext-t140/apps/app_voicemail.c
team/oej/realtimetext-t140/channels/chan_iax2.c
team/oej/realtimetext-t140/channels/chan_oss.c
team/oej/realtimetext-t140/channels/chan_sip.c
team/oej/realtimetext-t140/channels/iax2-parser.c
team/oej/realtimetext-t140/codecs/g722/ (props changed)
team/oej/realtimetext-t140/configs/func_odbc.conf.sample
team/oej/realtimetext-t140/configs/sip.conf.sample
team/oej/realtimetext-t140/configs/voicemail.conf.sample
team/oej/realtimetext-t140/doc/asterisk-conf.txt
team/oej/realtimetext-t140/funcs/func_math.c
team/oej/realtimetext-t140/funcs/func_odbc.c
team/oej/realtimetext-t140/funcs/func_strings.c
team/oej/realtimetext-t140/include/asterisk/ael_structs.h
team/oej/realtimetext-t140/include/asterisk/astmm.h
team/oej/realtimetext-t140/include/asterisk/options.h
team/oej/realtimetext-t140/include/asterisk/smdi.h
team/oej/realtimetext-t140/include/asterisk/utils.h
team/oej/realtimetext-t140/main/ast_expr2.c
team/oej/realtimetext-t140/main/ast_expr2.fl
team/oej/realtimetext-t140/main/ast_expr2.y
team/oej/realtimetext-t140/main/ast_expr2f.c
team/oej/realtimetext-t140/main/asterisk.c
team/oej/realtimetext-t140/main/astmm.c
team/oej/realtimetext-t140/main/cdr.c
team/oej/realtimetext-t140/main/channel.c
team/oej/realtimetext-t140/main/dnsmgr.c
team/oej/realtimetext-t140/main/enum.c
team/oej/realtimetext-t140/main/file.c
team/oej/realtimetext-t140/main/frame.c
team/oej/realtimetext-t140/main/http.c
team/oej/realtimetext-t140/main/logger.c
team/oej/realtimetext-t140/main/manager.c
team/oej/realtimetext-t140/main/pbx.c
team/oej/realtimetext-t140/main/rtp.c
team/oej/realtimetext-t140/main/term.c
team/oej/realtimetext-t140/main/udptl.c
team/oej/realtimetext-t140/pbx/ael/ael.tab.c
team/oej/realtimetext-t140/pbx/ael/ael.tab.h
team/oej/realtimetext-t140/pbx/ael/ael_lex.c
team/oej/realtimetext-t140/pbx/pbx_ael.c
team/oej/realtimetext-t140/pbx/pbx_config.c
team/oej/realtimetext-t140/sounds/Makefile
team/oej/realtimetext-t140/utils/ael_main.c
Propchange: team/oej/realtimetext-t140/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/oej/realtimetext-t140/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/oej/realtimetext-t140/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Dec 31 04:25:37 2006
@@ -1,1 +1,1 @@
-/trunk:1-48972
+/trunk:1-49083
Modified: team/oej/realtimetext-t140/BUGS
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/BUGS?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/BUGS (original)
+++ team/oej/realtimetext-t140/BUGS Sun Dec 31 04:25:37 2006
@@ -10,7 +10,7 @@
learn how you can contribute by acting as a bug marshall
please see:
- http://www.digium.com/index.php?menu=bugguidelines
+ http://www.asterisk.org/developers/bug-guidelines
If you would like to submit a feature request, please
resist the temptation to post it to the bug tracker.
Modified: team/oej/realtimetext-t140/CHANGES
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/CHANGES?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/CHANGES (original)
+++ team/oej/realtimetext-t140/CHANGES Sun Dec 31 04:25:37 2006
@@ -6,11 +6,6 @@
prompts within the Voicemail application by changing them in voicemail.conf
* enable https support for builtin web server.
See configs/http.conf.sample for details.
- * add a new option, match_auth_username, to sip.conf,
- to improve the matching of incoming requests.
- If set, and the incoming request carries authentication info,
- the username to match in the users list is taken from there
- rather than from the From: field.
* Argument support for Gosub application
* MailboxExists converted to dialplan function
* Ability to set process limits without restarting Asterisk
@@ -65,4 +60,16 @@
what Asterisk should set as the maximum number of open files when it loads.
* Added the jittertargetextra configuration option.
* Added the URI redirect option for the built-in HTTP server
+
+SIP changes
+-----------
+ * The default SIP useragent= identifier now includes the Asterisk version
+ * A new option, match_auth_username in sip.conf changes the matching of incoming requests.
+ If set, and the incoming request carries authentication info,
+ the username to match in the users list is taken from the Digest header
+ rather than from the From: field. This feature is considered experimental.
+ * The "musiconhold" and "musicclass" settings in sip.conf are now removed,
+ since they where replaced by "mohsuggest" and "mohinterpret" in version 1.4
+ * The "localmask" setting was removed in version 1.2 and the reminder about it
+ being removed is now also removed.
* Added support for T.140 realtime text in SIP/RTP
Modified: team/oej/realtimetext-t140/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/UPGRADE.txt?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/UPGRADE.txt (original)
+++ team/oej/realtimetext-t140/UPGRADE.txt Sun Dec 31 04:25:37 2006
@@ -17,3 +17,17 @@
not include it, but really, you should make sure that all execution
paths within your macros end in "return;".
+Core:
+
+* The 'languageprefix' option in asterisk.conf is now deprecated, and
+ the default sound file layout for non-English sounds is the 'new
+ style' layout introduced in Asterisk 1.4 (and used by the automatic
+ sound file installer in the Makefile).
+
+Applications:
+
+* The voicemail configuration values 'maxmessage' and 'minmessage' have
+ been changed to 'maxsecs' and 'minsecs' to clarify their purpose and
+ to make them more distinguishable from 'maxmsgs', which sets folder
+ size. The old variables will continue to work in this version, albeit
+ with a deprecation warning.
Modified: team/oej/realtimetext-t140/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/apps/app_sms.c?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/apps/app_sms.c (original)
+++ team/oej/realtimetext-t140/apps/app_sms.c Sun Dec 31 04:25:37 2006
@@ -26,14 +26,12 @@
* ES 201 912 SMS for PSTN/ISDN
* TS 123 040 Technical realization of SMS
*
- * \note 2006-09-19: ETSI ES 201 912 protocol 2 used in Italy and Spain
- * support added by Filippo Grassilli (Hyppo)
- * <http://hyppo.com> (Hyppo)
- * Not fully tested, under development
*
* \ingroup applications
*
* \author Adrian Kennard (for the original protocol 1 code)
+ * \author Filippo Grassilli (Hyppo) - protocol 2 support
+ * Not fully tested, under development
*/
#include "asterisk.h"
Modified: team/oej/realtimetext-t140/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/apps/app_voicemail.c?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/apps/app_voicemail.c (original)
+++ team/oej/realtimetext-t140/apps/app_voicemail.c Sun Dec 31 04:25:37 2006
@@ -312,6 +312,7 @@
unsigned int flags; /*!< VM_ flags */
int saydurationm;
int maxmsg; /*!< Maximum number of msgs per folder for this mailbox */
+ int maxsecs; /*!< Maximum number of seconds per message for this mailbox */
#ifdef IMAP_STORAGE
char imapuser[80]; /* IMAP server login */
char imappassword[80]; /* IMAP server password if authpassword not defined */
@@ -511,8 +512,8 @@
static struct ast_smdi_interface *smdi_iface = NULL;
static char vmfmts[80];
static double volgain;
-static int vmminmessage;
-static int vmmaxmessage;
+static int vmminsecs;
+static int vmmaxsecs;
static int maxgreet;
static int skipms;
static int maxlogins;
@@ -561,6 +562,8 @@
ast_copy_string(vmu->dialout, dialcontext, sizeof(vmu->dialout));
if (exitcontext)
ast_copy_string(vmu->exit, exitcontext, sizeof(vmu->exit));
+ if (vmmaxsecs)
+ vmu->maxsecs = vmmaxsecs;
if (maxmsg)
vmu->maxmsg = maxmsg;
vmu->volgain = volgain;
@@ -617,6 +620,13 @@
ast_copy_string(vmu->dialout, value, sizeof(vmu->dialout));
} else if (!strcasecmp(var, "exitcontext")) {
ast_copy_string(vmu->exit, value, sizeof(vmu->exit));
+ } else if (!strcasecmp(var, "maxmessage")) {
+ if (vmu->maxsecs <= 0) {
+ ast_log(LOG_WARNING, "Invalid max message length of %s. Using global value %i\n", value, vmmaxsecs);
+ vmu->maxsecs = vmmaxsecs;
+ } else {
+ vmu->maxsecs = atoi(value);
+ }
} else if (!strcasecmp(var, "maxmsg")) {
vmu->maxmsg = atoi(value);
if (vmu->maxmsg <= 0) {
@@ -668,6 +678,7 @@
struct ast_variable *tmp;
tmp = var;
while (tmp) {
+ ast_log(LOG_DEBUG, "Name: %s Value: %s\n", tmp->name, tmp->value);
if (!strcasecmp(tmp->name, "password")) {
ast_copy_string(retval->password, tmp->value, sizeof(retval->password));
} else if (!strcasecmp(tmp->name, "uniqueid")) {
@@ -3086,15 +3097,15 @@
} else
ast_log(LOG_WARNING, "Error opening text file for output\n");
#ifdef IMAP_STORAGE
- res = play_record_review(chan, NULL, tmptxtfile, vmmaxmessage, fmt, 1, vmu, &duration, NULL, options->record_gain, vms);
+ res = play_record_review(chan, NULL, tmptxtfile, vmu->maxsecs, fmt, 1, vmu, &duration, NULL, options->record_gain, vms);
#else
- res = play_record_review(chan, NULL, tmptxtfile, vmmaxmessage, fmt, 1, vmu, &duration, NULL, options->record_gain, NULL);
+ res = play_record_review(chan, NULL, tmptxtfile, vmu->maxsecs, fmt, 1, vmu, &duration, NULL, options->record_gain, NULL);
#endif
if (txt) {
- if (duration < vmminmessage) {
+ if (duration < vmminsecs) {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "Recording was %d seconds long but needs to be at least %d - abandoning\n", duration, vmminmessage);
+ ast_verbose( VERBOSE_PREFIX_3 "Recording was %d seconds long but needs to be at least %d - abandoning\n", duration, vmminsecs);
ast_filedelete(tmptxtfile, NULL);
unlink(tmptxtfile);
} else {
@@ -3157,7 +3168,7 @@
} else if (res > 0)
res = 0;
- if (duration < vmminmessage)
+ if (duration < vmminsecs)
/* XXX We should really give a prompt too short/option start again, with leave_vm_out called only after a timeout XXX */
pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
else
@@ -7271,25 +7282,50 @@
astemail = ASTERISK_USERNAME;
ast_copy_string(serveremail, astemail, sizeof(serveremail));
- vmmaxmessage = 0;
- if ((s = ast_variable_retrieve(cfg, "general", "maxmessage"))) {
+ vmmaxsecs = 0;
+ if ((s = ast_variable_retrieve(cfg, "general", "maxsecs"))) {
if (sscanf(s, "%d", &x) == 1) {
- vmmaxmessage = x;
+ vmmaxsecs = x;
} else {
ast_log(LOG_WARNING, "Invalid max message time length\n");
}
- }
-
- vmminmessage = 0;
- if ((s = ast_variable_retrieve(cfg, "general", "minmessage"))) {
+ } else if ((s = ast_variable_retrieve(cfg, "general", "maxmessage"))) {
+ static int maxmessage_deprecate = 0;
+ if (maxmessage_deprecate == 0) {
+ maxmessage_deprecate = 1;
+ ast_log(LOG_WARNING, "Setting 'maxmessage' has been deprecated in favor of 'maxsecs'.\n");
+ }
if (sscanf(s, "%d", &x) == 1) {
- vmminmessage = x;
- if (maxsilence <= vmminmessage)
+ vmmaxsecs = x;
+ } else {
+ ast_log(LOG_WARNING, "Invalid max message time length\n");
+ }
+ }
+
+ vmminsecs = 0;
+ if ((s = ast_variable_retrieve(cfg, "general", "minsecs"))) {
+ if (sscanf(s, "%d", &x) == 1) {
+ vmminsecs = x;
+ if (maxsilence <= vmminsecs)
ast_log(LOG_WARNING, "maxsilence should be less than minmessage or you may get empty messages\n");
} else {
ast_log(LOG_WARNING, "Invalid min message time length\n");
}
- }
+ } else if ((s = ast_variable_retrieve(cfg, "general", "minmessage"))) {
+ static int maxmessage_deprecate = 0;
+ if (maxmessage_deprecate == 0) {
+ maxmessage_deprecate = 1;
+ ast_log(LOG_WARNING, "Setting 'minmessage' has been deprecated in favor of 'minsecs'.\n");
+ }
+ if (sscanf(s, "%d", &x) == 1) {
+ vmminsecs = x;
+ if (maxsilence <= vmminsecs)
+ ast_log(LOG_WARNING, "maxsilence should be less than minmessage or you may get empty messages\n");
+ } else {
+ ast_log(LOG_WARNING, "Invalid min message time length\n");
+ }
+ }
+
fmt = ast_variable_retrieve(cfg, "general", "format");
if (!fmt)
fmt = "wav";
Modified: team/oej/realtimetext-t140/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/channels/chan_iax2.c?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/channels/chan_iax2.c (original)
+++ team/oej/realtimetext-t140/channels/chan_iax2.c Sun Dec 31 04:25:37 2006
@@ -632,9 +632,7 @@
static struct ast_iax2_queue {
AST_LIST_HEAD(, iax_frame) queue;
int count;
-} iaxq = {
- .queue = AST_LIST_HEAD_INIT_VALUE
-};
+} iaxq;
static AST_LIST_HEAD_STATIC(users, iax2_user);
@@ -9986,6 +9984,8 @@
AST_LIST_TRAVERSE_SAFE_END
AST_LIST_UNLOCK(&dynamic_list);
+ AST_LIST_HEAD_DESTROY(&iaxq.queue);
+
ast_netsock_release(netsock);
for (x=0;x<IAX_MAX_CALLS;x++)
if (iaxs[x])
@@ -10059,6 +10059,8 @@
}
ast_netsock_init(netsock);
+
+ AST_LIST_HEAD_INIT(&iaxq.queue);
ast_cli_register_multiple(cli_iax2, sizeof(cli_iax2) / sizeof(struct ast_cli_entry));
Modified: team/oej/realtimetext-t140/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/channels/chan_oss.c?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/channels/chan_oss.c (original)
+++ team/oej/realtimetext-t140/channels/chan_oss.c Sun Dec 31 04:25:37 2006
@@ -285,7 +285,7 @@
static int oss_debug;
-/*
+/*!
* Each sound is made of 'datalen' samples of sound, repeated as needed to
* generate 'samplen' samples of data, then followed by 'silencelen' samples
* of silence. The loop is repeated if 'repeat' is set.
@@ -310,8 +310,9 @@
};
-/*
- * descriptor for one of our channels.
+/*!
+ * \brief descriptor for one of our channels.
+ *
* There is one used for 'default' values (from the [general] entry in
* the configuration file), and then one instance for each device
* (the default is cloned from [general], others are only created
@@ -321,45 +322,45 @@
struct chan_oss_pvt *next;
char *name;
- /*
+ /*!
* cursound indicates which in struct sound we play. -1 means nothing,
* any other value is a valid sound, in which case sampsent indicates
* the next sample to send in [0..samplen + silencelen]
* nosound is set to disable the audio data from the channel
* (so we can play the tones etc.).
*/
- int sndcmd[2]; /* Sound command pipe */
- int cursound; /* index of sound to send */
- int sampsent; /* # of sound samples sent */
- int nosound; /* set to block audio from the PBX */
-
- int total_blocks; /* total blocks in the output device */
+ int sndcmd[2]; /*!< Sound command pipe */
+ int cursound; /*!< index of sound to send */
+ int sampsent; /*!< # of sound samples sent */
+ int nosound; /*!< set to block audio from the PBX */
+
+ int total_blocks; /*!< total blocks in the output device */
int sounddev;
enum { M_UNSET, M_FULL, M_READ, M_WRITE } duplex;
int autoanswer;
int autohangup;
int hookstate;
- char *mixer_cmd; /* initial command to issue to the mixer */
- unsigned int queuesize; /* max fragments in queue */
- unsigned int frags; /* parameter for SETFRAGMENT */
-
- int warned; /* various flags used for warnings */
+ char *mixer_cmd; /*!< initial command to issue to the mixer */
+ unsigned int queuesize; /*!< max fragments in queue */
+ unsigned int frags; /*!< parameter for SETFRAGMENT */
+
+ int warned; /*!< various flags used for warnings */
#define WARN_used_blocks 1
#define WARN_speed 2
#define WARN_frag 4
- int w_errors; /* overfull in the write path */
+ int w_errors; /*!< overfull in the write path */
struct timeval lastopen;
int overridecontext;
int mute;
- /* boost support. BOOST_SCALE * 10 ^(BOOST_MAX/20) must
- * be representable in 16 bits to avoid overflows.
+ /*! boost support. BOOST_SCALE * 10 ^(BOOST_MAX/20) must
+ * be representable in 16 bits to avoid overflows.
*/
#define BOOST_SCALE (1<<9)
-#define BOOST_MAX 40 /* slightly less than 7 bits */
- int boost; /* input boost, scaled by BOOST_SCALE */
- char device[64]; /* device to open */
+#define BOOST_MAX 40 /*!< slightly less than 7 bits */
+ int boost; /*!< input boost, scaled by BOOST_SCALE */
+ char device[64]; /*!< device to open */
pthread_t sthread;
@@ -371,15 +372,15 @@
char cid_num[256]; /*XXX */
char mohinterpret[MAX_MUSICCLASS];
- /* buffers used in oss_write */
+ /*! buffers used in oss_write */
char oss_write_buf[FRAME_SIZE * 2];
int oss_write_dst;
- /* buffers used in oss_read - AST_FRIENDLY_OFFSET space for headers
- * plus enough room for a full frame
+ /*! buffers used in oss_read - AST_FRIENDLY_OFFSET space for headers
+ * plus enough room for a full frame
*/
char oss_read_buf[FRAME_SIZE * 2 + AST_FRIENDLY_OFFSET];
- int readpos; /* read position above */
- struct ast_frame read_f; /* returned by oss_read */
+ int readpos; /*!< read position above */
+ struct ast_frame read_f; /*!< returned by oss_read */
};
static struct chan_oss_pvt oss_default = {
@@ -397,7 +398,7 @@
.boost = BOOST_SCALE,
};
-static char *oss_active; /* the active device */
+static char *oss_active; /*!< the active device */
static int setformat(struct chan_oss_pvt *o, int mode);
@@ -432,8 +433,8 @@
.fixup = oss_fixup,
};
-/*
- * returns a pointer to the descriptor with the given name
+/*!
+ * \brief returns a pointer to the descriptor with the given name
*/
static struct chan_oss_pvt *find_desc(char *dev)
{
@@ -450,14 +451,16 @@
return o;
}
-/*
- * split a string in extension-context, returns pointers to malloc'ed
- * strings.
+/* !
+ * \brief split a string in extension-context, returns pointers to malloc'ed
+ * strings.
+ *
* If we do not have 'overridecontext' then the last @ is considered as
* a context separator, and the context is overridden.
* This is usually not very necessary as you can play with the dialplan,
* and it is nice not to need it because you have '@' in SIP addresses.
- * Return value is the buffer address.
+ *
+ * \return the buffer address.
*/
static char *ast_ext_ctx(const char *src, char **ext, char **ctx)
{
@@ -484,8 +487,8 @@
return *ext;
}
-/*
- * Returns the number of blocks used in the audio output channel
+/*!
+ * \brief Returns the number of blocks used in the audio output channel
*/
static int used_blocks(struct chan_oss_pvt *o)
{
@@ -508,7 +511,7 @@
return o->total_blocks - info.fragments;
}
-/* Write an exactly FRAME_SIZE sized frame */
+/*! Write an exactly FRAME_SIZE sized frame */
static int soundcard_writeframe(struct chan_oss_pvt *o, short *data)
{
int res;
@@ -533,8 +536,9 @@
return write(o->sounddev, (void *)data, FRAME_SIZE * 2);
}
-/*
- * Handler for 'sound writable' events from the sound thread.
+/*!
+ * \brief Handler for 'sound writable' events from the sound thread.
+ *
* Builds a frame from the high level description of the sounds,
* and passes it to the audio device.
* The actual sound is made of 1 or more sequences of sound samples
@@ -661,7 +665,7 @@
return NULL; /* Never reached */
}
-/*
+/*!
* reset and close the device if opened,
* then open and initialize it in the desired mode,
* trigger reads and writes so we can start using it.
@@ -785,15 +789,15 @@
return 0;
}
-/* Play ringtone 'x' on device 'o' */
+/*! \brief Play ringtone 'x' on device 'o' */
static void ring(struct chan_oss_pvt *o, int x)
{
write(o->sndcmd[1], &x, sizeof(x));
}
-/*
- * handler for incoming calls. Either autoanswer, or start ringing
+/*!
+ * \brief handler for incoming calls. Either autoanswer, or start ringing
*/
static int oss_call(struct ast_channel *c, char *dest, int timeout)
{
@@ -816,8 +820,8 @@
return 0;
}
-/*
- * remote side answered the phone
+/*!
+ * \brief remote side answered the phone
*/
static int oss_answer(struct ast_channel *c)
{
@@ -856,7 +860,7 @@
return 0;
}
-/* used for data coming from the network */
+/*! \brief used for data coming from the network */
static int oss_write(struct ast_channel *c, struct ast_frame *f)
{
int src;
@@ -991,8 +995,8 @@
return 0;
}
-/*
- * allocate a new channel.
+/*!
+ * \brief allocate a new channel.
*/
static struct ast_channel *oss_new(struct chan_oss_pvt *o, char *ext, char *ctx, int state)
{
@@ -1104,8 +1108,8 @@
return CLI_SUCCESS;
}
-/*
- * answer command from the console
+/*!
+ * \brief answer command from the console
*/
static char *console_answer(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
@@ -1136,8 +1140,10 @@
return CLI_SUCCESS;
}
-/*
- * concatenate all arguments into a single string. argv is NULL-terminated
+/*!
+ * \brief Console send text CLI command
+ *
+ * \note concatenate all arguments into a single string. argv is NULL-terminated
* so we can use it right away
*/
static char *console_sendtext(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
@@ -1369,8 +1375,8 @@
"console. If a device is specified, the console sound device is changed to\n"
"the device specified.\n";
-/*
- * store the boost factor
+/*!
+ * \brief store the boost factor
*/
static void store_boost(struct chan_oss_pvt *o, char *s)
{
@@ -1424,7 +1430,7 @@
active_usage },
};
-/*
+/*!
* store the mixer argument from the config file, filtering possibly
* invalid or dangerous values (the string is used as argument for
* system("mixer %s")
@@ -1445,7 +1451,7 @@
ast_log(LOG_WARNING, "setting mixer %s\n", s);
}
-/*
+/*!
* store the callerid components
*/
static void store_callerid(struct chan_oss_pvt *o, char *s)
@@ -1453,7 +1459,7 @@
ast_callerid_split(s, o->cid_name, sizeof(o->cid_name), o->cid_num, sizeof(o->cid_num));
}
-/*
+/*!
* grab fields from the config file, init the descriptor and open the device.
*/
static struct chan_oss_pvt *store_config(struct ast_config *cfg, char *ctg)
Modified: team/oej/realtimetext-t140/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/channels/chan_sip.c?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/channels/chan_sip.c (original)
+++ team/oej/realtimetext-t140/channels/chan_sip.c Sun Dec 31 04:25:37 2006
@@ -113,7 +113,6 @@
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/options.h"
-#include "asterisk/lock.h"
#include "asterisk/sched.h"
#include "asterisk/io.h"
#include "asterisk/rtp.h"
@@ -126,7 +125,6 @@
#include "asterisk/musiconhold.h"
#include "asterisk/dsp.h"
#include "asterisk/features.h"
-#include "asterisk/acl.h"
#include "asterisk/srv.h"
#include "asterisk/astdb.h"
#include "asterisk/causes.h"
@@ -143,6 +141,7 @@
#include "asterisk/compiler.h"
#include "asterisk/threadstorage.h"
#include "asterisk/translate.h"
+#include "asterisk/version.h"
#ifndef FALSE
#define FALSE 0
@@ -780,13 +779,16 @@
#define SIP_PAGE2_CALL_ONHOLD (3 << 23) /*!< Call states */
#define SIP_PAGE2_CALL_ONHOLD_ONEDIR (1 << 23) /*!< 23: One directional hold */
#define SIP_PAGE2_CALL_ONHOLD_INACTIVE (1 << 24) /*!< 24: Inactive */
-#define SIP_PAGE2_RFC2833_COMPENSATE (1 << 25)
+#define SIP_PAGE2_RFC2833_COMPENSATE (1 << 25) /*!< 25: ???? */
+#define SIP_PAGE2_BUGGY_MWI (1 << 26) /*!< 26: Buggy CISCO MWI fix */
#define SIP_PAGE2_NOTEXT (1 << 27) /*!< 26: Text not supported */
#define SIP_PAGE2_TEXTSUPPORT (1 << 28) /*!< 27: Global text enable */
#define SIP_PAGE2_DEBUG_TEXT (1 << 29) /*!< 28: Global text debug */
#define SIP_PAGE2_FLAGS_TO_COPY \
- (SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | SIP_PAGE2_TEXTSUPPORT)
+ (SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | \
+ SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | SIP_PAGE2_BUGGY_MWI | \
+ SIP_PAGE2_TEXTSUPPORT )
/* SIP packet flags */
#define SIP_PKT_DEBUG (1 << 0) /*!< Debug this packet */
@@ -4851,7 +4853,6 @@
const char *m; /* SDP media offer */
const char *c;
const char *a;
- const char *b;
char host[258];
int len = -1;
int portno = -1; /*!< RTP Audio port number */
@@ -6321,8 +6322,9 @@
ast_build_string(&a_modem_next, &a_modem_left, "a=T38FaxMaxDatagram:%d\r\n",x);
if (p->t38.jointcapability != T38FAX_UDP_EC_NONE)
ast_build_string(&a_modem_next, &a_modem_left, "a=T38FaxUdpEC:%s\r\n", (p->t38.jointcapability & T38FAX_UDP_EC_REDUNDANCY) ? "t38UDPRedundancy" : "t38UDPFEC");
+ len = strlen(v) + strlen(s) + strlen(o) + strlen(c) + strlen(t);
if (p->udptl)
- len = strlen(m_modem) + strlen(a_modem);
+ len += strlen(m_modem) + strlen(a_modem);
add_header(resp, "Content-Type", "application/sdp");
add_header_contentLength(resp, len);
add_line(resp, v);
@@ -6439,8 +6441,6 @@
int x;
int capability;
- int videocapability=0;
- int textcapability=0;
int needvideo = FALSE;
int needtext = FALSE;
int debug = sip_debug_test_pvt(p);
@@ -7340,7 +7340,11 @@
ast_build_string(&t, &maxbytes, "Messages-Waiting: %s\r\n", newmsgs ? "yes" : "no");
ast_build_string(&t, &maxbytes, "Message-Account: sip:%s@%s\r\n",
S_OR(vmexten, default_vmexten), S_OR(p->fromdomain, ast_inet_ntoa(p->ourip)));
- ast_build_string(&t, &maxbytes, "Voice-Message: %d/%d (0/0)\r\n", newmsgs, oldmsgs);
+ /* Cisco has a bug in the SIP stack where it can't accept the
+ (0/0) notification. This can temporarily be disabled in
+ sip.conf with the "buggymwi" option */
+ ast_build_string(&t, &maxbytes, "Voice-Message: %d/%d%s\r\n", newmsgs, oldmsgs, (ast_test_flag(&p->flags[1], SIP_PAGE2_BUGGY_MWI) ? "" : " (0/0)"));
+
if (p->subscribed) {
if (p->expiry)
add_header(&req, "Subscription-State", "active");
@@ -12208,6 +12212,8 @@
/* Then we AUTH */
ast_string_field_free(p, theirtag); /* forget their old tag, so we don't match tags when getting response */
if (!ast_test_flag(req, SIP_PKT_IGNORE)) {
+ if (p->authtries < MAX_AUTHTRIES)
+ p->invitestate = INV_CALLING;
if (p->authtries == MAX_AUTHTRIES || do_proxy_auth(p, req, resp, SIP_INVITE, 1)) {
ast_log(LOG_NOTICE, "Failed to authenticate on INVITE to '%s'\n", get_header(&p->initreq, "From"));
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
@@ -14963,7 +14969,6 @@
p->method = req->method; /* Find out which SIP method they are using */
if (option_debug > 3)
ast_log(LOG_DEBUG, "**** Received %s (%d) - Command in SIP %s\n", sip_methods[p->method].text, sip_methods[p->method].id, cmd);
- ast_verbose("**** Received %s (%d) - Command in SIP %s\n", sip_methods[p->method].text, sip_methods[p->method].id, cmd);
if (p->icseq && (p->icseq > seqno)) {
if (option_debug)
@@ -15745,6 +15750,7 @@
ast_log(LOG_WARNING, "Unknown dtmf mode '%s' on line %d, using rfc2833\n", v->value, v->lineno);
ast_set_flag(&flags[0], SIP_DTMF_RFC2833);
}
+ res = 1;
} else if (!strcasecmp(v->name, "nat")) {
ast_set_flag(&mask[0], SIP_NAT);
ast_clear_flag(&flags[0], SIP_NAT);
@@ -15756,6 +15762,7 @@
ast_set_flag(&flags[0], SIP_NAT_ALWAYS);
else
ast_set_flag(&flags[0], SIP_NAT_RFC3581);
+ res = 1;
} else if (!strcasecmp(v->name, "canreinvite")) {
ast_set_flag(&mask[0], SIP_REINVITE);
ast_clear_flag(&flags[0], SIP_REINVITE);
@@ -15777,6 +15784,7 @@
}
}
}
+ res = 1;
} else if (!strcasecmp(v->name, "insecure")) {
ast_set_flag(&mask[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
ast_clear_flag(&flags[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
@@ -15795,6 +15803,7 @@
ast_log(LOG_WARNING, "Unknown insecure mode '%s' on line %d\n", v->value, v->lineno);
}
}
+ res = 1;
} else if (!strcasecmp(v->name, "progressinband")) {
ast_set_flag(&mask[0], SIP_PROG_INBAND);
ast_clear_flag(&flags[0], SIP_PROG_INBAND);
@@ -15802,8 +15811,7 @@
ast_set_flag(&flags[0], SIP_PROG_INBAND_YES);
else if (strcasecmp(v->value, "never"))
ast_set_flag(&flags[0], SIP_PROG_INBAND_NO);
- } else if (!strcasecmp(v->name, "allowguest")) {
- global_allowguest = ast_true(v->value) ? 1 : 0;
+ res = 1;
} else if (!strcasecmp(v->name, "promiscredir")) {
ast_set_flag(&mask[0], SIP_PROMISCREDIR);
ast_set2_flag(&flags[0], ast_true(v->value), SIP_PROMISCREDIR);
@@ -15811,30 +15819,42 @@
} else if (!strcasecmp(v->name, "videosupport")) {
ast_set_flag(&mask[1], SIP_PAGE2_VIDEOSUPPORT);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_VIDEOSUPPORT);
+ res = 1;
} else if (!strcasecmp(v->name, "textsupport")) {
ast_set_flag(&mask[1], SIP_PAGE2_TEXTSUPPORT);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_TEXTSUPPORT);
+ res = 1;
} else if (!strcasecmp(v->name, "allowoverlap")) {
ast_set_flag(&mask[1], SIP_PAGE2_ALLOWOVERLAP);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_ALLOWOVERLAP);
+ res = 1;
} else if (!strcasecmp(v->name, "allowsubscribe")) {
ast_set_flag(&mask[1], SIP_PAGE2_ALLOWSUBSCRIBE);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_ALLOWSUBSCRIBE);
+ res = 1;
} else if (!strcasecmp(v->name, "t38pt_udptl")) {
ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_UDPTL);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_UDPTL);
+ res = 1;
#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
} else if (!strcasecmp(v->name, "t38pt_rtp")) {
ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_RTP);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_RTP);
+ res = 1;
} else if (!strcasecmp(v->name, "t38pt_tcp")) {
ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_TCP);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_TCP);
+ res = 1;
#endif
} else if (!strcasecmp(v->name, "rfc2833compensate")) {
ast_set_flag(&mask[1], SIP_PAGE2_RFC2833_COMPENSATE);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_RFC2833_COMPENSATE);
- }
+ res = 1;
+ } else if (!strcasecmp(v->name, "buggymwi")) {
+ ast_set_flag(&mask[1], SIP_PAGE2_BUGGY_MWI);
+ ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_BUGGY_MWI);
+ res = 1;
+ }
return res;
}
@@ -16069,8 +16089,7 @@
user->pickupgroup = ast_get_group(v->value);
} else if (!strcasecmp(v->name, "language")) {
ast_copy_string(user->language, v->value, sizeof(user->language));
- } else if (!strcasecmp(v->name, "mohinterpret")
- || !strcasecmp(v->name, "musicclass") || !strcasecmp(v->name, "musiconhold")) {
+ } else if (!strcasecmp(v->name, "mohinterpret")) {
ast_copy_string(user->mohinterpret, v->value, sizeof(user->mohinterpret));
} else if (!strcasecmp(v->name, "mohsuggest")) {
ast_copy_string(user->mohsuggest, v->value, sizeof(user->mohsuggest));
@@ -16101,14 +16120,6 @@
user->maxcallbitrate = atoi(v->value);
if (user->maxcallbitrate < 0)
user->maxcallbitrate = default_maxcallbitrate;
- } else if (!strcasecmp(v->name, "t38pt_udptl")) {
- ast_set2_flag(&user->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_UDPTL);
-#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
- } else if (!strcasecmp(v->name, "t38pt_rtp")) {
- ast_set2_flag(&user->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_RTP);
- } else if (!strcasecmp(v->name, "t38pt_tcp")) {
- ast_set2_flag(&user->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_TCP);
-#endif
}
}
ast_copy_flags(&user->flags[0], &userflags[0], mask[0].flags);
@@ -16348,8 +16359,7 @@
}
} else if (!strcasecmp(v->name, "accountcode")) {
ast_copy_string(peer->accountcode, v->value, sizeof(peer->accountcode));
- } else if (!strcasecmp(v->name, "mohinterpret")
- || !strcasecmp(v->name, "musicclass") || !strcasecmp(v->name, "musiconhold")) {
+ } else if (!strcasecmp(v->name, "mohinterpret")) {
ast_copy_string(peer->mohinterpret, v->value, sizeof(peer->mohinterpret));
} else if (!strcasecmp(v->name, "mohsuggest")) {
ast_copy_string(peer->mohsuggest, v->value, sizeof(peer->mohsuggest));
@@ -16401,14 +16411,6 @@
peer->maxcallbitrate = atoi(v->value);
if (peer->maxcallbitrate < 0)
peer->maxcallbitrate = default_maxcallbitrate;
- } else if (!strcasecmp(v->name, "t38pt_udptl")) {
- ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_UDPTL);
-#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
- } else if (!strcasecmp(v->name, "t38pt_rtp")) {
- ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_RTP);
- } else if (!strcasecmp(v->name, "t38pt_tcp")) {
- ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_TCP);
-#endif
}
}
if (!ast_test_flag(&global_flags[1], SIP_PAGE2_IGNOREREGEXPIRE) && ast_test_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC) && realtime) {
@@ -16510,7 +16512,7 @@
global_notifyhold = FALSE; /*!< Keep track of hold status for a peer */
global_alwaysauthreject = 0;
global_allowsubscribe = FALSE;
- ast_copy_string(global_useragent, DEFAULT_USERAGENT, sizeof(global_useragent));
+ snprintf(global_useragent, sizeof(global_useragent), "%s %s", DEFAULT_USERAGENT, ASTERISK_VERSION);
ast_copy_string(default_notifymime, DEFAULT_NOTIFYMIME, sizeof(default_notifymime));
if (ast_strlen_zero(ast_config_AST_SYSTEM_NAME))
ast_copy_string(global_realm, DEFAULT_REALM, sizeof(global_realm));
@@ -16576,6 +16578,8 @@
/* Create the dialogs list */
if (!strcasecmp(v->name, "context")) {
ast_copy_string(default_context, v->value, sizeof(default_context));
+ } else if (!strcasecmp(v->name, "allowguest")) {
+ global_allowguest = ast_true(v->value) ? 1 : 0;
} else if (!strcasecmp(v->name, "realm")) {
ast_copy_string(global_realm, v->value, sizeof(global_realm));
} else if (!strcasecmp(v->name, "useragent")) {
@@ -16639,8 +16643,7 @@
global_notifyhold = ast_true(v->value);
} else if (!strcasecmp(v->name, "alwaysauthreject")) {
global_alwaysauthreject = ast_true(v->value);
- } else if (!strcasecmp(v->name, "mohinterpret")
- || !strcasecmp(v->name, "musicclass") || !strcasecmp(v->name, "musiconhold")) {
+ } else if (!strcasecmp(v->name, "mohinterpret")) {
ast_copy_string(default_mohinterpret, v->value, sizeof(default_mohinterpret));
} else if (!strcasecmp(v->name, "mohsuggest")) {
ast_copy_string(default_mohsuggest, v->value, sizeof(default_mohsuggest));
@@ -16713,8 +16716,6 @@
ast_log(LOG_WARNING, "Invalid localnet value: %s\n", v->value);
else
localaddr = na;
- } else if (!strcasecmp(v->name, "localmask")) {
- ast_log(LOG_WARNING, "Use of localmask is no long supported -- use localnet with mask syntax\n");
} else if (!strcasecmp(v->name, "externip")) {
if (!(hp = ast_gethostbyname(v->value, &ahp)))
ast_log(LOG_WARNING, "Invalid address for externip keyword: %s\n", v->value);
@@ -16792,24 +16793,6 @@
default_maxcallbitrate = atoi(v->value);
if (default_maxcallbitrate < 0)
default_maxcallbitrate = DEFAULT_MAX_CALL_BITRATE;
- } else if (!strcasecmp(v->name, "t38pt_udptl")) { /* XXX maybe ast_set2_flags ? */
- if (ast_true(v->value)) {
- ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
- }
-#ifdef WHEN_WE_HAVE_T38_FOR_OTHER_TRANSPORTS
- } else if (!strcasecmp(v->name, "t38pt_rtp")) { /* XXX maybe ast_set2_flags ? */
- if (ast_true(v->value)) {
- ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_RTP);
- }
- } else if (!strcasecmp(v->name, "t38pt_tcp")) { /* XXX maybe ast_set2_flags ? */
- if (ast_true(v->value)) {
- ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_TCP);
- }
-#endif
- } else if (!strcasecmp(v->name, "rfc2833compensate")) { /* XXX maybe ast_set2_flags ? */
- if (ast_true(v->value)) {
- ast_set_flag(&global_flags[1], SIP_PAGE2_RFC2833_COMPENSATE);
- }
}
}
Modified: team/oej/realtimetext-t140/channels/iax2-parser.c
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/channels/iax2-parser.c?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/channels/iax2-parser.c (original)
+++ team/oej/realtimetext-t140/channels/iax2-parser.c Sun Dec 31 04:25:37 2006
@@ -957,7 +957,7 @@
}
if (!fr) {
- if (!(fr = ast_calloc(1, sizeof(*fr) + datalen)))
+ if (!(fr = ast_calloc_cache(1, sizeof(*fr) + datalen)))
return NULL;
fr->mallocd_datalen = datalen;
}
Propchange: team/oej/realtimetext-t140/codecs/g722/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec 31 04:25:37 2006
@@ -1,0 +1,1 @@
+libg722.a
Modified: team/oej/realtimetext-t140/configs/func_odbc.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/realtimetext-t140/configs/func_odbc.conf.sample?view=diff&rev=49085&r1=49084&r2=49085
==============================================================================
--- team/oej/realtimetext-t140/configs/func_odbc.conf.sample (original)
+++ team/oej/realtimetext-t140/configs/func_odbc.conf.sample Sun Dec 31 04:25:37 2006
@@ -17,25 +17,54 @@
; If you have data which may potentially contain single ticks, you may wish
; to use the dialplan function SQL_ESC() to escape the data prior to its
; inclusion in the SQL statement.
+;
+;
+; The following variables are available in this configuration file:
+;
+; readhandle A comma-separated list of DSNs (from res_odbc.conf) to use when
+; executing the readsql statement. Each DSN is tried, in
+; succession, until the statement succeeds. You may specify up to
+; 5 DSNs per function class. If not specified, it will default to
+; the value of writehandle or dsn, if specified.
+; writehandle A comma-separated list of DSNs (from res_odbc.conf) to use when
+; executing the writesql statement. The same rules apply as to
+; readhandle. "dsn" is a synonym for "writehandle".
+; readsql The statement to execute when reading from the function class.
+; writesql The statement to execute when writing to the function class.
+; prefix Normally, all function classes are prefixed with "ODBC" to keep
+; them uniquely named. You may choose to change this prefix, which
[... 3386 lines stripped ...]
More information about the asterisk-commits
mailing list