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

Steve Murphy murf at digium.com
Thu Dec 18 12:03:34 CST 2008


On Thu, 2008-12-18 at 08:44 -0600, Russell Bryant 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.
> 

OK, this makes more sense; but how are you going to handle the
other stuff where they want to play with channel fields like CID,
CDR, etc? wouldn't

Set(ORIGINATE_VAR(CALLERID(name)=Me))
or 
Set(ORIGINATE_VAR(CALLERID(name))=Me) (or whatever)

be quite difficult/impossible?

murf

Steve Murphy
Digium, Inc. | Software Developer
57 Lane 17 –Cody, WY 82414 – USA
direct: +1 256-428-6002
mobile: +1 307-899-5535
fax/home: +1 307-754-5675
irc: codefreeze | jabber: murf at digium.com
Check us out at: www.digium.com& www.asterisk.org


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3227 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20081218/e1a13543/attachment.bin 


More information about the asterisk-dev mailing list