Summary: | ASTERISK-13608: QUEUE_VARIABLES function doesn't work as it should | ||
Reporter: | Jared Smith (jsmith) | Labels: | |
Date Opened: | 2009-02-19 09:19:58.000-0600 | Date Closed: | 2011-06-07 14:07:25 |
Priority: | Minor | Regression? | Yes |
Status: | Closed/Complete | Components: | Applications/app_queue |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | The QUEUE_VARIABLES function doesn't seem to be setting the channel variables as it says it does. ****** STEPS TO REPRODUCE ****** Add the following extension to your dialplan, and dial it. exten => 333,1,Answer() exten => 333,n,Playback(beep) exten => 333,n,Set(foo=${QUEUE_VARIABLES(support)}) exten => 333,n,Verbose(1,Foo is ${foo}) exten => 333,n,DumpChan() ****** ADDITIONAL INFORMATION ****** Here's the output of my run of the dialplan shown above, proving that the channel variables aren't getting set correctly. frankenbox*CLI> queue show support support has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime), W:0, C:0, A:0, SL:0.0% within 0s Members: SIP/linksys (Not in use) has taken no calls yet No Callers == Using SIP RTP CoS mark 5 -- Executing [333@outbound:1] Answer("SIP/linksys-0222aa20", "") in new stack -- Executing [333@outbound:2] Playback("SIP/linksys-0222aa20", "beep") in new stack -- <SIP/linksys-0222aa20> Playing 'beep.gsm' (language 'en') -- Executing [333@outbound:3] Set("SIP/linksys-0222aa20", "foo=-1") in new stack -- Executing [333@outbound:4] Verbose("SIP/linksys-0222aa20", "1,Foo is -1") in new stack Foo is -1*CLI> -- Executing [333@outbound:5] DumpChan("SIP/linksys-0222aa20", "") in new stack frankenbox*CLI> Dumping Info For Channel: SIP/linksys-0222aa20: ================================================================================ Info: Name= SIP/linksys-0222aa20 Type= SIP UniqueID= 1235056181.1 CallerIDNum= linksys CallerIDName= Linksys DNIDDigits= 333 RDNIS= (N/A) Language= en State= Up (6) Rings= 0 NativeFormat= 0x4 (ulaw) WriteFormat= 0x4 (ulaw) ReadFormat= 0x4 (ulaw) RawWriteFormat= 0x4 (ulaw) RawReadFormat= 0x4 (ulaw) 1stFileDescriptor= 14 Framesin= 22 Framesout= 22 TimetoHangup= 0 ElapsedTime= 0h0m0s Context= outbound Extension= 333 Priority= 5 CallGroup= PickupGroup= Application= DumpChan Data= (Empty) Blocking_in= (Not Blocking) Variables: foo=-1 PLAYBACKSTATUS=SUCCESS DYNAMIC_FEATURES=automon SIPCALLID=1301175d-f4755854@192.168.0.105 SIPDOMAIN=192.168.0.99 SIPURI=sip:linksys@192.168.0.105:5061 ================================================================================ -- Auto fallthrough, channel 'SIP/linksys-0222aa20' status is 'UNKNOWN' | ||
Comments: | By: Jared Smith (jsmith) 2009-02-19 09:23:18.000-0600 Just in case someone asks... I filed the bug against Applications/app_queue as the function is defined in apps/app_queue.c. See the queue_function_var function in app_queue.c for the implementation of this dialplan function. By: Tilghman Lesher (tilghman) 2009-02-20 17:45:33.000-0600 I suspect you don't have 'setqueuevar' set to a true value in queues.conf. By: pkempgen (pkempgen) 2009-02-21 03:12:26.000-0600 In my test Set(err=${QUEUE_VARIABLES(techsupport)}) works as documented if setqueuevar is set on the queue. ---cut--- Variables: err=0 QUEUESRVLEVELPERF=0.0 QUEUESRVLEVEL=0 QUEUEABANDONED=0 QUEUECOMPLETED=0 QUEUEHOLDTIME=0 QUEUECALLS=0 QUEUESTRATEGY=random QUEUEMAX=0 ---cut--- I should have worded my question (http://lists.digium.com/pipermail/asterisk-users/2009-February/227122.html) more clearly. The question was more like "Does the function return anything useful (in the dialplan)? How can I call a function and ignore the result?" I was mislead because whenever an _application_ returns -1 that doesn't mean it returns that in the dialplan but in the C source code and thus aborts the call. The funktion QUEUE_VARIABLES() however actually returns 0 resp. -1 in the dialplan. => close By: pkempgen (pkempgen) 2009-02-21 03:13:48.000-0600 > => close if it works for Jared that is. |