aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-04 04:01:40 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-04 04:01:40 +0000
commite6f35a87bcdec06f2380b0804fd4c472977aed9c (patch)
tree29d4df585c7a16fb387fa5eb4daf553cdf195852 /apps
parentd481e222f25146b8cbd76c99bdf13c4b9a041d35 (diff)
Make features configurable and easier to implement
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4650 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_dial.c18
-rwxr-xr-xapps/app_queue.c12
2 files changed, 20 insertions, 10 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index d1d76bcff..0226995d2 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1135,12 +1135,18 @@ static int dial_exec(struct ast_channel *chan, void *data)
if (!res) {
memset(&config,0,sizeof(struct ast_bridge_config));
- config.play_to_caller=play_to_caller;
- config.play_to_callee=play_to_callee;
- config.allowredirect_in = allowredir_in;
- config.allowredirect_out = allowredir_out;
- config.allowdisconnect_in = allowdisconnect_in;
- config.allowdisconnect_out = allowdisconnect_out;
+ if (play_to_caller)
+ config.features_caller |= AST_FEATURE_PLAY_WARNING;
+ if (play_to_callee)
+ config.features_callee |= AST_FEATURE_PLAY_WARNING;
+ if (allowredir_in)
+ config.features_callee |= AST_FEATURE_REDIRECT;
+ if (allowredir_out)
+ config.features_caller |= AST_FEATURE_REDIRECT;
+ if (allowdisconnect_in)
+ config.features_callee |= AST_FEATURE_DISCONNECT;
+ if (allowdisconnect_out)
+ config.features_caller |= AST_FEATURE_DISCONNECT;
config.timelimit = timelimit;
config.play_warning = play_warning;
config.warning_freq = warning_freq;
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 476eceb60..38a550fc8 100755
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1480,10 +1480,14 @@ static int try_calling(struct queue_ent *qe, char *options, char *announceoverri
time(&callstart);
memset(&config,0,sizeof(struct ast_bridge_config));
- config.allowredirect_in = ast_test_flag(&flags, QUEUE_FLAG_REDIR_IN);
- config.allowredirect_out = ast_test_flag(&flags, QUEUE_FLAG_REDIR_OUT);
- config.allowdisconnect_in = ast_test_flag(&flags, QUEUE_FLAG_DISCON_IN);
- config.allowdisconnect_out = ast_test_flag(&flags, QUEUE_FLAG_DISCON_OUT);
+ if (ast_test_flag(&flags, QUEUE_FLAG_REDIR_IN))
+ config.features_callee |= AST_FEATURE_REDIRECT;
+ if (ast_test_flag(&flags, QUEUE_FLAG_REDIR_OUT))
+ config.features_caller |= AST_FEATURE_REDIRECT;
+ if (ast_test_flag(&flags, QUEUE_FLAG_DISCON_IN))
+ config.features_callee |= AST_FEATURE_DISCONNECT;
+ if (ast_test_flag(&flags, QUEUE_FLAG_DISCON_OUT))
+ config.features_caller |= AST_FEATURE_DISCONNECT;
bridge = ast_bridge_call(qe->chan,peer,&config);
if (strcasecmp(oldcontext, qe->chan->context) || strcasecmp(oldexten, qe->chan->exten)) {