On 8/29/22 14:00, [email protected] wrote:
This is a mockup of what the new-style if/else processor would output
26. NoOp(AEL IF("\${DIALSTATUS}" == "BUSY") --
extensions.ael:1405)
27. GotoIf($["${DIALSTATUS}" == "BUSY"]?28:30)
28. Set(voiceMailOptions=b)
29. Goto(32)
30. NoOp(AEL ELSE -- extensions.ael:1409)
31. Set(voiceMailOptions=u)
31. NoOp(AEL END ELSE -- extensions.ael:1410)
32. NoOp(AEL END IF("\${DIALSTATUS}" == "BUSY")
-- extensions.ael:1411)
33. NoOp(DoStuff)
Why all the GotoIfs? Why not just use the If/EndIf applications
(assuming they get merged)? Much cleaner syntax:
If($["${DIALSTATUS}"="BUSY"])
Set(voiceMailOptions=b)
Else()
Set(voiceMailOptions=u)
EndIf()
NA
That's definitely very doable. If/Else/Endif was not available at the
time AEL was created. This would be much cleaner code generation as well.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Check out the new Asterisk community forum at: https://community.asterisk.org/
New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users