Is there a better way to do this with whats included in freepbx or commercial modules? I was thinking just putting the script in cron and just have it run every so many hours. Then eventually making a form to add or modify the data.
Posts made by table
-
RE: Duplicating IVR entries in FreePBX 13
-
RE: Duplicating IVR entries in FreePBX 13
<?php
$servername = "";
$username = "";
$password = "";
$dbname = "asterisk";// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}$sql = "INSERT INTO ivr_entries (ivr_id, selection, dest)
VALUES ('25', '43156', 'from-did-direct,820,1');";if ($conn->multi_query($sql) === TRUE) {
echo "New records created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}$conn->close();
?>The script was just a proof of concept to see if I could make the changes without breaking freepbx. I'm now trying to include logic to process data from another table and adjuct the dest fields in the other table accordingly.
I'm trying to make a php script that updates the table ivr_id dest (different queues) base on information from another table called ivr3
mysql> describe ivr3;
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| useridefin | mediumint(6) | NO | | NULL | |
| officetype | varchar(14) | NO | | NULL | |
| producttype | varchar(7) | NO | | NULL | |
| language | varchar(3) | NO | | eng | |
| new | varchar(3) | NO | | NULL | |
| pk_column | int(11) | NO | PRI | NULL | auto_increment |I added the pk_column for auto_increment. Should I add this into the ivr_entries also? I'd like to use these four fields for routing the call via ivr to certain dest based on rules. I'm not sure the logic of the rules though. Would I use weight and add a total or something. I've started code academy because my google fu has failed me as of yet.
Thanks for quick reply and taking the time to read that.
-
RE: Duplicating IVR entries in FreePBX 13
I'm currently trying to edit the dest in ivr_entries based off a couple variables from another table with php. Am I going about this the wrong way? Is there a simpler way to do this? I know post is old but thanks for taking time to read.