[asterisk-dev] [Code Review] New Application: Originate

Atis Lezdins atis at iq-labs.net
Thu Dec 18 09:59:43 CST 2008


On Thu, Dec 18, 2008 at 4:44 PM, Russell Bryant <russell at digium.com> wrote:
> Tzafrir Cohen wrote:
>> On Thu, Dec 18, 2008 at 02:25:38PM -0000, Russell Bryant wrote:
>>
>>> Jared, I think that's a great suggestion for improvement.  I have
>>> added a todo note in the code so that the enhancement gets completed
>>> at some point.  I'm not so sure on the syntax, but we'll figure
>>> something out.  It could also be something like ...
>>>
>>> Set(ORIGINATE_VAR=MYVAR=foo)
>>> Set(ORIGINATE_VAR=CALLERID(name)=Me)
>>> Set(ORIGINATE_VAR=SOMETHING_ELSE=bar)
>>> Originate(SIP/1234,exten,default,123,1)
>>
>> Single variable? Multiple variables?
>>
>> If multiple: how do you unset such a variable? Reset them all?
>>
>> /me thinks of %{ENV} (that is: the environment is a dictionary/hash of
>> values).
>
> Yeah, as I noted in the review, I messed up when I typing that out.
> What I intended was for ORIGINATE_VAR to be a dialplan function:
>
> Set(ORIGINATE_VAR(MYVAR)=foo)
>
> To unset it after it has been set, you would do:
>
> Set(ORIGINATE_VAR(MYVAR)=)
>
> This function would store these variables in a special datastore on the
> channel to be used when Originate() runs.  Multiple variables would be
> supported.
>

Hello,

Isn't associative arrays best way how to handle this? This syntax is
just moving Asterisk dialplan further away from programming.

Regards,
Atis

-- 
Atis Lezdins,
VoIP Project Manager / Developer,
IQ Labs Inc,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-dev mailing list