]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 188032 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Mon, 13 Apr 2009 14:20:30 +0000 (14:20 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 13 Apr 2009 14:20:30 +0000 (14:20 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r188032 | mmichelson | 2009-04-13 09:17:56 -0500 (Mon, 13 Apr 2009) | 6 lines

  Set all queue variables on both the caller and member channels.

  This allows for the variables to be accessed if a member macro is run.
  Thanks to Grigoriy Puzankin for bringing this up on the -dev list.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@188038 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index ac5db6ea75cc224ed5cd82f4e221447e08363e88..c9a7271b4a90a5fda87ade83864861b055315b82 100644 (file)
@@ -3690,6 +3690,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
                        snprintf(interfacevar, sizeof(interfacevar), "MEMBERINTERFACE=%s,MEMBERNAME=%s,MEMBERCALLS=%d,MEMBERLASTCALL=%ld,MEMBERPENALTY=%d,MEMBERDYNAMIC=%d,MEMBERREALTIME=%d",
                                member->interface, member->membername, member->calls, (long)member->lastcall, member->penalty, member->dynamic, member->realtime);
                        pbx_builtin_setvar_multiple(qe->chan, interfacevar);
+                       pbx_builtin_setvar_multiple(peer, interfacevar);
                }
                
                /* if setqueueentryvar is defined, make queue entry (i.e. the caller) variables available to the channel */
@@ -3698,10 +3699,12 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
                        snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%ld,QEORIGINALPOS=%d",
                                (long) time(NULL) - qe->start, qe->opos);
                        pbx_builtin_setvar_multiple(qe->chan, interfacevar);
+                       pbx_builtin_setvar_multiple(peer, interfacevar);
                }
        
                /* try to set queue variables if configured to do so*/
                set_queue_variables(qe->parent, qe->chan);
+               set_queue_variables(qe->parent, peer);
                ao2_unlock(qe->parent);
                
                ast_channel_lock(qe->chan);