[asterisk-users] AGI and retreiving data, how to use this data in extensions.conf
Eric Wieling
EWieling at nyigc.com
Sat Mar 10 14:51:53 CST 2012
You would set a dialplan variable from inside your AGI.
In PHPAGI it might be something this:
$agi->set_variable("CUST_ID", $cust_id);
Then in your dialplan after your script runs you can use the variable like any other.
You can also get dialplan variables AND functions:
$tmp = $agi->get_var("VMCOUNT(1234 at accounting)");
$vmcount = $tmp["data"];
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of bilal ghayyad
Sent: Saturday, March 10, 2012 3:27 PM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] AGI and retreiving data, how to use this data in extensions.conf
Hi All;
I know that I can use the AGI to call (run) a script (php or python or any other kind of scripts), but the question is:
If I have information that I need to build a decision in the extensions.conf based on it, and these informations can be obtained using this script, so how I will read these informations? What is the method to read it from the database and store it in a variable that I can use it in the extensions.conf to do proper call routing? How?
Regards
Bilal
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list