Summary: | ASTERISK-12037: Setting same variable in call file multiple times only uses the value in first "Set" line | ||
Reporter: | phber (phber) | Labels: | |
Date Opened: | 2008-05-17 07:53:11 | Date Closed: | 2008-06-18 15:18:15 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/PBX |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20080519__bug12673.diff.txt | |
Description: | Using multiple "Set" line to set the same variable in a call file only passes the value in the first "Set" line, and ignore the values in the latter "Set" lines. ****** ADDITIONAL INFORMATION ****** Dialplan -------------- [local1] exten => _X!,1,NoCDR() exten => _X!,n,NoOp(${txnId}) exten => _X!,n,Answer() [local2] exten => _X!,1,NoCDR() exten => _X!,n,NoOp(${txnId}) exten => _X!,n,Hangup Call File ------------- Channel: Local/10@local1/n WaitTime: 60 RetryTime: 5 MaxRetries: 1 Context: local2 Extension: 20 Set: txnId=99 Set: txnId=88 Priority: 1 Console Output ------------------ -- Attempting call on Local/10@local1/n for 20@local2:1 (Retry 1) -- Executing [10@local1:1] NoCDR("Local/10@local1-3b89,2", "") in new stack -- Executing [10@local1:2] NoOp("Local/10@local1-3b89,2", "99") in new stack -- Executing [10@local1:3] Answer("Local/10@local1-3b89,2", "") in new stack == Auto fallthrough, channel 'Local/10@local1-3b89,2' status is 'UNKNOWN' > Channel Local/10@local1-3b89,1 was answered. -- Executing [20@local2:1] NoCDR("Local/10@local1-3b89,1", "") in new stack -- Executing [20@local2:2] NoOp("Local/10@local1-3b89,1", "99") in new stack -- Executing [20@local2:3] Hangup("Local/10@local1-3b89,1", "") in new stack == Spawn extension (local2, 20, 3) exited non-zero on 'Local/10@local1-3b89,1' [May 17 20:58:37] NOTICE[11684]: pbx_spool.c:351 attempt_thread: Call completed to Local/10@local1/n | ||
Comments: | By: phber (phber) 2008-05-17 08:06:17 Sorry, I believe Category should be "PBX/pbx_spool" instead. By: Tilghman Lesher (tilghman) 2008-05-17 08:16:41 Could you explain why you think setting multiple variables with the same value should result in any behavior other than what happens now? The spool file is NOT a script. By: phber (phber) 2008-05-17 10:28:30 I would guess the spool file could be more consistent since if I do the following: Channel: Local/10@local1/n WaitTime: 60 RetryTime: 5 MaxRetries: 1 Context: local2 Extension: 20 Extension: 50 Priority: 1 The last specified extension is the actual one that will be used. Channel: Local/10@local1/n Channel: Local/50@local1/n WaitTime: 60 RetryTime: 5 MaxRetries: 1 Context: local2 Extension: 20 Priority: 1 The last channel specified is the one that is actually used. By: Tilghman Lesher (tilghman) 2008-05-19 11:05:48 Patch uploaded. Testing required. By: Tilghman Lesher (tilghman) 2008-05-29 09:09:41 phber: I need some feedback here. By: Michiel van Baak (mvanbaak) 2008-06-15 04:06:45 Any luck with this patch ? Please report back here so we can finish the work. By: Digium Subversion (svnbot) 2008-06-18 15:15:43 Repository: asterisk Revision: 123710 U branches/1.4/pbx/pbx_spool.c ------------------------------------------------------------------------ r123710 | tilghman | 2008-06-18 15:15:41 -0500 (Wed, 18 Jun 2008) | 7 lines Set the variables top-down, so that if a script sets a variable more than once, the last one will take precedence. (closes issue ASTERISK-12037) Reported by: phber Patches: 20080519__bug12673.diff.txt uploaded by Corydon76 (license 14) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=123710 By: Digium Subversion (svnbot) 2008-06-18 15:17:28 Repository: asterisk Revision: 123715 _U trunk/ U trunk/pbx/pbx_spool.c ------------------------------------------------------------------------ r123715 | tilghman | 2008-06-18 15:17:26 -0500 (Wed, 18 Jun 2008) | 15 lines Merged revisions 123710 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r123710 | tilghman | 2008-06-18 15:22:42 -0500 (Wed, 18 Jun 2008) | 7 lines Set the variables top-down, so that if a script sets a variable more than once, the last one will take precedence. (closes issue ASTERISK-12037) Reported by: phber Patches: 20080519__bug12673.diff.txt uploaded by Corydon76 (license 14) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=123715 By: Digium Subversion (svnbot) 2008-06-18 15:18:15 Repository: asterisk Revision: 123718 _U branches/1.6.0/ U branches/1.6.0/pbx/pbx_spool.c ------------------------------------------------------------------------ r123718 | tilghman | 2008-06-18 15:18:13 -0500 (Wed, 18 Jun 2008) | 23 lines Merged revisions 123715 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r123715 | tilghman | 2008-06-18 15:23:58 -0500 (Wed, 18 Jun 2008) | 15 lines Merged revisions 123710 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r123710 | tilghman | 2008-06-18 15:22:42 -0500 (Wed, 18 Jun 2008) | 7 lines Set the variables top-down, so that if a script sets a variable more than once, the last one will take precedence. (closes issue ASTERISK-12037) Reported by: phber Patches: 20080519__bug12673.diff.txt uploaded by Corydon76 (license 14) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=123718 |