[Home]

Summary:ASTERISK-13997: [patch] 'V' Command sets one variable only.
Reporter:Chris Maciejewski (chris-mac)Labels:
Date Opened:2009-05-15 02:40:10Date Closed:2009-05-18 14:01:11
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_externalivr
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 15114.patch
( 1) extensions.conf
( 2) test.sh
Description:Contrary to the documentation 'V' option doesn't set multiple variables separated by comma:

V,name=value[,name=value[,name=value]]

It sets only first one, and other variables are ignored.

How to reproduce:
1. Use extensions.conf and test.sh attached.
2. Dial into Asterisk.
3. Press DTMF "1" when IVR is playing.

You will see only X-VAR1 is set, X-VAR2 is ignored.
Comments:By: Mark Michelson (mmichelson) 2009-05-18 11:14:32

I have uploaded 15114.patch. When using your sample dialplan and test script, I then saw both X-VARs set when DumpChan executed. Please test and see if you approve.

By: Chris Maciejewski (chris-mac) 2009-05-18 13:45:40

I can confirm the patch resolved my issue. I can now set variables like:

"V,X-VAR1=TEST1"
"V,X-VAR2=TEST2,V-VAR3=TEST3"

and all three variables X-VAR1, X-VAR2 and X-VAR3 are set correctly.

Thanks
Chris

By: Digium Subversion (svnbot) 2009-05-18 13:58:27

Repository: asterisk
Revision: 195316

U   trunk/apps/app_externalivr.c

------------------------------------------------------------------------
r195316 | mmichelson | 2009-05-18 13:58:27 -0500 (Mon, 18 May 2009) | 18 lines

Fix externalivr's setvariable command so that it properly sets multiple variables.

The command had a for loop that was guaranteed to only execute once since
the continuation operation of the loop would set the input buffer NULL. I rewrote
the loop so that its operation was more obvious, and it would set multiple variables
correctly.

I also reduced stack space required for the function, constified the input string,
and modified the function so that it would not modify the input string while I was
at it.

(closes issue ASTERISK-13997)
Reported by: chris-mac
Patches:
     15114.patch uploaded by mmichelson (license 60)
Tested by: chris-mac


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=195316

By: Digium Subversion (svnbot) 2009-05-18 14:00:25

Repository: asterisk
Revision: 195317

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_externalivr.c

------------------------------------------------------------------------
r195317 | mmichelson | 2009-05-18 14:00:25 -0500 (Mon, 18 May 2009) | 24 lines

Merged revisions 195316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r195316 | mmichelson | 2009-05-18 13:58:26 -0500 (Mon, 18 May 2009) | 18 lines
 
 Fix externalivr's setvariable command so that it properly sets multiple variables.
 
 The command had a for loop that was guaranteed to only execute once since
 the continuation operation of the loop would set the input buffer NULL. I rewrote
 the loop so that its operation was more obvious, and it would set multiple variables
 correctly.
 
 I also reduced stack space required for the function, constified the input string,
 and modified the function so that it would not modify the input string while I was
 at it.
 
 (closes issue ASTERISK-13997)
 Reported by: chris-mac
 Patches:
       15114.patch uploaded by mmichelson (license 60)
 Tested by: chris-mac
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=195317

By: Digium Subversion (svnbot) 2009-05-18 14:00:52

Repository: asterisk
Revision: 195318

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_externalivr.c

------------------------------------------------------------------------
r195318 | mmichelson | 2009-05-18 14:00:52 -0500 (Mon, 18 May 2009) | 24 lines

Merged revisions 195316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r195316 | mmichelson | 2009-05-18 13:58:26 -0500 (Mon, 18 May 2009) | 18 lines
 
 Fix externalivr's setvariable command so that it properly sets multiple variables.
 
 The command had a for loop that was guaranteed to only execute once since
 the continuation operation of the loop would set the input buffer NULL. I rewrote
 the loop so that its operation was more obvious, and it would set multiple variables
 correctly.
 
 I also reduced stack space required for the function, constified the input string,
 and modified the function so that it would not modify the input string while I was
 at it.
 
 (closes issue ASTERISK-13997)
 Reported by: chris-mac
 Patches:
       15114.patch uploaded by mmichelson (license 60)
 Tested by: chris-mac
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=195318

By: Digium Subversion (svnbot) 2009-05-18 14:01:11

Repository: asterisk
Revision: 195319

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_externalivr.c

------------------------------------------------------------------------
r195319 | mmichelson | 2009-05-18 14:01:10 -0500 (Mon, 18 May 2009) | 24 lines

Merged revisions 195316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r195316 | mmichelson | 2009-05-18 13:58:26 -0500 (Mon, 18 May 2009) | 18 lines
 
 Fix externalivr's setvariable command so that it properly sets multiple variables.
 
 The command had a for loop that was guaranteed to only execute once since
 the continuation operation of the loop would set the input buffer NULL. I rewrote
 the loop so that its operation was more obvious, and it would set multiple variables
 correctly.
 
 I also reduced stack space required for the function, constified the input string,
 and modified the function so that it would not modify the input string while I was
 at it.
 
 (closes issue ASTERISK-13997)
 Reported by: chris-mac
 Patches:
       15114.patch uploaded by mmichelson (license 60)
 Tested by: chris-mac
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=195319