rendered paste body--- app_dial.c.orig 2004-09-05 00:01:20.000000000 -0400
+++ app_dial.c 2004-09-05 00:45:51.000000000 -0400
@@ -73,6 +73,7 @@
" 'P[(x)]' -- privacy mode, using 'x' as database if provided.\n"
" 'g' -- goes on in context if the destination channel hangs up\n"
" 'A(x)' -- play an announcement to the called party, using x as file\n"
+" 'R' -- wait for # being press before making the call throught\n"
" 'S(x)' -- hangup the call after x seconds AFTER called party picked up\n"
" 'D([digits])' -- Send DTMF digit string *after* called party has answered\n"
" but before the bridge. (w=500ms sec pause)\n"
@@ -413,6 +414,7 @@
char info[256], *peers, *timeout, *tech, *number, *rest, *cur;
char privdb[256] = "", *s;
char announcemsg[256] = "", *ann;
+ int inputkey;
struct localuser *outgoing=NULL, *tmp;
struct ast_channel *peer;
int to;
@@ -423,6 +425,7 @@
int privacy=0;
int announce=0;
int resetcdr=0;
+ int waitpound=0;
char numsubst[AST_MAX_EXTENSION];
char restofit[AST_MAX_EXTENSION];
char *transfer = NULL;
@@ -591,7 +594,12 @@
ast_verbose(VERBOSE_PREFIX_3"end_sound=%s\n",end_sound ? end_sound : "UNDEF");
}
}
-
+
+ /* XXX # REQUEST ANNOUNCE SUPPORT */
+ if (strchr(transfer, 'R')) {
+ waitpound = 1;
+ }
+
/* XXX ANNOUNCE SUPPORT */
if ((ann = strstr(transfer, "A("))) {
announce = 1;
@@ -906,7 +914,15 @@
} else
res = 0;
-
+ if (waitpound) {
+ ast_indicate(chan, AST_CONTROL_RINGING);
+ inputkey = ast_waitfordigit(peer, 6000);
+ if (inputkey != '#') {
+ strncpy(status, "NOANSWER", sizeof(status) - 1);
+ ast_hangup(peer);
+ return 0;
+ }
+ }
if (!res) {
if (calldurationlimit > 0) {
time(&now);