[Asterisk-Dev] Working on new feature.. need comments
Brian Wilkins
brian at hcc.net
Mon Jan 3 04:49:03 MST 2005
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 -
--- chan_sip.c 2005-01-03 16:28:05.000000000 +0000
+++ /home/brian/chan_sip.c 2005-01-03 16:31:13.000000000 +0000
/*--- build_peer: Build peer from config file ---*/
static struct sip_peer *build_peer(const char *name, struct ast_variable *v,
int temponly)
{
+ } else if (!strcasecmp(v->name, "script")) {
+ pbx_builtin_setvar_helper(chan, "SCRIPT",
v->value);
+ }
--
Brian Wilkins
Software Engineer
brian at hcc.net
Heritage Communications Corporation
Melbourne, FL USA 32935
More information about the asterisk-dev
mailing list