[asterisk-users] Originate with label?

asterisk at phreaknet.org asterisk at phreaknet.org
Wed Aug 31 05:16:37 CDT 2022


On 8/31/2022 5:29 AM, Antony Stone wrote:
> On Tuesday 30 August 2022 at 23:51:34, Mark Murawski wrote:
>
>> But... currently I don't see a justifiable reason to make this a thing,
>> unless there's actual problems demonstrated with the fact that MSet is being
>> used.
> I would still be interested to know whether there are any examples of MSet()
> doing what one expects and Set() in the same situation causing a problem.
One thing MSet does that Set doesn't is assign multiple variables at 
once (hence the name, multiple set).
e.g. instead of:
same => n,Set(a=1)
same => n,Set(b=2)
same => n,Set(c=3)

just do:
same => n,MSet(a=1,b=2,c=3)

I'm not sure if that still works in AEL, e.g. if you can do:
a = 1, b = 2, c = 3;

This requires MSet; the Set application only sets one variable per 
invocation. The SET function has limited ability to do this but doesn't 
always work.
This is not so much "causing a problem" as a limitation of Set that is 
really by design. This is probably a big reason MSet is not and won't be 
deprecated - it serves this distinctly different purpose.
Judicious use of MSet can reduce dialplan clutter when setting lots of 
variables, but typically different assignments are not written like that 
anyways, so maybe not relevant to AEL.



More information about the asterisk-users mailing list