Backport fix for 11520--for some reason I didn't do this back in February when I patched for trunk.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@121992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson
2008-06-11 23:47:23 +00:00
parent 1c7d9e4c9a
commit c340004d76
6 changed files with 146 additions and 7 deletions

View File

@@ -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);