aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app.c8
-rw-r--r--apps/app_dial.c2
-rw-r--r--apps/app_voicemail.c18
-rw-r--r--channel.c2
-rw-r--r--channels/chan_agent.c2
-rw-r--r--channels/chan_sip.c1
-rw-r--r--configs/voicemail.conf.sample1
-rw-r--r--doc/README.cdr40
-rw-r--r--pbx.c2
-rw-r--r--translate.c2
10 files changed, 45 insertions, 33 deletions
diff --git a/app.c b/app.c
index 998135fb5..95347a27e 100644
--- a/app.c
+++ b/app.c
@@ -316,8 +316,12 @@ int ast_dtmf_stream(struct ast_channel *chan,struct ast_channel *peer,char *digi
}
}
}
- 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;
}
diff --git a/apps/app_dial.c b/apps/app_dial.c
index a020fefe0..9e9003509 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -161,7 +161,7 @@ static char *descrip =
" 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"
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9fc5bb1cc..3761a9058 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -445,7 +445,7 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
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 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
}
}
if (ast_fileexists(fn, NULL, NULL)) {
- notify_new_message(chan, vmu, msgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
STORE(dir, vmu->mailbox, vmu->context, msgnum);
+ notify_new_message(chan, vmu, msgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
DISPOSE(dir, msgnum);
}
pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
@@ -4764,13 +4764,14 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st
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 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st
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 vm_box_exists(struct ast_channel *chan, void *data)
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 @@ static int vmauthenticate(struct ast_channel *chan, void *data)
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 @@ static int vmauthenticate(struct ast_channel *chan, void *data)
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;
}
diff --git a/channel.c b/channel.c
index 34f8d09ca..777432940 100644
--- a/channel.c
+++ b/channel.c
@@ -576,7 +576,7 @@ struct ast_channel *ast_channel_alloc(int needqueue)
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;
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 40fa5c124..d0df158d6 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -1695,6 +1695,7 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
char agent_goodbye[AST_MAX_FILENAME_LEN];
int update_cdr = updatecdr;
char *filename = "agent-loginok";
+ char tmpchan[AST_MAX_BUF] = "";
LOCAL_USER_ADD(u);
@@ -1825,7 +1826,6 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
snprintf(agent, sizeof(agent), "Agent/%s", p->agent);
if (callbackmode) {
- char tmpchan[AST_MAX_BUF] = "";
int pos = 0;
/* Retrieve login chan */
for (;;) {
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 34a57e66e..24872fe48 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13315,7 +13315,6 @@ int unload_module()
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");
diff --git a/configs/voicemail.conf.sample b/configs/voicemail.conf.sample
index 8558235a6..fa362c95d 100644
--- a/configs/voicemail.conf.sample
+++ b/configs/voicemail.conf.sample
@@ -172,6 +172,7 @@ sendvoicemail=yes ; Context to Send voicemail from [option 5 from the advanced m
; 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
diff --git a/doc/README.cdr b/doc/README.cdr
index 7a5440ebf..cb9813845 100644
--- a/doc/README.cdr
+++ b/doc/README.cdr
@@ -11,6 +11,8 @@ separated text file.
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
@@ -39,28 +41,28 @@ channel configuration files, like sip.conf, iax.conf etc.
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
diff --git a/pbx.c b/pbx.c
index 7f5fef1ee..3446ab58e 100644
--- a/pbx.c
+++ b/pbx.c
@@ -2029,7 +2029,7 @@ int ast_extension_state_del(int id, ast_state_cb_type callback)
cblist = cblist->next;
}
- ast_mutex_lock(&hintlock);
+ ast_mutex_unlock(&hintlock);
return -1;
}
diff --git a/translate.c b/translate.c
index 4126851b9..6285ac48b 100644
--- a/translate.c
+++ b/translate.c
@@ -331,6 +331,7 @@ static int show_translation(int fd, int argc, char *argv[])
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 @@ static int show_translation(int fd, int argc, char *argv[])
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] = ' ';