[asterisk-users] Originate with label?

Mark Murawski markm-lists at intellasoft.net
Mon Aug 29 13:32:51 CDT 2022


On 8/29/22 14:00, asterisk at phreaknet.org 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.



More information about the asterisk-users mailing list