[asterisk-commits] branch oej/moduletest - r8119 in
/team/oej/moduletest: ./ apps/ channels/ con...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jan 16 20:10:48 MST 2006
Author: oej
Date: Mon Jan 16 21:10:40 2006
New Revision: 8119
URL: http://svn.digium.com/view/asterisk?rev=8119&view=rev
Log:
Merged revisions 7898-7900,7904,7908,7915,7917,7939,7955,7957,7960,7963,7965,7970,7972,7976,7986,7999,8047,8074,8112 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7898 | kpfleming | 2006-01-09 19:08:07 +0100 (Mon, 09 Jan 2006) | 2 lines
fix breakage introduced in revision 7871
........
r7899 | kpfleming | 2006-01-09 19:09:53 +0100 (Mon, 09 Jan 2006) | 2 lines
backport fix from revision 7856 of trunk
........
r7900 | kpfleming | 2006-01-09 19:11:23 +0100 (Mon, 09 Jan 2006) | 2 lines
commit user/group-related changes from trunk
........
r7904 | tilghman | 2006-01-09 19:37:50 +0100 (Mon, 09 Jan 2006) | 2 lines
Update variable documentation to match the code
........
r7908 | tilghman | 2006-01-09 21:08:24 +0100 (Mon, 09 Jan 2006) | 2 lines
Bug 6157 - Memory leak
........
r7915 | russell | 2006-01-09 23:07:26 +0100 (Mon, 09 Jan 2006) | 2 lines
add missing unlock (issue #6112)
........
r7917 | kpfleming | 2006-01-09 23:48:48 +0100 (Mon, 09 Jan 2006) | 2 lines
re-initialize _all_ sequence numbers when transfer completes
........
r7939 | oej | 2006-01-10 09:48:14 +0100 (Tue, 10 Jan 2006) | 3 lines
- Adding reference to README.tds
- Reformatting table
........
r7955 | tilghman | 2006-01-11 02:30:10 +0100 (Wed, 11 Jan 2006) | 2 lines
Bug 6192 - behave correctly when mailbox is specified as argument
........
r7957 | russell | 2006-01-11 04:12:44 +0100 (Wed, 11 Jan 2006) | 2 lines
fix a little typo
........
r7960 | russell | 2006-01-11 05:19:21 +0100 (Wed, 11 Jan 2006) | 2 lines
fix locking error - lock instead of unlock
........
r7963 | mogorman | 2006-01-11 05:38:07 +0100 (Wed, 11 Jan 2006) | 2 lines
Minor typo refrenced in 6191
........
r7965 | russell | 2006-01-11 05:53:24 +0100 (Wed, 11 Jan 2006) | 2 lines
lock list of translators *before* recalculating the translation matrix
........
r7970 | russell | 2006-01-11 06:26:21 +0100 (Wed, 11 Jan 2006) | 3 lines
don't override an error condition that occurred when acting on the primary channel
when stopping the autoservice on the peer channel. (from issue #6087)
........
r7972 | russell | 2006-01-11 06:46:39 +0100 (Wed, 11 Jan 2006) | 2 lines
fix mem leak on module unload (issue #6190)
........
r7976 | russell | 2006-01-11 08:18:16 +0100 (Wed, 11 Jan 2006) | 2 lines
fix temp greetings with ODBC storage (issue #6078)
........
r7986 | russell | 2006-01-11 20:08:53 +0100 (Wed, 11 Jan 2006) | 2 lines
move variable to correct scope (issue #6197)
........
r7999 | tilghman | 2006-01-12 07:14:22 +0100 (Thu, 12 Jan 2006) | 2 lines
Bug 6211 - Add option deletevoicemail as equivalent to option delete for Realtime
........
r8047 | russell | 2006-01-13 07:07:39 +0100 (Fri, 13 Jan 2006) | 2 lines
fix spelling errors (issue #6227)
........
r8074 | tilghman | 2006-01-14 20:06:44 +0100 (Sat, 14 Jan 2006) | 2 lines
Bug 6238 - Fix segfault when delimiter not specified
........
r8112 | kpfleming | 2006-01-17 00:51:37 +0100 (Tue, 17 Jan 2006) | 2 lines
do rlimit check _after_ reading config file, in case 'dumpcore' is specified there
........
Modified:
team/oej/moduletest/ (props changed)
team/oej/moduletest/app.c
team/oej/moduletest/apps/app_dial.c
team/oej/moduletest/apps/app_voicemail.c
team/oej/moduletest/asterisk.c
team/oej/moduletest/channel.c
team/oej/moduletest/channels/chan_agent.c
team/oej/moduletest/channels/chan_iax2.c
team/oej/moduletest/channels/chan_sip.c
team/oej/moduletest/configs/voicemail.conf.sample
team/oej/moduletest/db.c
team/oej/moduletest/doc/README.cdr
team/oej/moduletest/doc/README.variables
team/oej/moduletest/file.c
team/oej/moduletest/funcs/func_strings.c
team/oej/moduletest/pbx.c
team/oej/moduletest/pbx/pbx_spool.c
team/oej/moduletest/translate.c
Propchange: team/oej/moduletest/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jan 16 21:10:40 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-7496,7498-7879
+/branches/1.2:1-7496,7498-8117
Modified: team/oej/moduletest/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/app.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/app.c (original)
+++ team/oej/moduletest/app.c Mon Jan 16 21:10:40 2006
@@ -316,8 +316,12 @@
}
}
}
- if (peer)
- res = ast_autoservice_stop(peer);
+ if (peer) {
+ /* Stop autoservice on the peer channel, but don't overwrite any error condition
+ that has occurred previously while acting on the primary channel */
+ if (ast_autoservice_stop(peer) && !res)
+ res = -1;
+ }
}
return res;
}
Modified: team/oej/moduletest/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/apps/app_dial.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/apps/app_dial.c (original)
+++ team/oej/moduletest/apps/app_dial.c Mon Jan 16 21:10:40 2006
@@ -162,7 +162,7 @@
" S(x) - Hang up the call after 'x' seconds *after* the called party has\n"
" answered the call.\n"
" t - Allow the called party to transfer the calling party by sending the\n"
-" DTMF sequence defiend in features.conf.\n"
+" DTMF sequence defined in features.conf.\n"
" T - Allow the calling party to transfer the called party by sending the\n"
" DTMF sequence defined in features.conf.\n"
" w - Allow the called party to enable recording of the call by sending\n"
Modified: team/oej/moduletest/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/apps/app_voicemail.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/apps/app_voicemail.c (original)
+++ team/oej/moduletest/apps/app_voicemail.c Mon Jan 16 21:10:40 2006
@@ -445,7 +445,7 @@
ast_copy_string(vmu->language, value, sizeof(vmu->language));
} else if (!strcasecmp(var, "tz")) {
ast_copy_string(vmu->zonetag, value, sizeof(vmu->zonetag));
- } else if (!strcasecmp(var, "delete")) {
+ } else if (!strcasecmp(var, "delete") || !strcasecmp(var, "deletevoicemail")) {
ast_set2_flag(vmu, ast_true(value), VM_DELETE);
} else if (!strcasecmp(var, "saycid")){
ast_set2_flag(vmu, ast_true(value), VM_SAYCID);
@@ -2613,8 +2613,8 @@
}
}
if (ast_fileexists(fn, NULL, NULL)) {
+ STORE(dir, vmu->mailbox, vmu->context, msgnum);
notify_new_message(chan, vmu, msgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
- STORE(dir, vmu->mailbox, vmu->context, msgnum);
DISPOSE(dir, msgnum);
}
pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
@@ -3920,8 +3920,8 @@
{
int cmd;
char *buf;
+
buf = alloca(strlen(mbox)+2);
- memset(buf, '\0', sizeof(char)*(sizeof(buf)));
strcpy(buf, mbox);
strcat(buf,"s");
@@ -4764,13 +4764,14 @@
while((cmd >= 0) && (cmd != 't')) {
if (cmd)
retries = 0;
+ RETRIEVE(prefile, -1);
if (ast_fileexists(prefile, NULL, NULL) > 0) {
switch (cmd) {
case '1':
cmd = play_record_review(chan,"vm-rec-temp",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain);
break;
case '2':
- ast_filedelete(prefile, NULL);
+ DELETE(prefile, -1, prefile);
ast_play_and_wait(chan,"vm-tempremoved");
cmd = 't';
break;
@@ -4794,6 +4795,7 @@
play_record_review(chan,"vm-rec-temp",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain);
cmd = 't';
}
+ DISPOSE(prefile, -1);
}
if (cmd == 't')
cmd = 0;
@@ -5645,10 +5647,10 @@
static int vmauthenticate(struct ast_channel *chan, void *data)
{
struct localuser *u;
- char *s = data, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION];
+ char *s = data, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION] = "";
struct ast_vm_user vmus;
char *options = NULL;
- int silent = 0;
+ int silent = 0, skipuser = 0;
int res = -1;
LOCAL_USER_ADD(u);
@@ -5665,6 +5667,9 @@
s = user;
user = strsep(&s, "@");
context = strsep(&s, "");
+ if (!ast_strlen_zero(user))
+ skipuser++;
+ ast_copy_string(mailbox, user, sizeof(mailbox));
}
}
@@ -5672,9 +5677,10 @@
silent = (strchr(options, 's')) != NULL;
}
- if (!vm_authenticate(chan, mailbox, sizeof(mailbox), &vmus, context, NULL, 0, 3, silent)) {
+ if (!vm_authenticate(chan, mailbox, sizeof(mailbox), &vmus, context, NULL, skipuser, 3, silent)) {
pbx_builtin_setvar_helper(chan, "AUTH_MAILBOX", mailbox);
pbx_builtin_setvar_helper(chan, "AUTH_CONTEXT", vmus.context);
+ ast_play_and_wait(chan, "auth-thankyou");
res = 0;
}
Modified: team/oej/moduletest/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/asterisk.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/asterisk.c (original)
+++ team/oej/moduletest/asterisk.c Mon Jan 16 21:10:40 2006
@@ -100,6 +100,9 @@
#include "asterisk/pbx.h"
#include "asterisk/enum.h"
#include "asterisk/rtp.h"
+#if defined(T38_SUPPORT)
+#include "asterisk/udptl.h"
+#endif
#include "asterisk/app.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
@@ -210,6 +213,8 @@
static int shuttingdown = 0;
static int restartnow = 0;
static pthread_t consolethread = AST_PTHREADT_NULL;
+
+static char randompool[256];
#if !defined(LOW_MEMORY)
struct file_version {
@@ -1091,6 +1096,7 @@
{
if (argc != 3)
return RESULT_SHOWUSAGE;
+ ast_cli(fd, "Waiting for inactivity to perform halt\n");
quit_handler(0, 2 /* really nicely */, 1 /* safely */, 0 /* don't restart */);
return RESULT_SUCCESS;
}
@@ -1115,6 +1121,7 @@
{
if (argc != 3)
return RESULT_SHOWUSAGE;
+ ast_cli(fd, "Waiting for inactivity to perform restart\n");
quit_handler(0, 2 /* really nicely */, 1 /* safely */, 1 /* restart */);
return RESULT_SUCCESS;
}
@@ -1511,7 +1518,7 @@
idx = 1;
- qsort(&matches[0], (size_t)(len + 1), sizeof(char *), ast_el_sort_compare);
+ qsort(&matches[0], (size_t)(len), sizeof(char *), ast_el_sort_compare);
for (; count > 0; count--) {
numoutputline = 0;
@@ -1602,12 +1609,15 @@
free(mbuf);
} else
matches = (char **) NULL;
-
-
} else {
-
- nummatches = ast_cli_generatornummatches((char *)lf->buffer,ptr);
+ char **p, *oldbuf=NULL;
+ nummatches = 0;
matches = ast_cli_completion_matches((char *)lf->buffer,ptr);
+ for (p = matches; p && *p; p++) {
+ if (!oldbuf || strcmp(*p,oldbuf))
+ nummatches++;
+ oldbuf = *p;
+ }
}
if (matches) {
@@ -1641,7 +1651,7 @@
retval = CC_REFRESH;
}
}
- free(matches);
+ free(matches);
}
return (char *)(long)retval;
@@ -1930,7 +1940,7 @@
/* Run as console (-c at startup, implies nofork) */
} else if (!strcasecmp(v->name, "console")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_CONSOLE);
- /* Run with highg priority if the O/S permits (-p at startup) */
+ /* Run with high priority if the O/S permits (-p at startup) */
} else if (!strcasecmp(v->name, "highpriority")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_HIGH_PRIORITY);
/* Initialize RSA auth keys (IAX2) (-i at startup) */
@@ -2119,6 +2129,10 @@
}
}
+ if (ast_opt_console && !option_verbose)
+ ast_verbose("[ Reading Master Configuration ]");
+ ast_readconfig();
+
if (ast_opt_dump_core) {
struct rlimit l;
memset(&l, 0, sizeof(l));
@@ -2129,10 +2143,6 @@
}
}
- if (ast_opt_console && !option_verbose)
- ast_verbose("[ Reading Master Configuration ]");
- ast_readconfig();
-
if ((!rungroup) && !ast_strlen_zero(ast_config_AST_RUN_GROUP))
rungroup = ast_config_AST_RUN_GROUP;
if ((!runuser) && !ast_strlen_zero(ast_config_AST_RUN_USER))
@@ -2167,6 +2177,16 @@
if (!pw) {
ast_log(LOG_WARNING, "No such user '%s'!\n", runuser);
exit(1);
+ }
+ if (!rungroup) {
+ if (setgid(pw->pw_gid)) {
+ ast_log(LOG_WARNING, "Unable to setgid to %d!\n", pw->pw_gid);
+ exit(1);
+ }
+ if (initgroups(pw->pw_name, pw->pw_gid)) {
+ ast_log(LOG_WARNING, "Unable to init groups for '%s'\n", runuser);
+ exit(1);
+ }
}
if (setuid(pw->pw_uid)) {
ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", pw->pw_uid, runuser);
@@ -2275,7 +2295,7 @@
Asterisk is started
*/
srand((unsigned int) getpid() + (unsigned int) time(NULL));
- srandom((unsigned int) getpid() + (unsigned int) time(NULL));
+ initstate((unsigned int) getpid() * 65536 + (unsigned int) time(NULL), randompool, sizeof(randompool));
if (init_logger()) {
printf(term_quit());
@@ -2304,6 +2324,9 @@
exit(1);
}
ast_rtp_init();
+#if defined(T38_SUPPORT)
+ ast_udptl_init();
+#endif
if (ast_image_init()) {
printf(term_quit());
exit(1);
Modified: team/oej/moduletest/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/channel.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/channel.c (original)
+++ team/oej/moduletest/channel.c Mon Jan 16 21:10:40 2006
@@ -576,7 +576,7 @@
tmp->fds[AST_MAX_FDS-1] = tmp->alertpipe[0];
/* And timing pipe */
tmp->fds[AST_MAX_FDS-2] = tmp->timingfd;
- strcpy(tmp->name, "**Unkown**");
+ strcpy(tmp->name, "**Unknown**");
/* Initial state */
tmp->_state = AST_STATE_DOWN;
tmp->streamid = -1;
Modified: team/oej/moduletest/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/channels/chan_agent.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/channels/chan_agent.c (original)
+++ team/oej/moduletest/channels/chan_agent.c Mon Jan 16 21:10:40 2006
@@ -102,7 +102,7 @@
static const char descrip3[] =
" AgentMonitorOutgoing([options]):\n"
"Tries to figure out the id of the agent who is placing outgoing call based on\n"
-"comparision of the callerid of the current interface and the global variable \n"
+"comparison of the callerid of the current interface and the global variable \n"
"placed by the AgentCallbackLogin application. That's why it should be used only\n"
"with the AgentCallbackLogin app. Uses the monitoring functions in chan_agent \n"
"instead of Monitor application. That have to be configured in the agents.conf file.\n"
@@ -144,7 +144,7 @@
/** Persistent Agents astdb family */
static const char pa_family[] = "/Agents";
-/** The maximum lengh of each persistent member agent database entry */
+/** The maximum length of each persistent member agent database entry */
#define PA_MAX_LEN 2048
/** queues.conf [general] option */
static int persistent_agents = 0;
@@ -1051,7 +1051,7 @@
urlprefix[0] = '\0';
savecallsin[0] = '\0';
- /* Read in [general] section for persistance */
+ /* Read in [general] section for persistence */
if ((general_val = ast_variable_retrieve(cfg, "general", "persistentagents")))
persistent_agents = ast_true(general_val);
@@ -1695,6 +1695,7 @@
char agent_goodbye[AST_MAX_FILENAME_LEN];
int update_cdr = updatecdr;
char *filename = "agent-loginok";
+ char tmpchan[AST_MAX_BUF] = "";
LOCAL_USER_ADD(u);
@@ -1790,7 +1791,7 @@
gettimeofday(&p->lastdisc, NULL);
p->lastdisc.tv_sec++;
- /* Set Channel Specific Agent Overides */
+ /* Set Channel Specific Agent Overrides */
if (pbx_builtin_getvar_helper(chan, "AGENTACKCALL") && strlen(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) {
if (!strcasecmp(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"), "always"))
p->ackcall = 2;
@@ -1818,14 +1819,13 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Saw variable AGENTWRAPUPTIME=%s, setting wrapuptime to: %d for Agent '%s'.\n",tmpoptions,p->wrapuptime,p->agent);
}
- /* End Channel Specific Agent Overides */
+ /* End Channel Specific Agent Overrides */
if (!p->chan) {
char last_loginchan[80] = "";
long logintime;
snprintf(agent, sizeof(agent), "Agent/%s", p->agent);
if (callbackmode) {
- char tmpchan[AST_MAX_BUF] = "";
int pos = 0;
/* Retrieve login chan */
for (;;) {
@@ -2361,7 +2361,7 @@
}
ast_mutex_unlock(&agentlock);
if (db_tree) {
- ast_log(LOG_NOTICE, "Agents sucessfully reloaded from database.\n");
+ ast_log(LOG_NOTICE, "Agents successfully reloaded from database.\n");
ast_db_freetree(db_tree);
}
}
@@ -2502,7 +2502,7 @@
/**
* Initialize the Agents module.
- * This funcion is being called by Asterisk when loading the module. Among other thing it registers applications, cli commands and reads the cofiguration file.
+ * This function is being called by Asterisk when loading the module. Among other thing it registers applications, cli commands and reads the cofiguration file.
*
* @returns int Always 0.
*/
Modified: team/oej/moduletest/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/channels/chan_iax2.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/channels/chan_iax2.c (original)
+++ team/oej/moduletest/channels/chan_iax2.c Mon Jan 16 21:10:40 2006
@@ -5369,6 +5369,7 @@
memset(&pvt->transfer, 0, sizeof(pvt->transfer));
/* Reset sequence numbers */
pvt->oseqno = 0;
+ pvt->rseqno = 0;
pvt->iseqno = 0;
pvt->aseqno = 0;
pvt->peercallno = peercallno;
@@ -6579,8 +6580,8 @@
/* Handle implicit ACKing unless this is an INVAL, and only if this is
from the real peer, not the transfer peer */
if (!inaddrcmp(&sin, &iaxs[fr.callno]->addr) &&
- (((f.subclass != IAX_COMMAND_INVAL)) ||
- (f.frametype != AST_FRAME_IAX))) {
+ ((f.subclass != IAX_COMMAND_INVAL) ||
+ (f.frametype != AST_FRAME_IAX))) {
unsigned char x;
/* XXX This code is not very efficient. Surely there is a better way which still
properly handles boundary conditions? XXX */
Modified: team/oej/moduletest/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/channels/chan_sip.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/channels/chan_sip.c (original)
+++ team/oej/moduletest/channels/chan_sip.c Mon Jan 16 21:10:40 2006
@@ -13161,7 +13161,6 @@
ast_softhangup(p->owner, AST_SOFTHANGUP_APPUNLOAD);
p = p->next;
}
- iflist = NULL;
ast_mutex_unlock(&iflock);
} else {
ast_log(LOG_WARNING, "Unable to lock the interface list\n");
Modified: team/oej/moduletest/configs/voicemail.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/configs/voicemail.conf.sample?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/configs/voicemail.conf.sample (original)
+++ team/oej/moduletest/configs/voicemail.conf.sample Mon Jan 16 21:10:40 2006
@@ -172,6 +172,7 @@
; This does NOT affect option 3,3 from the advanced options menu
; delete=yes ; After notification, the voicemail is deleted from the server. [per-mailbox only]
; This is intended for use with users who wish to receive their voicemail ONLY by email.
+ ; Note: deletevoicemail is provided as an equivalent option for Realtime configuration.
; nextaftercmd=yes ; Skips to the next message after hitting 7 or 9 to delete/save current message.
; [global option only at this time]
; forcename=yes ; Forces a new user to record their name. A new user is
Modified: team/oej/moduletest/db.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/db.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/db.c (original)
+++ team/oej/moduletest/db.c Mon Jan 16 21:10:40 2006
@@ -121,8 +121,10 @@
}
ast_mutex_lock(&dblock);
- if (dbinit())
+ if (dbinit()) {
+ ast_mutex_unlock(&dblock);
return -1;
+ }
memset(&key, 0, sizeof(key));
memset(&data, 0, sizeof(data));
Modified: team/oej/moduletest/doc/README.cdr
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/doc/README.cdr?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/doc/README.cdr (original)
+++ team/oej/moduletest/doc/README.cdr Mon Jan 16 21:10:40 2006
@@ -11,6 +11,8 @@
for an updated list of supported databases, from MySQL to MsSQL
and text files.
* cdr_tds supports FreeTDS databases (Among them MS SQL)
+ NOTE: Please read README.tds for information on possible
+ problems with the FreeTDS driver
* cdr_sqlite supports SQlite
* cdr_pgsql supports PostgreSQL
@@ -37,28 +39,28 @@
Fields of the CDR in Asterisk
-----------------------------
- 1. accountcode: What account number to use, (string, 20 characters)
- 2. src: Caller*ID number (string, 80 characters)
- 3. dst: Destination extension (string, 80 characters)
- 4. dcontext: Destination context (string, 80 characters)
- 5. clid: Caller*ID with text (80 characters)
- 6. channel: Channel used (80 characters)
- 7. dstchannel: Destination channel if appropriate (80 characters)
- 8. lastapp: Last application if appropriate (80 characters)
- 9. lastdata: Last application data (arguments) (80 characters)
- 10. start: Start of call (date/time)
- 11. answer: Answer of call (date/time)
- 12. end: End of call (date/time)
- 13. duration: Total time in system, in seconds (integer), from dial to hangup
- 14. billsec: Total time call is up, in seconds (integer), from answer to hangup
- 15. disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY
- 16. amaflags: What flags to use: DOCUMENTATION, BILL, IGNORE etc,
- specified on a per channel basis like accountcode.
- 17. user field: A user-defined field, maximum 255 characters
+ 1. accountcode: What account number to use, (string, 20 characters)
+ 2. src: Caller*ID number (string, 80 characters)
+ 3. dst: Destination extension (string, 80 characters)
+ 4. dcontext: Destination context (string, 80 characters)
+ 5. clid: Caller*ID with text (80 characters)
+ 6. channel: Channel used (80 characters)
+ 7. dstchannel: Destination channel if appropriate (80 characters)
+ 8. lastapp: Last application if appropriate (80 characters)
+ 9. lastdata: Last application data (arguments) (80 characters)
+ 10. start: Start of call (date/time)
+ 11. answer: Answer of call (date/time)
+ 12. end: End of call (date/time)
+ 13. duration: Total time in system, in seconds (integer), from dial to hangup
+ 14. billsec: Total time call is up, in seconds (integer), from answer to hangup
+ 15. disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY
+ 16. amaflags: What flags to use: DOCUMENTATION, BILL, IGNORE etc,
+ specified on a per channel basis like accountcode.
+ 17. user field: A user-defined field, maximum 255 characters
In some cases, uniqueid is appended:
- * uniqueid: Unique Channel Identifier (32 characters)
+ * uniqueid: Unique Channel Identifier (32 characters)
This needs to be enabled in the source code at compile time
Modified: team/oej/moduletest/doc/README.variables
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/doc/README.variables?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/doc/README.variables (original)
+++ team/oej/moduletest/doc/README.variables Mon Jan 16 21:10:40 2006
@@ -558,25 +558,25 @@
only read in the dialplan. Writes to such variables are silently
ignored.
-${ACCOUNTCODE} * Account code (if specified)
+${ACCOUNTCODE} * Account code (if specified) (Deprecated; use ${CDR(accountcode)})
${BLINDTRANSFER} The name of the channel on the other side of a blind transfer
${BRIDGEPEER} Bridged peer
-${CALLERANI} * Caller ANI (PRI channels)
-${CALLERID} * Caller ID
-${CALLERIDNAME} * Caller ID Name only
-${CALLERIDNUM} * Caller ID Number only
+${CALLERANI} * Caller ANI (PRI channels) (Deprecated; use ${CALLERID(ani)})
+${CALLERID} * Caller ID (Deprecated; use ${CALLERID(all)})
+${CALLERIDNAME} * Caller ID Name only (Deprecated; use ${CALLERID(name)})
+${CALLERIDNUM} * Caller ID Number only (Deprecated; use ${CALLERID(num)})
${CALLINGANI2} * Caller ANI2 (PRI channels)
${CALLINGPRES} * Caller ID presentation for incoming calls (PRI channels)
${CALLINGTNS} * Transit Network Selector (PRI channels)
${CALLINGTON} * Caller Type of Number (PRI channels)
${CHANNEL} * Current channel name
${CONTEXT} * Current context
-${DATETIME} * Current date time in the format: DDMMYYYY-HH:MM:SS
+${DATETIME} * Current date time in the format: DDMMYYYY-HH:MM:SS (Deprecated; use ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)})
${DB_RESULT} Result value of DB_EXISTS() dial plan function
-${DNID} * Dialed Number Identifier
+${DNID} * Dialed Number Identifier (Deprecated; use ${CALLERID(dnid)})
${EPOCH} * Current unix style epoch
${EXTEN} * Current extension
-${ENV(VAR)} * Environmental variable VAR
+${ENV(VAR)} Environmental variable VAR
${GOTO_ON_BLINDXFR} Transfer to the specified context/extension/priority
after a blind transfer (use ^ characters in place of
| to separate context/extension/priority when setting
@@ -585,12 +585,12 @@
${HINT} * Channel hints for this extension
${HINTNAME} * Suggested Caller*ID name for this extension
${INVALID_EXTEN} The invalid called extension (used in the "i" extension)
-${LANGUAGE} * Current language
+${LANGUAGE} * Current language (Deprecated; use ${LANGUAGE()})
${LEN(VAR)} * String length of VAR (integer)
${PRIORITY} * Current priority in the dialplan
${PRIREDIRECTREASON} Reason for redirect on PRI, if a call was directed
-${RDNIS} * Redirected Dial Number ID Service
-${TIMESTAMP} * Current date time in the format: YYYYMMDD-HHMMSS
+${RDNIS} * Redirected Dial Number ID Service (Deprecated; use ${CALLERID(rdnis)})
+${TIMESTAMP} * Current date time in the format: YYYYMMDD-HHMMSS (Deprecated; use ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
${TRANSFER_CONTEXT} Context for transferred calls
${UNIQUEID} * Current call unique identifier
@@ -786,8 +786,8 @@
In addition, you can set your own extra variables with a traditional
-SetVAR(CDR(var)=val) to anything you want.
-
-Certain functional variables may be accessed with $(foo <args>). A list
+Set(CDR(var)=val) to anything you want.
+
+Certain functional variables may be accessed with ${foo(<args>)}. A list
of these functional variables may be found by typing "show functions"
at the Asterisk CLI.
Modified: team/oej/moduletest/file.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/file.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/file.c (original)
+++ team/oej/moduletest/file.c Mon Jan 16 21:10:40 2006
@@ -176,6 +176,7 @@
tmpl = tmp;
tmp = tmp->next;
}
+ ast_mutex_unlock(&formatlock);
ast_log(LOG_WARNING, "Tried to unregister format %s, already unregistered\n", name);
return -1;
}
Modified: team/oej/moduletest/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/funcs/func_strings.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/funcs/func_strings.c (original)
+++ team/oej/moduletest/funcs/func_strings.c Mon Jan 16 21:10:40 2006
@@ -48,8 +48,12 @@
if (delim) {
varname = strsep(&delim, "|");
pbx_retrieve_variable(chan, varname, &varval, workspace, sizeof(workspace), NULL);
- while (strsep(&varval, delim))
- fieldcount++;
+ if (delim) {
+ while (strsep(&varval, delim))
+ fieldcount++;
+ } else if (!ast_strlen_zero(varval)) {
+ fieldcount = 1;
+ }
snprintf(buf, len, "%d", fieldcount);
} else {
ast_log(LOG_ERROR, "Out of memory\n");
Modified: team/oej/moduletest/pbx.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/pbx.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/pbx.c (original)
+++ team/oej/moduletest/pbx.c Mon Jan 16 21:10:40 2006
@@ -1991,7 +1991,7 @@
cblist = cblist->next;
}
- ast_mutex_lock(&hintlock);
+ ast_mutex_unlock(&hintlock);
return -1;
}
Modified: team/oej/moduletest/pbx/pbx_spool.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/pbx/pbx_spool.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/pbx/pbx_spool.c (original)
+++ team/oej/moduletest/pbx/pbx_spool.c Mon Jan 16 21:10:40 2006
@@ -312,8 +312,10 @@
#endif
fclose(f);
if (o->retries <= o->maxretries) {
+ now += o->retrytime;
if (o->callingpid && (o->callingpid == ast_mainpid)) {
safe_append(o, time(NULL), "DelayedRetry");
+ free_outgoing(o);
ast_log(LOG_DEBUG, "Delaying retry since we're currently running '%s'\n", o->fn);
} else {
/* Increment retries */
@@ -326,7 +328,6 @@
safe_append(o, now, "StartRetry");
launch_service(o);
}
- now += o->retrytime;
return now;
} else {
ast_log(LOG_EVENT, "Queued call to %s/%s expired without completion after %d attempt%s\n", o->tech, o->dest, o->retries - 1, ((o->retries - 1) != 1) ? "s" : "");
Modified: team/oej/moduletest/translate.c
URL: http://svn.digium.com/view/asterisk/team/oej/moduletest/translate.c?rev=8119&r1=8118&r2=8119&view=diff
==============================================================================
--- team/oej/moduletest/translate.c (original)
+++ team/oej/moduletest/translate.c Mon Jan 16 21:10:40 2006
@@ -331,6 +331,7 @@
if (argc > 4)
return RESULT_SHOWUSAGE;
+ ast_mutex_lock(&list_lock);
if (argv[2] && !strcasecmp(argv[2],"recalc")) {
z = argv[3] ? atoi(argv[3]) : 1;
@@ -349,7 +350,6 @@
ast_cli(fd, " Translation times between formats (in milliseconds)\n");
ast_cli(fd, " Source Format (Rows) Destination Format(Columns)\n\n");
- ast_mutex_lock(&list_lock);
for (x = -1; x < SHOW_TRANS; x++) {
/* next 2 lines run faster than using strcpy() */
line[0] = ' ';
More information about the asterisk-commits
mailing list