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

Russell Bryant russell at digium.com
Thu Dec 18 08:44:19 CST 2008


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.

-- 
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list