[Asterisk-Dev] Working on new feature.. need comments

Kevin P. Fleming kpfleming at starnetworks.us
Mon Jan 3 10:14:21 MST 2005


Brian Wilkins wrote:
> Then if I understand it correctly, I would need to create an additional 
> application because the variable set is not mutually exclusive. Perhaps 
> another solution would be to implement variables based on peers, unless 
> Asterisk already has this and I am missing something. 

But you've missed the point: let's say you are about to Dial() to 
SIP/peer1-foo.... how are you going to get variables for that peer, when 
no channel has been created yet to it?

Or, even better, you are about to Dial() to SIP/peer1-foo&SIP/peer2-bar. 
Now you don't even know what the proper values would be, because those 
two peers could have different scripts assigned.

In other words, we need to know _exactly_ at what point in your dialplan 
you are wanting this script name/path, and what other information you 
have at that point. If all you have is a SIP peer name (and no channel 
has been created), then channel variables will not do what you need.

And yes, you can already use "setvar=" for peers; when Dial() creates 
the channel out to that peer, _that_ channel (not the calling channel) 
will have those channel variables assigned. If you run a Macro or 
anything else _in that channel_, it will be able to see those values.



More information about the asterisk-dev mailing list