[Home]

Summary:ASTERISK-11725: ${EXTEN} variable is corrupted within switch()
Reporter:pj (pj)Labels:
Date Opened:2008-03-26 06:16:24Date Closed:2008-03-27 12:13:06
Priority:MajorRegression?No
Status:Closed/CompleteComponents:PBX/pbx_ael
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:before passing switch(), ${EXTEN} variable is correctly set to '9551',
within switch() is prepended with eg. 'sw-59-'

[Mar 26 11:56:22] NoOp("Skinny/324@PJ-3", "exten before switch 9551")
[Mar 26 11:56:22] NoOp("Skinny/324@PJ-3", "first case sw-59-9551")
[Mar 26 11:56:43] NoOp("Skinny/324@PJ-4", "default case sw-59-9553")





****** ADDITIONAL INFORMATION ******

sample ael test skript:
_955X => {
     NoOP(exten before switch ${EXTEN});
     switch(${EXTEN}) {
       case 9551:
         NoOP(first case ${EXTEN}); break;
       default:
         NoOP(default case ${EXTEN}); break;
     }
     Congestion;
 }
Comments:By: pj (pj) 2008-03-26 07:31:02

after completing switch(), variable ${EXTEN} contains not dialed extension, but matching pattern in dialplan!

[Mar 26 13:31:45] NoOp("Skinny/515@KIDLI-22", "exten before switch 9551")
[Mar 26 13:31:45] NoOp("Skinny/515@KIDLI-22", "first case sw-321-9551")
[Mar 26 13:31:45] NoOp("Skinny/515@KIDLI-22", "exten after switch _955X")


 _955X => {
     NoOP(exten before switch ${EXTEN});
     switch(${EXTEN}) {
       case 9551:
         NoOP(first case ${EXTEN}); break;
       default:
         NoOP(default case ${EXTEN}); break;
     }
     NoOp(exten after switch ${EXTEN});
     Congestion;
 }

By: Digium Subversion (svnbot) 2008-03-26 22:16:41

Repository: asterisk
Revision: 111341

U   branches/1.4/include/asterisk/ael_structs.h
U   branches/1.4/pbx/pbx_ael.c

------------------------------------------------------------------------
r111341 | murf | 2008-03-26 22:16:40 -0500 (Wed, 26 Mar 2008) | 15 lines


(closes issue ASTERISK-11725)
Reported by: pj
Tested by: murf

These changes will set a channel variable ~~EXTEN~~ just before generating code
for a switch, with the value of ${EXTEN}. The exten is marked as having a switch,
and ever after that, till the end of the exten, we substitute any ${EXTEN}
with ${~~EXTEN~~} instead in application arguments; (and the ${EXTEN: also).
The reason for this, is that because switches are coded using
separate extensions to provide pattern matching, and
jumping to/from these switch extensions messes up the ${EXTEN} value,
which blows the minds of users.


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

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

By: Digium Subversion (svnbot) 2008-03-26 23:42:44

Repository: asterisk
Revision: 111360

_U  trunk/
U   trunk/include/asterisk/ael_structs.h
U   trunk/include/asterisk/pval.h
U   trunk/pbx/pbx_ael.c
U   trunk/res/ael/pval.c

------------------------------------------------------------------------
r111360 | murf | 2008-03-26 23:42:41 -0500 (Wed, 26 Mar 2008) | 23 lines

Merged revisions 111341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111341 | murf | 2008-03-26 21:21:05 -0600 (Wed, 26 Mar 2008) | 15 lines


(closes issue ASTERISK-11725)
Reported by: pj
Tested by: murf

These changes will set a channel variable ~~EXTEN~~ just before generating code
for a switch, with the value of ${EXTEN}. The exten is marked as having a switch,
and ever after that, till the end of the exten, we substitute any ${EXTEN}
with ${~~EXTEN~~} instead in application arguments; (and the ${EXTEN: also).
The reason for this, is that because switches are coded using
separate extensions to provide pattern matching, and
jumping to/from these switch extensions messes up the ${EXTEN} value,
which blows the minds of users.


........

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

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

By: Digium Subversion (svnbot) 2008-03-27 00:11:56

Repository: asterisk
Revision: 111361

_U  branches/1.6.0/
U   branches/1.6.0/include/asterisk/ael_structs.h
U   branches/1.6.0/include/asterisk/pval.h
U   branches/1.6.0/pbx/pbx_ael.c
U   branches/1.6.0/res/ael/pval.c

------------------------------------------------------------------------
r111361 | murf | 2008-03-27 00:11:54 -0500 (Thu, 27 Mar 2008) | 31 lines

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

................
r111360 | murf | 2008-03-26 22:47:12 -0600 (Wed, 26 Mar 2008) | 23 lines

Merged revisions 111341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111341 | murf | 2008-03-26 21:21:05 -0600 (Wed, 26 Mar 2008) | 15 lines


(closes issue ASTERISK-11725)
Reported by: pj
Tested by: murf

These changes will set a channel variable ~~EXTEN~~ just before generating code
for a switch, with the value of ${EXTEN}. The exten is marked as having a switch,
and ever after that, till the end of the exten, we substitute any ${EXTEN}
with ${~~EXTEN~~} instead in application arguments; (and the ${EXTEN: also).
The reason for this, is that because switches are coded using
separate extensions to provide pattern matching, and
jumping to/from these switch extensions messes up the ${EXTEN} value,
which blows the minds of users.


........

................

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

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

By: Digium Subversion (svnbot) 2008-03-27 12:13:06

Repository: asterisk
Revision: 111440

_U  team/murf/bug11210/
U   team/murf/bug11210/UPGRADE.txt
U   team/murf/bug11210/apps/app_playback.c
U   team/murf/bug11210/apps/app_voicemail.c
U   team/murf/bug11210/channels/chan_sip.c
U   team/murf/bug11210/channels/misdn_config.c
U   team/murf/bug11210/contrib/scripts/autosupport
U   team/murf/bug11210/include/asterisk/ael_structs.h
U   team/murf/bug11210/include/asterisk/linkedlists.h
U   team/murf/bug11210/include/asterisk/pval.h
U   team/murf/bug11210/main/config.c
U   team/murf/bug11210/main/frame.c
U   team/murf/bug11210/main/http.c
U   team/murf/bug11210/main/pbx.c
U   team/murf/bug11210/pbx/pbx_ael.c
U   team/murf/bug11210/res/ael/pval.c

------------------------------------------------------------------------
r111440 | murf | 2008-03-27 12:13:02 -0500 (Thu, 27 Mar 2008) | 182 lines

Merged revisions 111067,111083,111123,111127,111130,111132,111185,111213,111246,111285,111295,111360,111410 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r111067 | mmichelson | 2008-03-26 13:26:23 -0600 (Wed, 26 Mar 2008) | 17 lines

Merged revisions 111049 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111049 | mmichelson | 2008-03-26 14:22:16 -0500 (Wed, 26 Mar 2008) | 9 lines

Add a lock to the vm_state structure and use the lock around mail_open calls
to prevent concurrent access of the same mailstream. This, along with trunk's
ability to configure TCP timeouts for IMAP storage will help to prevent
crashes and hangs when using voicemail with IMAP storage.

(closes issue ASTERISK-10111)
Reported by: ewilhelmsen


........

................
r111083 | file | 2008-03-26 13:29:26 -0600 (Wed, 26 Mar 2008) | 4 lines

Add expiry value to the sip show subscriptions CLI command.
(closes issue ASTERISK-11470)
Reported by: agx

................
r111123 | mmichelson | 2008-03-26 13:39:23 -0600 (Wed, 26 Mar 2008) | 12 lines

Merged revisions 111121 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111121 | mmichelson | 2008-03-26 14:37:36 -0500 (Wed, 26 Mar 2008) | 4 lines

This code change is made just for clarification. It does exactly
the same thing as before. It just doesn't look as wrong.


........

................
r111127 | kpfleming | 2008-03-26 13:52:27 -0600 (Wed, 26 Mar 2008) | 18 lines

Merged revisions 111126 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r111126 | kpfleming | 2008-03-26 14:51:24 -0500 (Wed, 26 Mar 2008) | 10 lines

Merged revisions 111125 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r111125 | kpfleming | 2008-03-26 14:49:30 -0500 (Wed, 26 Mar 2008) | 2 lines

update UPGRADE notes to document usage of the script

........

................

................
r111130 | file | 2008-03-26 13:56:40 -0600 (Wed, 26 Mar 2008) | 14 lines

Merged revisions 111129 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111129 | file | 2008-03-26 16:55:08 -0300 (Wed, 26 Mar 2008) | 6 lines

Update autosupport script.
(closes issue ASTERISK-10279)
Reported by: angler
Patches:
     autosupport.diff uploaded by angler (license 106)

........

................
r111132 | tilghman | 2008-03-26 13:58:09 -0600 (Wed, 26 Mar 2008) | 2 lines

Simplify new macro, simplify configfile logic, now that list is sorted

................
r111185 | tilghman | 2008-03-26 14:34:05 -0600 (Wed, 26 Mar 2008) | 2 lines

Oops, missed one

................
r111213 | twilson | 2008-03-26 15:23:29 -0600 (Wed, 26 Mar 2008) | 2 lines

Stupid strcasecmp function :-)

................
r111246 | qwell | 2008-03-26 17:27:33 -0600 (Wed, 26 Mar 2008) | 17 lines

Merged revisions 111245 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111245 | qwell | 2008-03-26 18:26:33 -0500 (Wed, 26 Mar 2008) | 9 lines

Remove excessive smoother optimization that was causing audio glitches (small "pops")
after (about 200ms later) an "incorrectly" sized frame was received.

While it would be very nice to keep this as optimized as possible, it makes no sense
for the smoother to be dropping random bits of audio like this.  Isn't that the
whole point of a smoother?

Closes issue ASTERISK-11533.

........

................
r111285 | qwell | 2008-03-26 18:25:56 -0600 (Wed, 26 Mar 2008) | 9 lines

Merged revisions 111280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111280 | qwell | 2008-03-26 19:25:13 -0500 (Wed, 26 Mar 2008) | 1 line

Put this flag back so we don't change the API.
........

................
r111295 | qwell | 2008-03-26 18:27:35 -0600 (Wed, 26 Mar 2008) | 1 line

But we can change the API here.
................
r111360 | murf | 2008-03-26 22:47:12 -0600 (Wed, 26 Mar 2008) | 23 lines

Merged revisions 111341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111341 | murf | 2008-03-26 21:21:05 -0600 (Wed, 26 Mar 2008) | 15 lines


(closes issue ASTERISK-11725)
Reported by: pj
Tested by: murf

These changes will set a channel variable ~~EXTEN~~ just before generating code
for a switch, with the value of ${EXTEN}. The exten is marked as having a switch,
and ever after that, till the end of the exten, we substitute any ${EXTEN}
with ${~~EXTEN~~} instead in application arguments; (and the ${EXTEN: also).
The reason for this, is that because switches are coded using
separate extensions to provide pattern matching, and
jumping to/from these switch extensions messes up the ${EXTEN} value,
which blows the minds of users.


........

................
r111410 | murf | 2008-03-27 07:29:41 -0600 (Thu, 27 Mar 2008) | 17 lines

Merged revisions 111391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111391 | murf | 2008-03-27 07:03:28 -0600 (Thu, 27 Mar 2008) | 9 lines

These small documentation updates made in response to a query in
asterisk-users, where a user was using Playback, but needed the
features of Background, and had no idea that Background existed,
or that it might provide the features he needed. I thought the
best way to avert these kinds of queries was to provide "See Also"
references in all three of "Background", "Playback", "WaitExten".
Perhaps a project to do this with all related apps is in order.


........

................

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

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