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

Kevin P. Fleming kpfleming at starnetworks.us
Mon Jan 3 09:47:06 MST 2005


Brian Wilkins wrote:
>    I want to have the ability to specify AGI scripts for a particular SIP 
> peers, and then be able to pull them from memory through a variable in the 
> extensions.conf, such as SCRIPT. I have created a _small_ patch that will 
> allow me to do that, but I am at a loss as to how to properly call it. Right 
> now, I am setting the variable SCRIPT= to some AGI script. Should I require 
> users to specify a variable name? This would be easy to do since I could just 
> strsep on say a comma or pipe after the script name. Any input would be 
> greatly appreciated before I put this into the bug tracker. Thanks -

If you are doing this for a peer (when you are calling out to them), 
then you will have to create an app in chan_sip to get this value; it 
won't be in any channel variables, because the channel variables come 
from the originating end.

If you are going to be looking for this channel variable in something 
that gets run _in_ the channel created to the peer, then you can just 
use "setvar=SCRIPT=/path/to/script" in your sip.conf, there is no 
additional code needed.



More information about the asterisk-dev mailing list