summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2008-10-31 18:55:33 +0000
committerTerry Wilson <twilson@digium.com>2008-10-31 18:55:33 +0000
commit5fe37e47c6a0f9a256e9e5668d2fd0f94d5c7504 (patch)
tree88c419c36f1dbffe6e003489a19683b9008f3f12 /apps/app_queue.c
parent46abb39ca242746bfbceb1ee315cb68fa3e84243 (diff)
Recent CDR fixes moved execution of the 'h' exten into the bridging code, so variables that were set after ast_bridge_call was called would not show up in the 'h' exten. Added a callback function to handle setting variables, etc. from w/in the bridging code. Calls back into a nested function within the function calling ast_bridge_call
(closes issue #13793) Reported by: greenfieldtech git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 707bdc23d..5733d0bc4 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3159,6 +3159,13 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
int callcompletedinsl;
struct ao2_iterator memi;
struct ast_datastore *datastore;
+ auto void end_bridge_callback(void);
+ void end_bridge_callback(void)
+ {
+ ao2_lock(qe->parent);
+ set_queue_variables(qe);
+ ao2_unlock(qe->parent);
+ }
ast_channel_lock(qe->chan);
datastore = ast_channel_datastore_find(qe->chan, &dialed_interface_info, NULL);
@@ -3229,6 +3236,8 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
}
+ bridge_config.end_bridge_callback = end_bridge_callback;
+
/* Hold the lock while we setup the outgoing calls */
if (use_weight)
ao2_lock(queues);