[asterisk-users] MSet()

Philipp Kempgen philipp.kempgen at amooma.de
Fri Dec 12 16:05:38 CST 2008


Mark Michelson schrieb:
> Philipp Kempgen wrote:
>> How is MSet() different from Set()?
>> Is it supposed to be a "Multi"-Set()?
>> Why was it added in 1.6?

> It is a Multiset application. My recollection of the addition is that due to 
> parser changes in 1.6, a statement like:
> 
> exten => s,1,Set(FOO=hello,BAR=world)
> 
> would result in a variable called FOO being set to the value "hello,BAR=world".
> The MSet application was added to facilitate being able to set multiple 
> variables in a single application call. If using MSet, the above would instead 
> result in a variable called FOO being set to the value "hello" and a variable 
> called BAR being set to "world".

I was confused because even in 1.4
"The use of Set to set multiple variables at once and the g flag have both
been deprecated.  Please use multiple Set calls and the GLOBAL() dialplan
function instead."
There's nothing wrong with
Set(foo=hello);
Set(bar=world);
so I was just wondering why 1.6 comes with a Multi-Set() application.

Never mind.
Thanks.

   Philipp Kempgen

-- 
http://www.das-asterisk-buch.de  -  http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 



More information about the asterisk-users mailing list