diff options
author | Mark Crane <mcrane@pfsense.org> | 2008-12-07 08:19:43 +0000 |
---|---|---|
committer | Mark Crane <mcrane@pfsense.org> | 2008-12-07 08:19:43 +0000 |
commit | 91dd1eee2291679c17ea46b9b5593ce04a2c6ed1 (patch) | |
tree | b34c88edc49a258146ac8e7cae5cd9aef23a4f77 | |
parent | f295bcf966221883a369791840fb4837d79e5351 (diff) | |
download | pfsense-packages-91dd1eee2291679c17ea46b9b5593ce04a2c6ed1.tar.gz pfsense-packages-91dd1eee2291679c17ea46b9b5593ce04a2c6ed1.tar.bz2 pfsense-packages-91dd1eee2291679c17ea46b9b5593ce04a2c6ed1.zip |
pfSense FreeSWITCH package minor changes
-rw-r--r-- | packages/freeswitch/freeswitch.inc | 118 | ||||
-rw-r--r-- | packages/freeswitch/freeswitch.xml | 2 | ||||
-rw-r--r-- | packages/freeswitch/freeswitch_ivr.tmp | 6 | ||||
-rw-r--r-- | pkg_config.7.xml | 2 |
4 files changed, 66 insertions, 62 deletions
diff --git a/packages/freeswitch/freeswitch.inc b/packages/freeswitch/freeswitch.inc index 96b1b2a8..a0b4e4be 100644 --- a/packages/freeswitch/freeswitch.inc +++ b/packages/freeswitch/freeswitch.inc @@ -1111,64 +1111,66 @@ function sync_package_freeswitch_ivr() { $tmp .= " if ( dtmf.digits.length > \"0\" ) {\n"; $x = 0; - foreach($config['installedpackages']['freeswitchivroptions']['config'] as $row) { - - /* - $row['ivrid'] - $row['optionnumber'] - $row['optiontype'] - $row['optionaction'] - $row['optiondest'] - $row['optiondescr'] - */ - //$tmpantiactiondefault = ""; - - //find the correct IVR options with the correct action - if ($row['ivrid'] == $rowhelper['ivrid']) { - - if ($row['optionaction'] == "anti-action") { - - switch ($row['optionnumber']) { - case "t": - - if ($row['optiontype'] == "extension") { - $tmpantiactiondefault .= " session.execute(\"transfer\", \"".$row['optiondest']." XML default\"); //".$row['optiondescr']."\n"; - } - if ($row['optiontype'] == "voicemail") { - //$tmpantiactiondefault .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n"; - $tmpantiactiondefault .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$row['optiondest']."\");\n"; - } - - break; - default: - //$tmpantiaction .= " //console_log( \"info\", \"IVR Detected 1 digit \\n\" );\n"; - - if ($x == 0) { - $tmpantiaction .= " if ( dtmf.digits == \"".$row['optionnumber']."\" ) { //".$row['optiondescr']."\n"; - } - else { - $tmpantiaction .= " else if ( dtmf.digits == \"".$row['optionnumber']."\" ) { //".$row['optiondescr']."\n"; - } - - if ($row['optiontype'] == "extension") { - $tmpantiaction .= " session.execute(\"transfer\", \"".$row['optiondest']." XML default\");\n"; - } - if ($row['optiontype'] == "voicemail") { - //$tmpantiaction .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n"; - $tmpantiaction .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$row['optiondest']."\");\n"; - } - $tmpantiaction .= " }\n"; - - - } //end switch - - $x++; - } //end anti-action - - } //end ivrid - - - } //end for each + if (count($a_ivr_options) > 0) { + foreach(a_ivr_options as $row) { + + /* + $row['ivrid'] + $row['optionnumber'] + $row['optiontype'] + $row['optionaction'] + $row['optiondest'] + $row['optiondescr'] + */ + //$tmpantiactiondefault = ""; + + //find the correct IVR options with the correct action + if ($row['ivrid'] == $rowhelper['ivrid']) { + + if ($row['optionaction'] == "anti-action") { + + switch ($row['optionnumber']) { + case "t": + + if ($row['optiontype'] == "extension") { + $tmpantiactiondefault .= " session.execute(\"transfer\", \"".$row['optiondest']." XML default\"); //".$row['optiondescr']."\n"; + } + if ($row['optiontype'] == "voicemail") { + //$tmpantiactiondefault .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n"; + $tmpantiactiondefault .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$row['optiondest']."\");\n"; + } + + break; + default: + //$tmpantiaction .= " //console_log( \"info\", \"IVR Detected 1 digit \\n\" );\n"; + + if ($x == 0) { + $tmpantiaction .= " if ( dtmf.digits == \"".$row['optionnumber']."\" ) { //".$row['optiondescr']."\n"; + } + else { + $tmpantiaction .= " else if ( dtmf.digits == \"".$row['optionnumber']."\" ) { //".$row['optiondescr']."\n"; + } + + if ($row['optiontype'] == "extension") { + $tmpantiaction .= " session.execute(\"transfer\", \"".$row['optiondest']." XML default\");\n"; + } + if ($row['optiontype'] == "voicemail") { + //$tmpantiaction .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n"; + $tmpantiaction .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$row['optiondest']."\");\n"; + } + $tmpantiaction .= " }\n"; + + + } //end switch + + $x++; + } //end anti-action + + } //end ivrid + + + } //end for each + } //if count $tmp .= $tmpantiaction; $tmp .= " else {\n"; diff --git a/packages/freeswitch/freeswitch.xml b/packages/freeswitch/freeswitch.xml index 67dd3510..5050c8a8 100644 --- a/packages/freeswitch/freeswitch.xml +++ b/packages/freeswitch/freeswitch.xml @@ -44,7 +44,7 @@ <requirements>Describe your package requirements here</requirements> <faq>Currently there are no FAQ items provided.</faq> <name>FreeSWITCH Settings</name> - <version>0.3.1</version> + <version>0.3.2</version> <title>FreeSWITCH: Settings</title> <include_file>/usr/local/pkg/freeswitch.inc</include_file> <menu> diff --git a/packages/freeswitch/freeswitch_ivr.tmp b/packages/freeswitch/freeswitch_ivr.tmp index 89496a70..e76275cc 100644 --- a/packages/freeswitch/freeswitch_ivr.tmp +++ b/packages/freeswitch/freeswitch_ivr.tmp @@ -153,6 +153,7 @@ include("head.inc"); $i = 0; if (count($a_ivr) > 0) { foreach ($a_ivr as $ent) { + if (strlen($ent['ivrid']) > 0) { ?> <tr> <td class="listlr" ondblclick="document.location='freeswitch_ivr_edit.php?id=<?=$i;?>'"> @@ -173,8 +174,9 @@ include("head.inc"); </table> </td> </tr> - <?php - $i++; + <?php + } + $i++; } } ?> diff --git a/pkg_config.7.xml b/pkg_config.7.xml index bce8dbec..543016a1 100644 --- a/pkg_config.7.xml +++ b/pkg_config.7.xml @@ -46,7 +46,7 @@ <category>Services</category> <config_file>http://www.pfsense.com/packages/config/freeswitch/freeswitch.xml</config_file> <depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url> - <version>0.3.1</version> + <version>0.3.2</version> <status>Beta</status> <required_version>1.2.1</required_version> <maintainer>markjcrane@gmail.com</maintainer> |