[asterisk-bugs] [Asterisk 0018480]: [patch] Contexts with a 'switch' statement in a 's' extension adds MSet to the beginning of the Context

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Dec 16 13:10:14 UTC 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18480 
====================================================================== 
Reported By:                nivek
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18480
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.8.0 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-12-15 13:54 CST
Last Modified:              2010-12-16 07:10 CST
====================================================================== 
Summary:                    [patch] Contexts with a 'switch' statement in a 's'
extension adds MSet to the beginning of the Context
Description: 
Creating a simple context with a switch statement in the 's' extension will
always add two Mset commands to the beginning of the context.

Changing the 's' to '_.' only gives one Mset.
====================================================================== 

---------------------------------------------------------------------- 
 (0129663) nivek (reporter) - 2010-12-16 07:10
 https://issues.asterisk.org/view.php?id=18480#c129663 
---------------------------------------------------------------------- 
No error messages or problems.  But just an observation.
Is this proper behavior for the ael compile...

'0' =>            1. Gosub(Pre-Dial-Extension,~~s~~,1(0000))    [pbx_ael]
                  2. Hangup()                                   [pbx_ael]
'0004F213C999' => hint: Custom:0004F213C999_LAMP                [pbx_ael]
'0004F2151716' => hint: Custom:0004F2151716_LAMP                [pbx_ael]
'1698' =>         1. Goto(Transfer-to-Voicemail,s,1)            [pbx_ael]
'1699' =>         1. Goto(User-Of-Voicemail,s,1)                [pbx_ael]
'6030' =>         1. Goto(s,1)                                  [pbx_ael]
's' =>            1. MSet(~~EXTEN~~=${EXTEN})                   [pbx_ael]
                  2.
Set(ExtensionNumber=${CPWR_DID2EXTENSION(${~~EXTEN~~})}) [pbx_ael]
                  3. Gosub(Pre-Dial-Extension,~~s~~,1(${ExtensionNumber}))
[pbx_ael]
                  4. Goto(sw_160_${~~EXTEN~~},10)               [pbx_ael]
                  5. NoOp(Finish switch_Office-Dialplan_160)    [pbx_ael]
                  6. Hangup()                                   [pbx_ael]


I thought that Mset was only for Macro's.
And it only shows up with a SWITCH statement in the extension block.
I am assuming it is because 'SWITCH' is ugly and needs to be browbeat to
behave in an 'extension' block weather it be 's', PATTERN or a static. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-16 07:10 nivek          Note Added: 0129663                          
======================================================================




More information about the asterisk-bugs mailing list