aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-11 23:47:23 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-11 23:47:23 +0000
commit54034751542eb884cb134a826244eca9680765ea (patch)
treebe1898af8b75b8f1bfe8692a851dcede310ecaa8 /res
parent02e87fc6524c2df91cfa8662689f3b33985e3eae (diff)
Backport fix for 11520--for some reason I didn't do this back in February when I patched for trunk.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@121992 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_features.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 9c7fef79f..32f01ee2f 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -62,6 +62,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/adsi.h"
#include "asterisk/devicestate.h"
#include "asterisk/monitor.h"
+#include "asterisk/global_datastores.h"
#define DEFAULT_PARK_TIME 45000
#define DEFAULT_TRANSFER_DIGIT_TIMEOUT 3000
@@ -1711,7 +1712,21 @@ static void *do_parking_thread(void *ignore)
}
if (con) {
char returnexten[AST_MAX_EXTENSION];
- snprintf(returnexten, sizeof(returnexten), "%s|30|t", peername);
+ struct ast_datastore *features_datastore;
+ struct ast_dial_features *dialfeatures = NULL;
+
+ ast_channel_lock(chan);
+
+ if ((features_datastore = ast_channel_datastore_find(chan, &dial_features_info, NULL)))
+ dialfeatures = features_datastore->data;
+
+ ast_channel_unlock(chan);
+
+ if (dialfeatures)
+ snprintf(returnexten, sizeof(returnexten), "%s|30|%s", peername, dialfeatures->options);
+ else /* Existing default */
+ snprintf(returnexten, sizeof(returnexten), "%s|30|t", peername);
+
ast_add_extension2(con, 1, peername, 1, NULL, NULL, "Dial", strdup(returnexten), ast_free, registrar);
}
set_c_e_p(chan, parking_con_dial, peername, 1);