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

Brian Wilkins brian at hcc.net
Mon Jan 3 05:38:50 MST 2005


Right, but if I do AGI(${SCRIPT}, variables), then I do not need the Dial() 
Application. The SCRIPT variable would be used to create different scripts 
for different accounts per se and each peer is assigned to an account. So 
essentially you could have SIP_DIGIUM.AGI, SIP_VONAGE.AGI, 
SIP_BROADVOICE.AGI, get it? Then under each SIP peer you could define either

[markster]
type=friend
..
..
script=SIP_BROADVOICE.AGI


[brian]
type=friend
..
..
script=SIP_VONAGE.AGI

or if the variables for the peers are exclusive to each peer, then setvar= 
would work like you said.

Later on I may want to use the Dial() command like you stated, but that's not 
what I am going for.

On Monday 03 January 2005 05:14 pm, Kevin P. Fleming wrote:
> 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.
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev

-- 
Brian Wilkins
Software Engineer
brian at hcc.net

Heritage Communications Corporation
  Melbourne, FL     USA     32935
321.308.4000 x33
http://www.hcc.net




More information about the asterisk-dev mailing list