aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-28 16:42:15 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-28 16:42:15 +0000
commita5c52defec739c228fbc6e9c9bbfd79bbf57c04e (patch)
tree6848629faf46be9e7afce4da11c82a1b5eec533f
parent504acd4800ee38c7938f8468d276b68b095aa3a2 (diff)
Allow "g" option in dial to go to next extension (bug #189)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1445 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xapps/Makefile2
-rwxr-xr-xapps/app_dial.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/Makefile b/apps/Makefile
index dd63ffbdd..cf728cfb4 100755
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -65,7 +65,7 @@ app_todd.so: app_todd.o
$(CC) -shared -Xlinker -x -o $@ $< -L/usr/local/ssl/lib -lssl -lcrypto
app_voicemail2.so : app_voicemail2.o
- $(CC) -shared -Xlinker -x -o $@ $(MLMFLAGS) $<
+ $(CC) -shared -Xlinker -x -o $@ $(MLFLAGS) $<
app_sql_postgres.o: app_sql_postgres.c
$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 10cabee03..f1a566fec 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -67,6 +67,7 @@ static char *descrip =
" 'H' -- allow caller to hang up by hitting *.\n"
" 'C' -- reset call detail record for this call.\n"
" 'P[(x)]' -- privacy mode, using 'x' as database if provided.\n"
+" 'g' -- goes on in context if the destination channel hangs up\n"
" In addition to transferring the call, a call may be parked and then picked\n"
"up by another user.\n"
" The optionnal URL will be sent to the called party if the channel supports\n"
@@ -351,6 +352,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
struct ast_var_t *current;
struct varshead *headp, *newheadp;
struct ast_var_t *newvar;
+ int go_on=0;
if (!data) {
ast_log(LOG_WARNING, "Dial requires an argument (technology1/number1&technology2/number2...|optional timeout)\n");
@@ -479,6 +481,8 @@ static int dial_exec(struct ast_channel *chan, void *data)
clearchannel = 1;
else
clearchannel = 0;
+ if(strchr(transfer, 'g'))
+ go_on=1;
}
strncpy(numsubst, number, sizeof(numsubst)-1);
/* If we're dialing by extension, look at the extension to know what to dial */
@@ -671,6 +675,10 @@ static int dial_exec(struct ast_channel *chan, void *data)
out:
hanguptree(outgoing, NULL);
LOCAL_USER_REMOVE(u);
+
+ if((go_on>0) && (!chan->_softhangup))
+ res=0;
+
return res;
}