Re: [asterisk-users] Global variables and AGI
Yes, thanks again for the suggestions. I wrote a few scripts for different things that we needed in the office and by the time I got to that one, I was tired and wasn't thinking straight anymore. I am probably going to just set a dummy variable for now and have asterisk update the global. Down the road we plan on adding a database for call logging, configurations, etc, and I would agree with you Jay, storing the variable there would be the better choice. Thanks again. Kevin Jay Milk wrote: Kevin Smith wrote: Hi everyone, I know that functions like set_variable and get_variable (using php with phpagi) only apply to the channel variable. What I need to do is reset a global variable I have in our system. I have a script that is going to determine when this will happen, but I just have to make it happen. Assuming that I cannot update the variable via the script, it is there a way I can make a call to the system, such as a call file, and place it in the context of the dialplan that I need to change the variable? If so, is there anything special I need in the call file for that to work? Or is there a easier/better way to do this that I haven't thought of. Any suggestions would be helpful. Thanks, Kevin As Timebandit pointed out -- http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Set or SetGlobalVar in 1.0.x If most of the interaction with that variable occurs through agi, you might also want to consider storing it outside of Asterisk. I've stored a good number of values in mysql for an asterisk application before. If most of the interaction occurs within the dialplan and/or you're trying to avoid agi, you could also use the asterisk database directly with DBPut and DBGet. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Global variables and AGI
Hi everyone, I know that functions like set_variable and get_variable (using php with phpagi) only apply to the channel variable. What I need to do is reset a global variable I have in our system. I have a script that is going to determine when this will happen, but I just have to make it happen. Assuming that I cannot update the variable via the script, it is there a way I can make a call to the system, such as a call file, and place it in the context of the dialplan that I need to change the variable? If so, is there anything special I need in the call file for that to work? Or is there a easier/better way to do this that I haven't thought of. Any suggestions would be helpful. Thanks, Kevin ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Global variables and AGI
Hi everyone, I know that functions like set_variable and get_variable (using php with phpagi) only apply to the channel variable. What I need to do is reset a global variable I have in our system. I have a script that is going to determine when this will happen, but I just have to make it happen. Assuming that I cannot update the variable via the script, it is there a way I can make a call to the system, such as a call file, and place it in the context of the dialplan that I need to change the variable? If so, is there anything special I need in the call file for that to work? Or is there a easier/better way to do this that I haven't thought of. Reading this : http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Set you need to use the g option If you can't use it from phpagi, you could, at worst, set a local variable from your AGI, then in the dialplan take the value of that one and apply it to the global one using option g hth ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Global variables and AGI
Kevin Smith wrote: Hi everyone, I know that functions like set_variable and get_variable (using php with phpagi) only apply to the channel variable. What I need to do is reset a global variable I have in our system. I have a script that is going to determine when this will happen, but I just have to make it happen. Assuming that I cannot update the variable via the script, it is there a way I can make a call to the system, such as a call file, and place it in the context of the dialplan that I need to change the variable? If so, is there anything special I need in the call file for that to work? Or is there a easier/better way to do this that I haven't thought of. Any suggestions would be helpful. Thanks, Kevin As Timebandit pointed out -- http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Set or SetGlobalVar in 1.0.x If most of the interaction with that variable occurs through agi, you might also want to consider storing it outside of Asterisk. I've stored a good number of values in mysql for an asterisk application before. If most of the interaction occurs within the dialplan and/or you're trying to avoid agi, you could also use the asterisk database directly with DBPut and DBGet. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users