[asterisk-commits] branch oej/multiparking - r8192 in
/team/oej/multiparking: ./ apps/ channels/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jan 18 12:18:15 MST 2006
Author: oej
Date: Wed Jan 18 13:17:40 2006
New Revision: 8192
URL: http://svn.digium.com/view/asterisk?rev=8192&view=rev
Log:
Merged revisions 8118,8120,8123,8125,8127,8133,8135-8138,8141,8148,8150,8152-8153,8155-8157,8161,8163,8179,8186,8190 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r8118 | oej | 2006-01-17 04:05:43 +0100 (Tue, 17 Jan 2006) | 2 lines
Doxygen update
................
r8120 | kpfleming | 2006-01-17 06:15:33 +0100 (Tue, 17 Jan 2006) | 2 lines
don't generate any message for native bridge attempts unless all the basic checks have passed and we're actually going to try it
................
r8123 | kpfleming | 2006-01-17 14:13:31 +0100 (Tue, 17 Jan 2006) | 10 lines
Merged revisions 8122 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r8122 | kpfleming | 2006-01-17 07:11:55 -0600 (Tue, 17 Jan 2006) | 2 lines
update CLI copyright notice
........
................
r8125 | mogorman | 2006-01-17 17:58:09 +0100 (Tue, 17 Jan 2006) | 10 lines
Merged revisions 7963 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2
........
r7963 | mogorman | 2006-01-10 22:38:07 -0600 (Tue, 10 Jan 2006) | 2 lines
Minor typo refrenced in 6191
........
................
r8127 | mogorman | 2006-01-17 18:25:53 +0100 (Tue, 17 Jan 2006) | 2 lines
Added tab completion for help. bug 6074
................
r8133 | mattf | 2006-01-17 19:20:33 +0100 (Tue, 17 Jan 2006) | 2 lines
Check to see if arg is NULL before passing (#6094)
................
r8135 | bweschke | 2006-01-17 19:31:03 +0100 (Tue, 17 Jan 2006) | 3 lines
Fix compiler warning.
................
r8136 | oej | 2006-01-17 19:54:56 +0100 (Tue, 17 Jan 2006) | 3 lines
- Logging clean up
- Whitespace removed and added, formatting fixed
................
r8137 | oej | 2006-01-17 19:56:57 +0100 (Tue, 17 Jan 2006) | 2 lines
Extra comma causing compilation errors...
................
r8138 | oej | 2006-01-17 20:03:04 +0100 (Tue, 17 Jan 2006) | 2 lines
Portability - compilation warning on Mac OS/X removed
................
r8141 | mogorman | 2006-01-17 21:16:18 +0100 (Tue, 17 Jan 2006) | 11 lines
Merged revisions 8140 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2
........
r8140 | mogorman | 2006-01-17 14:10:29 -0600 (Tue, 17 Jan 2006) | 3 lines
Stop any generators running on a channel when
festival is called as described in 5996
........
................
r8148 | kpfleming | 2006-01-17 21:49:39 +0100 (Tue, 17 Jan 2006) | 2 lines
suppress compiler warning
................
r8150 | kpfleming | 2006-01-17 21:53:04 +0100 (Tue, 17 Jan 2006) | 2 lines
spelling fix
................
r8152 | mogorman | 2006-01-17 21:58:56 +0100 (Tue, 17 Jan 2006) | 3 lines
allow for multiple periodic announcements
from bug 5273 with minor changes.
................
r8153 | mogorman | 2006-01-17 22:10:38 +0100 (Tue, 17 Jan 2006) | 2 lines
oops all better now.
................
r8155 | mattf | 2006-01-18 00:13:42 +0100 (Wed, 18 Jan 2006) | 2 lines
Fix answeronpolarityswitch and hanguponpolarityswitch when both are yes (#6229)
................
r8156 | mattf | 2006-01-18 00:37:22 +0100 (Wed, 18 Jan 2006) | 2 lines
Improvements to DSP callprogress=yes code (#5009)
................
r8157 | kpfleming | 2006-01-18 00:45:05 +0100 (Wed, 18 Jan 2006) | 2 lines
remove some more deprecated (pre-1.2) stuff
................
r8161 | mogorman | 2006-01-18 01:05:09 +0100 (Wed, 18 Jan 2006) | 3 lines
cleanup the show uptime code, and minor changes
to patch 6274
................
r8163 | mogorman | 2006-01-18 01:49:43 +0100 (Wed, 18 Jan 2006) | 12 lines
Merged revisions 8162 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r8162 | mogorman | 2006-01-17 18:47:04 -0600 (Tue, 17 Jan 2006) | 4 lines
Changed order of autoload so that pbx_ comes before
channels, and in doing so cause bug 6002 to not
be an issue
........
................
r8179 | mogorman | 2006-01-18 04:53:10 +0100 (Wed, 18 Jan 2006) | 3 lines
cli.h cleanup and additional documentation
from patch 6272
................
r8186 | mogorman | 2006-01-18 16:42:48 +0100 (Wed, 18 Jan 2006) | 3 lines
allows for use of the originate function from
the cli patch 5847
................
r8190 | mogorman | 2006-01-18 17:24:29 +0100 (Wed, 18 Jan 2006) | 2 lines
oops. sorry
................
Added:
team/oej/multiparking/res/res_clioriginate.c
- copied unchanged from r8190, trunk/res/res_clioriginate.c
Modified:
team/oej/multiparking/ (props changed)
team/oej/multiparking/Makefile
team/oej/multiparking/apps/app_dial.c
team/oej/multiparking/apps/app_festival.c
team/oej/multiparking/apps/app_queue.c
team/oej/multiparking/asterisk.c
team/oej/multiparking/channel.c
team/oej/multiparking/channels/chan_local.c
team/oej/multiparking/channels/chan_misdn.c
team/oej/multiparking/channels/chan_sip.c
team/oej/multiparking/channels/chan_vpb.c
team/oej/multiparking/channels/chan_zap.c
team/oej/multiparking/cli.c
team/oej/multiparking/dsp.c
team/oej/multiparking/include/asterisk/cli.h
team/oej/multiparking/include/asterisk/doxyref.h
team/oej/multiparking/include/asterisk/module.h
team/oej/multiparking/loader.c
team/oej/multiparking/logger.c
team/oej/multiparking/manager.c
team/oej/multiparking/pbx.c
team/oej/multiparking/pbx/pbx_dundi.c
team/oej/multiparking/res/Makefile
team/oej/multiparking/res/res_features.c
team/oej/multiparking/rtp.c
Propchange: team/oej/multiparking/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan 18 13:17:40 2006
@@ -1,1 +1,1 @@
-/trunk:1-8115
+/trunk:1-8191
Modified: team/oej/multiparking/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/Makefile?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- team/oej/multiparking/Makefile (original)
+++ team/oej/multiparking/Makefile Wed Jan 18 13:17:40 2006
@@ -106,7 +106,7 @@
# Detect the busy signal looking only at tone lengths
# For example if you have 3 beeps 100ms tone, 100ms silence separated by 500 ms of silence
BUSYDETECT+= #-DBUSYDETECT_TONEONLY
-# Inforce the detection of busy singal (get rid of false hangups)
+# Enforce the detection of busy singal (get rid of false hangups)
# Don't use together with -DBUSYDETECT_TONEONLY
BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
Modified: team/oej/multiparking/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/apps/app_dial.c?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- team/oej/multiparking/apps/app_dial.c (original)
+++ team/oej/multiparking/apps/app_dial.c Wed Jan 18 13:17:40 2006
@@ -189,30 +189,30 @@
"to the Dial application.\n";
enum {
- OPT_ANNOUNCE = (1 << 0),
- OPT_RESETCDR = (1 << 1),
- OPT_DTMF_EXIT = (1 << 2),
- OPT_SENDDTMF = (1 << 3),
- OPT_FORCECLID = (1 << 4),
- OPT_GO_ON = (1 << 5),
- OPT_CALLEE_HANGUP = (1 << 6),
- OPT_CALLER_HANGUP = (1 << 7),
- OPT_PRIORITY_JUMP = (1 << 8),
- OPT_DURATION_LIMIT = (1 << 9),
- OPT_MUSICBACK = (1 << 10),
- OPT_CALLEE_MACRO = (1 << 11),
- OPT_SCREEN_NOINTRO = (1 << 12),
- OPT_SCREEN_NOCLID = (1 << 13),
- OPT_ORIGINAL_CLID = (1 << 14),
- OPT_SCREENING = (1 << 15),
- OPT_PRIVACY = (1 << 16),
- OPT_RINGBACK = (1 << 17),
- OPT_DURATION_STOP = (1 << 18),
- OPT_CALLEE_TRANSFER = (1 << 19),
- OPT_CALLER_TRANSFER = (1 << 20),
- OPT_CALLEE_MONITOR = (1 << 21),
- OPT_CALLER_MONITOR = (1 << 22),
- OPT_GOTO = (1 << 23),
+ OPT_ANNOUNCE = (1 << 0),
+ OPT_RESETCDR = (1 << 1),
+ OPT_DTMF_EXIT = (1 << 2),
+ OPT_SENDDTMF = (1 << 3),
+ OPT_FORCECLID = (1 << 4),
+ OPT_GO_ON = (1 << 5),
+ OPT_CALLEE_HANGUP = (1 << 6),
+ OPT_CALLER_HANGUP = (1 << 7),
+ OPT_PRIORITY_JUMP = (1 << 8),
+ OPT_DURATION_LIMIT = (1 << 9),
+ OPT_MUSICBACK = (1 << 10),
+ OPT_CALLEE_MACRO = (1 << 11),
+ OPT_SCREEN_NOINTRO = (1 << 12),
+ OPT_SCREEN_NOCLID = (1 << 13),
+ OPT_ORIGINAL_CLID = (1 << 14),
+ OPT_SCREENING = (1 << 15),
+ OPT_PRIVACY = (1 << 16),
+ OPT_RINGBACK = (1 << 17),
+ OPT_DURATION_STOP = (1 << 18),
+ OPT_CALLEE_TRANSFER = (1 << 19),
+ OPT_CALLER_TRANSFER = (1 << 20),
+ OPT_CALLEE_MONITOR = (1 << 21),
+ OPT_CALLER_MONITOR = (1 << 22),
+ OPT_GOTO = (1 << 23),
} dial_exec_option_flags;
#define DIAL_STILLGOING (1 << 30)
@@ -425,7 +425,7 @@
ast_goto_if_exists(in, in->context, in->exten, in->priority + 101);
} else {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_2 "No one is available to answer at this time (%d:%d/%d/%d)\n", numlines, numbusy, numcongestion, numnochan);
+ ast_verbose(VERBOSE_PREFIX_3 "No one is available to answer at this time (%d:%d/%d/%d)\n", numlines, numbusy, numcongestion, numnochan);
}
*to = 0;
return NULL;
@@ -436,7 +436,7 @@
if (ast_test_flag(o, DIAL_STILLGOING) && o->chan && (o->chan->_state == AST_STATE_UP)) {
if (!peer) {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "%s answered %s\n", o->chan->name, in->name);
+ ast_verbose(VERBOSE_PREFIX_3 "%s answered %s\n", o->chan->name, in->name);
peer = o->chan;
ast_copy_flags(peerflags, o,
OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
@@ -449,7 +449,8 @@
char tmpchan[256];
char *stuff;
char *tech;
- char *forward_context;
+ const char *forward_context;
+
ast_copy_string(tmpchan, o->chan->call_forward, sizeof(tmpchan));
if ((stuff = strchr(tmpchan, '/'))) {
*stuff = '\0';
@@ -567,7 +568,7 @@
break;
case AST_CONTROL_BUSY:
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "%s is busy\n", o->chan->name);
+ ast_verbose(VERBOSE_PREFIX_3 "%s is busy\n", o->chan->name);
in->hangupcause = o->chan->hangupcause;
ast_hangup(o->chan);
o->chan = NULL;
@@ -576,7 +577,7 @@
break;
case AST_CONTROL_CONGESTION:
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "%s is circuit-busy\n", o->chan->name);
+ ast_verbose(VERBOSE_PREFIX_3 "%s is circuit-busy\n", o->chan->name);
in->hangupcause = o->chan->hangupcause;
ast_hangup(o->chan);
o->chan = NULL;
@@ -585,7 +586,7 @@
break;
case AST_CONTROL_RINGING:
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "%s is ringing\n", o->chan->name);
+ ast_verbose(VERBOSE_PREFIX_3 "%s is ringing\n", o->chan->name);
if (!(*sentringing) && !ast_test_flag(outgoing, OPT_MUSICBACK)) {
ast_indicate(in, AST_CONTROL_RINGING);
(*sentringing)++;
@@ -593,18 +594,18 @@
break;
case AST_CONTROL_PROGRESS:
if (option_verbose > 2)
- ast_verbose ( VERBOSE_PREFIX_3 "%s is making progress passing it to %s\n", o->chan->name,in->name);
+ ast_verbose (VERBOSE_PREFIX_3 "%s is making progress passing it to %s\n", o->chan->name,in->name);
if (!ast_test_flag(outgoing, OPT_RINGBACK))
ast_indicate(in, AST_CONTROL_PROGRESS);
break;
case AST_CONTROL_VIDUPDATE:
if (option_verbose > 2)
- ast_verbose ( VERBOSE_PREFIX_3 "%s requested a video update, passing it to %s\n", o->chan->name,in->name);
+ ast_verbose (VERBOSE_PREFIX_3 "%s requested a video update, passing it to %s\n", o->chan->name,in->name);
ast_indicate(in, AST_CONTROL_VIDUPDATE);
break;
case AST_CONTROL_PROCEEDING:
if (option_verbose > 2)
- ast_verbose ( VERBOSE_PREFIX_3 "%s is proceeding passing it to %s\n", o->chan->name,in->name);
+ ast_verbose (VERBOSE_PREFIX_3 "%s is proceeding passing it to %s\n", o->chan->name,in->name);
if (!ast_test_flag(outgoing, OPT_RINGBACK))
ast_indicate(in, AST_CONTROL_PROCEEDING);
break;
@@ -625,28 +626,30 @@
case -1:
if (!ast_test_flag(outgoing, OPT_RINGBACK | OPT_MUSICBACK)) {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "%s stopped sounds\n", o->chan->name);
+ ast_verbose(VERBOSE_PREFIX_3 "%s stopped sounds\n", o->chan->name);
ast_indicate(in, -1);
(*sentringing) = 0;
}
break;
default:
- ast_log(LOG_DEBUG, "Dunno what to do with control type %d\n", f->subclass);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Dunno what to do with control type %d\n", f->subclass);
}
} else if (single && (f->frametype == AST_FRAME_VOICE) &&
!(ast_test_flag(outgoing, OPT_RINGBACK|OPT_MUSICBACK))) {
if (ast_write(in, f))
- ast_log(LOG_DEBUG, "Unable to forward frame\n");
+ ast_log(LOG_WARNING, "Unable to forward voice frame\n");
} else if (single && (f->frametype == AST_FRAME_IMAGE) &&
!(ast_test_flag(outgoing, OPT_RINGBACK|OPT_MUSICBACK))) {
if (ast_write(in, f))
- ast_log(LOG_DEBUG, "Unable to forward image\n");
+ ast_log(LOG_WARNING, "Unable to forward image\n");
} else if (single && (f->frametype == AST_FRAME_TEXT) &&
!(ast_test_flag(outgoing, OPT_RINGBACK|OPT_MUSICBACK))) {
if (ast_write(in, f))
- ast_log(LOG_DEBUG, "Unable to text\n");
+ ast_log(LOG_WARNING, "Unable to send text\n");
} else if (single && (f->frametype == AST_FRAME_HTML) && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML))
- ast_channel_sendhtml(in, f->subclass, f->data, f->datalen);
+ if(ast_channel_sendhtml(in, f->subclass, f->data, f->datalen) == -1)
+ ast_log(LOG_WARNING, "Unable to send URL\n");
ast_frfree(f);
} else {
@@ -668,7 +671,7 @@
#endif
if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
/* Got hung up */
- *to=-1;
+ *to = -1;
strcpy(status, "CANCEL");
if (f)
ast_frfree(f);
@@ -679,7 +682,7 @@
if (ast_test_flag(peerflags, OPT_DTMF_EXIT)) {
context = pbx_builtin_getvar_helper(in, "EXITCONTEXT");
if (onedigit_goto(in, context, (char) f->subclass, 1)) {
- if (option_verbose > 3)
+ if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
*result = f->subclass;
@@ -690,8 +693,8 @@
}
if (ast_test_flag(peerflags, OPT_CALLER_HANGUP) &&
- (f->subclass == '*')) { /* hmm it it not guarenteed to be '*' anymore. */
- if (option_verbose > 3)
+ (f->subclass == '*')) { /* hmm it it not guaranteed to be '*' anymore. */
+ if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
strcpy(status, "CANCEL");
@@ -702,7 +705,8 @@
/* Forward HTML stuff */
if (single && f && (f->frametype == AST_FRAME_HTML) && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML))
- ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen);
+ if(ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen) == -1)
+ ast_log(LOG_WARNING, "Unable to send URL\n");
if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF))) {
@@ -711,13 +715,13 @@
}
if (single && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_VIDUPDATE)) {
if (option_verbose > 2)
- ast_verbose ( VERBOSE_PREFIX_3 "%s requested a video update, passing it to %s\n", in->name,outgoing->chan->name);
+ ast_verbose(VERBOSE_PREFIX_3 "%s requested a video update, passing it to %s\n", in->name,outgoing->chan->name);
ast_indicate(outgoing->chan, AST_CONTROL_VIDUPDATE);
}
ast_frfree(f);
}
if (!*to && (option_verbose > 2))
- ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", orig);
+ ast_verbose(VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", orig);
}
return peer;
@@ -806,7 +810,7 @@
if (ast_test_flag(&opts, OPT_DURATION_STOP) && !ast_strlen_zero(opt_args[OPT_ARG_DURATION_STOP])) {
calldurationlimit = atoi(opt_args[OPT_ARG_DURATION_STOP]);
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Setting call duration limit to %d seconds.\n",calldurationlimit);
+ ast_verbose(VERBOSE_PREFIX_3 "Setting call duration limit to %d seconds.\n", calldurationlimit);
}
if (ast_test_flag(&opts, OPT_SENDDTMF) && !ast_strlen_zero(opt_args[OPT_ARG_SENDDTMF])) {
@@ -883,13 +887,13 @@
ast_shrink_phone_number(l);
if( ast_test_flag(&opts, OPT_PRIVACY) ) {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "Privacy DB is '%s', clid is '%s'\n",
+ ast_verbose(VERBOSE_PREFIX_3 "Privacy DB is '%s', clid is '%s'\n",
opt_args[OPT_ARG_PRIVACY], l);
privdb_val = ast_privacy_check(opt_args[OPT_ARG_PRIVACY], l);
}
else {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "Privacy Screening, clid is '%s'\n", l);
+ ast_verbose(VERBOSE_PREFIX_3 "Privacy Screening, clid is '%s'\n", l);
privdb_val = AST_PRIVACY_UNKNOWN;
}
} else {
@@ -902,7 +906,7 @@
*tn2 = '='; /* any other chars to be afraid of? */
}
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "Privacy-- callerid is empty\n");
+ ast_verbose(VERBOSE_PREFIX_3 "Privacy-- callerid is empty\n");
snprintf(callerid, sizeof(callerid), "NOCALLERID_%s%s", chan->exten, tnam);
l = callerid;
@@ -916,35 +920,36 @@
ast_verbose( VERBOSE_PREFIX_3 "CallerID set (%s); N option set; Screening should be off\n", privcid);
privdb_val = AST_PRIVACY_ALLOW;
}
- else if( ast_test_flag(&opts, OPT_SCREEN_NOCLID) && strncmp(privcid,"NOCALLERID",10) == 0 ) {
+ else if(ast_test_flag(&opts, OPT_SCREEN_NOCLID) && strncmp(privcid,"NOCALLERID",10) == 0 ) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "CallerID blank; N option set; Screening should happen; dbval is %d\n", privdb_val);
}
- if( privdb_val == AST_PRIVACY_DENY ) {
- ast_verbose( VERBOSE_PREFIX_3 "Privacy DB reports PRIVACY_DENY for this callerid. Dial reports unavailable\n");
+ if(privdb_val == AST_PRIVACY_DENY ) {
+ if (option_verbose > 2)
+ ast_verbose( VERBOSE_PREFIX_3 "Privacy DB reports PRIVACY_DENY for this callerid. Dial reports unavailable\n");
res=0;
goto out;
}
- else if( privdb_val == AST_PRIVACY_KILL ) {
+ else if(privdb_val == AST_PRIVACY_KILL ) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
res = 0;
goto out; /* Is this right? */
}
- else if( privdb_val == AST_PRIVACY_TORTURE ) {
+ else if(privdb_val == AST_PRIVACY_TORTURE ) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
res = 0;
goto out; /* is this right??? */
}
- else if( privdb_val == AST_PRIVACY_UNKNOWN ) {
+ else if(privdb_val == AST_PRIVACY_UNKNOWN ) {
/* Get the user's intro, store it in priv-callerintros/$CID,
unless it is already there-- this should be done before the
call is actually dialed */
/* make sure the priv-callerintros dir exists? */
- snprintf(privintro,sizeof(privintro),"priv-callerintros/%s", privcid);
+ snprintf(privintro,sizeof(privintro), "priv-callerintros/%s", privcid);
if( ast_fileexists(privintro,NULL,NULL ) > 0 && strncmp(privcid,"NOCALLERID",10) != 0) {
/* the DELUX version of this code would allow this caller the
option to hear and retape their previously recorded intro.
@@ -960,8 +965,8 @@
*/
ast_play_and_record(chan, "priv-recordintro", privintro, 4, "gsm", &duration, 128, 2000, 0); /* NOTE: I've reduced the total time to 4 sec */
- /* don't think we'll need a lock removed, we took care of
- conflicts by naming the privintro file */
+ /* don't think we'll need a lock removed, we took care of
+ conflicts by naming the privintro file */
}
}
}
@@ -1011,7 +1016,7 @@
tmp->chan = ast_request(tech, chan->nativeformats, numsubst, &cause);
if (!tmp->chan) {
/* If we can't, just go on to the next call */
- ast_log(LOG_NOTICE, "Unable to create channel of type '%s' (cause %d - %s)\n", tech, cause, ast_cause2str(cause));
+ ast_log(LOG_WARNING, "Unable to create channel of type '%s' (cause %d - %s)\n", tech, cause, ast_cause2str(cause));
HANDLE_CAUSE(cause, chan);
cur = rest;
if (!cur)
@@ -1202,7 +1207,8 @@
number = numsubst;
pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", number);
if (!ast_strlen_zero(args.url) && ast_channel_supports_html(peer) ) {
- ast_log(LOG_DEBUG, "app_dial: sendurl=%s.\n", args.url);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "app_dial: sendurl=%s.\n", args.url);
ast_channel_sendurl( peer, args.url );
}
if (ast_test_flag(&opts, OPT_PRIVACY) || ast_test_flag(&opts, OPT_SCREENING)) {
@@ -1250,7 +1256,8 @@
if( ast_test_flag(&opts, OPT_SCREENING) )
res2 = ast_play_and_wait(peer,"screen-callee-options");
}
- /* priv-callee-options script:
+ /*! \page DialPrivacy Dial Privacy scripts
+ \par priv-callee-options script:
"Dial 1 if you wish this caller to reach you directly in the future,
and immediately connect to their incoming call
Dial 2 if you wish to send this caller to voicemail now and
@@ -1258,18 +1265,16 @@
Dial 3 to send this callerr to the torture menus, now and forevermore.
Dial 4 to send this caller to a simple "go away" menu, now and forevermore.
Dial 5 to allow this caller to come straight thru to you in the future,
- but right now, just this once, send them to voicemail."
- */
-
- /* screen-callee-options script:
+ but right now, just this once, send them to voicemail."
+ \par screen-callee-options script:
"Dial 1 if you wish to immediately connect to the incoming call
Dial 2 if you wish to send this caller to voicemail.
Dial 3 to send this callerr to the torture menus.
Dial 4 to send this caller to a simple "go away" menu.
*/
- if( !res2 || res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2 > '5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) {
+ if(!res2 || res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2 > '5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) {
/* invalid option */
- res2 = ast_play_and_wait(peer,"vm-sorry");
+ res2 = ast_play_and_wait(peer, "vm-sorry");
}
loopcount++; /* give the callee a couple chances to make a choice */
} while( (!res2 || res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2 > '5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4')) && loopcount < 2 );
@@ -1279,7 +1284,7 @@
case '1':
if( ast_test_flag(&opts, OPT_PRIVACY) ) {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to ALLOW\n",
+ ast_verbose(VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to ALLOW\n",
opt_args[OPT_ARG_PRIVACY], privcid);
ast_privacy_set(opt_args[OPT_ARG_PRIVACY], privcid, AST_PRIVACY_ALLOW);
}
@@ -1287,7 +1292,7 @@
case '2':
if( ast_test_flag(&opts, OPT_PRIVACY) ) {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to DENY\n",
+ ast_verbose(VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to DENY\n",
opt_args[OPT_ARG_PRIVACY], privcid);
ast_privacy_set(opt_args[OPT_ARG_PRIVACY], privcid, AST_PRIVACY_DENY);
}
@@ -1304,7 +1309,7 @@
case '3':
if( ast_test_flag(&opts, OPT_PRIVACY) ) {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to TORTURE\n",
+ ast_verbose(VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to TORTURE\n",
opt_args[OPT_ARG_PRIVACY], privcid);
ast_privacy_set(opt_args[OPT_ARG_PRIVACY], privcid, AST_PRIVACY_TORTURE);
}
@@ -1323,7 +1328,7 @@
case '4':
if( ast_test_flag(&opts, OPT_PRIVACY) ) {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to KILL\n",
+ ast_verbose(VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to KILL\n",
opt_args[OPT_ARG_PRIVACY], privcid);
ast_privacy_set(opt_args[OPT_ARG_PRIVACY], privcid, AST_PRIVACY_KILL);
}
@@ -1342,7 +1347,7 @@
case '5':
if( ast_test_flag(&opts, OPT_PRIVACY) ) {
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to ALLOW\n",
+ ast_verbose(VERBOSE_PREFIX_3 "--Set privacy database entry %s/%s to ALLOW\n",
opt_args[OPT_ARG_PRIVACY], privcid);
ast_privacy_set(opt_args[OPT_ARG_PRIVACY], privcid, AST_PRIVACY_ALLOW);
if (ast_test_flag(&opts, OPT_MUSICBACK)) {
@@ -1361,8 +1366,7 @@
/* well, there seems basically two choices. Just patch the caller thru immediately,
or,... put 'em thru to voicemail. */
/* since the callee may have hung up, let's do the voicemail thing, no database decision */
- if (option_verbose > 2)
- ast_log(LOG_NOTICE,"privacy: no valid response from the callee. Sending the caller to voicemail, the callee isn't responding\n");
+ ast_log(LOG_NOTICE, "privacy: no valid response from the callee. Sending the caller to voicemail, the callee isn't responding\n");
if (ast_test_flag(&opts, OPT_MUSICBACK)) {
ast_moh_stop(chan);
} else if (ast_test_flag(&opts, OPT_RINGBACK)) {
@@ -1385,10 +1389,10 @@
just clog things up, and it's not useful information, not being tied to a CID */
if( strncmp(privcid,"NOCALLERID",10) == 0 || ast_test_flag(&opts, OPT_SCREEN_NOINTRO) ) {
ast_filedelete(privintro, NULL);
- if( ast_fileexists(privintro,NULL,NULL ) > 0 )
- ast_log(LOG_NOTICE,"privacy: ast_filedelete didn't do its job on %s\n", privintro);
+ if( ast_fileexists(privintro, NULL, NULL ) > 0 )
+ ast_log(LOG_NOTICE, "privacy: ast_filedelete didn't do its job on %s\n", privintro);
else if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
+ ast_verbose(VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
}
}
}
@@ -1483,12 +1487,12 @@
} else if (!strcasecmp(macro_result, "ABORT")) {
/* Hangup both ends unless the caller has the g flag */
res = -1;
- } else if (!strncasecmp(macro_result, "GOTO:",5) && (macro_transfer_dest = ast_strdupa(macro_result + 5))) {
+ } else if (!strncasecmp(macro_result, "GOTO:", 5) && (macro_transfer_dest = ast_strdupa(macro_result + 5))) {
res = -1;
/* perform a transfer to a new extension */
- if (strchr(macro_transfer_dest,'^')) { /* context^exten^priority*/
+ if (strchr(macro_transfer_dest, '^')) { /* context^exten^priority*/
/* no brainer mode... substitute ^ with | and feed it to builtin goto */
- for (res=0;res<strlen(macro_transfer_dest);res++)
+ for (res = 0; res < strlen(macro_transfer_dest); res++)
if (macro_transfer_dest[res] == '^')
macro_transfer_dest[res] = '|';
@@ -1510,12 +1514,12 @@
}
if (!ast_strlen_zero(dtmfcalled)) {
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Sending DTMF '%s' to the called party.\n",dtmfcalled);
+ ast_verbose(VERBOSE_PREFIX_3 "Sending DTMF '%s' to the called party.\n", dtmfcalled);
res = ast_dtmf_stream(peer,chan,dtmfcalled,250);
}
if (!ast_strlen_zero(dtmfcalling)) {
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Sending DTMF '%s' to the calling party.\n",dtmfcalling);
+ ast_verbose(VERBOSE_PREFIX_3 "Sending DTMF '%s' to the calling party.\n", dtmfcalling);
res = ast_dtmf_stream(chan,peer,dtmfcalling,250);
}
}
@@ -1590,10 +1594,11 @@
}
hanguptree(outgoing, NULL);
pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
- ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status);
if ((ast_test_flag(peerflags, OPT_GO_ON)) && (!chan->_softhangup) && (res != AST_PBX_KEEPALIVE))
- res=0;
+ res = 0;
LOCAL_USER_REMOVE(u);
Modified: team/oej/multiparking/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/apps/app_festival.c?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- team/oej/multiparking/apps/app_festival.c (original)
+++ team/oej/multiparking/apps/app_festival.c Wed Jan 18 13:17:40 2006
@@ -183,7 +183,8 @@
if (chan->_state != AST_STATE_UP)
ast_answer(chan);
ast_stopstream(chan);
-
+ ast_indicate(chan, -1);
+
owriteformat = chan->writeformat;
res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
Modified: team/oej/multiparking/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/apps/app_queue.c?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- team/oej/multiparking/apps/app_queue.c (original)
+++ team/oej/multiparking/apps/app_queue.c Wed Jan 18 13:17:40 2006
@@ -114,6 +114,7 @@
#define DEFAULT_RETRY 5
#define DEFAULT_TIMEOUT 15
#define RECHECK 1 /* Recheck every second to see we we're at the top yet */
+#define MAX_PERIODIC_ANNOUNCEMENTS 10 /* The maximum periodic announcements we can have */
#define RES_OKAY 0 /* Action completed */
#define RES_EXISTS (-1) /* Entry already exists */
@@ -283,6 +284,7 @@
int prio; /*!< Our priority */
int last_pos_said; /*!< Last position we told the user */
time_t last_periodic_announce_time; /*!< The last time we played a periodic announcement */
+ int last_periodic_announce_sound; /* The last periodic announcement we made */
time_t last_pos; /*!< Last time we told the user their position */
int opos; /*!< Where we started in the queue */
int handled; /*!< Whether our call was handled */
@@ -347,7 +349,7 @@
char sound_seconds[80]; /*!< Sound file: "seconds." (def. queue-seconds) */
char sound_thanks[80]; /*!< Sound file: "Thank you for your patience." (def. queue-thankyou) */
char sound_reporthold[80]; /*!< Sound file: "Hold time" (def. queue-reporthold) */
- char sound_periodicannounce[80];/*!< Sound file: Custom announce, no default */
+ char sound_periodicannounce[MAX_PERIODIC_ANNOUNCEMENTS][80];/* Sound files: Custom announce, no default */
int count; /*!< How many entries */
int maxlen; /*!< Max number of entries */
@@ -563,6 +565,7 @@
static void init_queue(struct ast_call_queue *q)
{
+ int i;
q->dead = 0;
q->retry = DEFAULT_RETRY;
q->timeout = -1;
@@ -585,7 +588,10 @@
ast_copy_string(q->sound_thanks, "queue-thankyou", sizeof(q->sound_thanks));
ast_copy_string(q->sound_lessthan, "queue-less-than", sizeof(q->sound_lessthan));
ast_copy_string(q->sound_reporthold, "queue-reporthold", sizeof(q->sound_reporthold));
- ast_copy_string(q->sound_periodicannounce, "queue-periodic-announce", sizeof(q->sound_periodicannounce));
+ ast_copy_string(q->sound_periodicannounce[0], "queue-periodic-announce", sizeof(q->sound_periodicannounce[0]));
+ for (i=1;i<MAX_PERIODIC_ANNOUNCEMENTS;i++) {
+ q->sound_periodicannounce[i][0]='\0';
+ }
}
static void clear_queue(struct ast_call_queue *q)
@@ -606,6 +612,9 @@
extra fields in the tables. */
static void queue_set_param(struct ast_call_queue *q, const char *param, const char *val, int linenum, int failunknown)
{
+ int i = 0;
+ char *c, *lastc;
+ char buff[80];
if (!strcasecmp(param, "music") || !strcasecmp(param, "musiconhold")) {
ast_copy_string(q->moh, val, sizeof(q->moh));
} else if (!strcasecmp(param, "announce")) {
@@ -660,8 +669,24 @@
q->announceholdtime = ANNOUNCEHOLDTIME_ALWAYS;
else
q->announceholdtime = 0;
- } else if (!strcasecmp(param, "periodic-announce")) {
- ast_copy_string(q->sound_periodicannounce, val, sizeof(q->sound_periodicannounce));
+ } else if (!strcasecmp(param, "periodic-announce")) {
+ if (strchr(val,'|')) {
+ lastc = (char *)val;
+ while ((c = strchr(lastc,'|'))) {
+ if (i > MAX_PERIODIC_ANNOUNCEMENTS)
+ break;
+ strncpy(buff, lastc, abs(lastc - c));
+ buff[abs(lastc - c)] = '\0';
+ ast_copy_string(q->sound_periodicannounce[i], buff, sizeof(q->sound_periodicannounce[i]));
+ lastc = (c + 1);
+ i++;
+ }
+ if (strlen(lastc)) {
+ ast_copy_string(q->sound_periodicannounce[i], lastc, sizeof(q->sound_periodicannounce[i]));
+ }
+ } else {
+ ast_copy_string(q->sound_periodicannounce[i], val, sizeof(q->sound_periodicannounce[i]));
+ }
} else if (!strcasecmp(param, "periodic-announce-frequency")) {
q->periodicannouncefrequency = atoi(val);
} else if (!strcasecmp(param, "retry")) {
@@ -1570,8 +1595,13 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Playing periodic announcement\n");
+ /* Check to make sure we have a sound file. If not, reset to the first sound file */
+ if (qe->last_periodic_announce_sound >= MAX_PERIODIC_ANNOUNCEMENTS || !strlen(qe->parent->sound_periodicannounce[qe->last_periodic_announce_sound])) {
+ qe->last_periodic_announce_sound = 0;
+ }
+
/* play the announcement */
- res = background_file(qe, qe->chan, qe->parent->sound_periodicannounce);
+ res = background_file(qe, qe->chan, qe->parent->sound_periodicannounce[qe->last_periodic_announce_sound]);
/* Resume Music on Hold */
ast_moh_start(qe->chan, qe->moh);
@@ -1579,6 +1609,9 @@
/* update last_periodic_announce_time */
qe->last_periodic_announce_time = now;
+ /* Update the current periodic announcement to the next announcement */
+ qe->last_periodic_announce_sound++;
+
return res;
}
@@ -2947,6 +2980,7 @@
qe.last_pos_said = 0;
qe.last_pos = 0;
qe.last_periodic_announce_time = time(NULL);
+ qe.last_periodic_announce_sound = 0;
if (!join_queue(queuename, &qe, &reason)) {
ast_queue_log(queuename, chan->uniqueid, "NONE", "ENTERQUEUE", "%s|%s", url ? url : "",
chan->cid.cid_num ? chan->cid.cid_num : "");
Modified: team/oej/multiparking/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/asterisk.c?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- team/oej/multiparking/asterisk.c (original)
+++ team/oej/multiparking/asterisk.c Wed Jan 18 13:17:40 2006
@@ -130,7 +130,7 @@
/*! \brief Welcome message when starting a CLI interface */
#define WELCOME_MESSAGE \
- ast_verbose("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2005 Digium, Inc. and others.\n"); \
+ ast_verbose("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2006 Digium, Inc. and others.\n"); \
ast_verbose("Created by Mark Spencer <markster at digium.com>\n"); \
ast_verbose("Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details.\n"); \
ast_verbose("This is free software, with components licensed under the GNU General Public\n"); \
Modified: team/oej/multiparking/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channel.c?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- team/oej/multiparking/channel.c (original)
+++ team/oej/multiparking/channel.c Wed Jan 18 13:17:40 2006
@@ -3460,8 +3460,6 @@
!nativefailed && !c0->monitor && !c1->monitor &&
!c0->spies && !c1->spies) {
/* Looks like they share a bridge method and nothing else is in the way */
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Attempting native bridge of %s and %s\n", c0->name, c1->name);
ast_set_flag(c0, AST_FLAG_NBRIDGE);
ast_set_flag(c1, AST_FLAG_NBRIDGE);
if ((res = c0->tech->bridge(c0, c1, config->flags, fo, rc, to)) == AST_BRIDGE_COMPLETE) {
@@ -3493,7 +3491,9 @@
case AST_BRIDGE_RETRY:
continue;
default:
- ast_log(LOG_WARNING, "Private bridge between %s and %s failed\n", c0->name, c1->name);
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Native bridging %s and %s ended\n",
+ c0->name, c1->name);
/* fallthrough */
case AST_BRIDGE_FAILED_NOWARN:
nativefailed++;
Modified: team/oej/multiparking/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channels/chan_local.c?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- team/oej/multiparking/channels/chan_local.c (original)
+++ team/oej/multiparking/channels/chan_local.c Wed Jan 18 13:17:40 2006
@@ -390,7 +390,7 @@
struct local_pvt *cur, *prev=NULL;
struct ast_channel *ochan = NULL;
int glaredetect;
- char *status;
+ const char *status;
ast_mutex_lock(&p->lock);
isoutbound = IS_OUTBOUND(ast, p);
Modified: team/oej/multiparking/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channels/chan_misdn.c?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- team/oej/multiparking/channels/chan_misdn.c (original)
+++ team/oej/multiparking/channels/chan_misdn.c Wed Jan 18 13:17:40 2006
@@ -2023,6 +2023,9 @@
misdn_lib_bridge(ch1->bc,ch2->bc);
}
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Native bridging %s and %s\n", c0->name, c1->name);
+
chan_misdn_log(1, ch1->bc->port, "* Makeing Native Bridge between %s and %s\n", ch1->bc->oad, ch2->bc->oad);
while(1) {
Modified: team/oej/multiparking/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channels/chan_sip.c?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- team/oej/multiparking/channels/chan_sip.c (original)
+++ team/oej/multiparking/channels/chan_sip.c Wed Jan 18 13:17:40 2006
@@ -12786,27 +12786,6 @@
static char *descrip_dtmfmode = "SIPDtmfMode(inband|info|rfc2833): Changes the dtmfmode for a SIP call\n";
static char *app_dtmfmode = "SIPDtmfMode";
-static char *app_sipaddheader = "SIPAddHeader";
-static char *synopsis_sipaddheader = "Add a SIP header to the outbound call";
-
-
-static char *descrip_sipaddheader = ""
-" SIPAddHeader(Header: Content)\n"
-"Adds a header to a SIP call placed with DIAL.\n"
-"Remember to user the X-header if you are adding non-standard SIP\n"
-"headers, like \"X-Asterisk-Accountcode:\". Use this with care.\n"
-"Adding the wrong headers may jeopardize the SIP dialog.\n"
-"Always returns 0\n";
-
-static char *app_sipgetheader = "SIPGetHeader";
-static char *synopsis_sipgetheader = "Get a SIP header from an incoming call";
-
-static char *descrip_sipgetheader = ""
-" SIPGetHeader(var=headername): \n"
-"Sets a channel variable to the content of a SIP header\n"
-"Skips to priority+101 if header does not exist\n"
-"Otherwise returns 0\n";
-
/*! \brief sip_dtmfmode: change the DTMFmode for a SIP call (application) ---*/
static int sip_dtmfmode(struct ast_channel *chan, void *data)
{
@@ -12853,90 +12832,6 @@
}
}
ast_mutex_unlock(&p->lock);
- ast_mutex_unlock(&chan->lock);
- return 0;
-}
-
-/*! \brief sip_addheader: Add a SIP header ---*/
-static int sip_addheader(struct ast_channel *chan, void *data)
-{
- int arglen;
- int no = 0;
- int ok = 0;
- const char *content = (char *) NULL;
- char varbuf[128];
-
- arglen = strlen(data);
- if (!arglen) {
- ast_log(LOG_WARNING, "This application requires the argument: Header\n");
- return 0;
- }
- ast_mutex_lock(&chan->lock);
-
- /* Check for headers */
- while (!ok && no <= 50) {
- no++;
[... 1014 lines stripped ...]
More information about the asterisk-commits
mailing list