diff --git a/Superfecta.class.php b/Superfecta.class.php new file mode 100644 index 00000000..42e2c367 --- /dev/null +++ b/Superfecta.class.php @@ -0,0 +1,230 @@ +freepbx = $freepbx; + $this->db = $freepbx->Database; + } + public function install() { + + } + public function uninstall() { + + } + public function backup(){ + + } + public function restore($backup){ + + } + public function doConfigPageInit($page){ + return true; + } + + public function myDialplanHooks() { + return true; + } + + public function ajaxRequest($req, &$setting) { + switch($req) { + case "power": + case "delete": + case "options": + case "save_options": + case "update_sources": + return true; + break; + } + } + + public function ajaxHandler() { + switch($_REQUEST['command']) { + case "update_sources": + $sources = implode(",", $_REQUEST['data']); + $sql = "REPLACE INTO superfectaconfig (value, source, field) VALUES(?, ?, 'sources')"; + $sth = $this->db->prepare($sql); + $sth->execute(array($sources, $_REQUEST['scheme'])); + return array("success" => true); + break; + case "power": + $data = preg_replace('/^scheme_/i', '', $_REQUEST['scheme']); + $sql = "UPDATE superfectaconfig SET value = (value * -1) WHERE field = 'order' AND source = ?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($data)); + return array("status" => true); + break; + case "delete": + $data = preg_replace('/^scheme_/i', '', $_REQUEST['scheme']); + $sql = "DELETE FROM superfectaconfig WHERE source = ?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($data)); + + //We now have to reorder the array. Well, we don't -have- to. But it's prettier + $sql = "SELECT * FROM superfectaconfig WHERE field LIKE 'order' ORDER BY value ASC"; + $sth = $this->db->prepare($sql); + $sth->execute(); + $scheme_list = $sth->fetchAll(\PDO::FETCH_ASSOC); + $order = 1; + foreach($scheme_list as $data) { + $sql = "REPLACE INTO superfectaconfig (value, source, field) VALUES(?, ?, 'order')"; + $sth = $this->db->prepare($sql); + $sth->execute(array($order, $data['source'])); + $order++; + } + return array("status" => true); + break; + case "save_options": + include(__DIR__."/includes/superfecta_base.php"); + $path = __DIR__; + include $path.'/sources/source-'.$_REQUEST['source'].'.module'; + if(!class_exists($_REQUEST['source'])) { + return array("status" => false); + } + $module = new $_REQUEST['source']; + $params = $module->source_param; + + $scheme = $_REQUEST['scheme']; + $source = $_REQUEST['source']; + + foreach($params as $key => $data) { + if(isset($_POST[$key]) && $_POST[$key] != "off") { + $sql = "REPLACE INTO superfectaconfig (source,field,value) VALUES (?, ?, ?)"; + $sth = $this->db->prepare($sql); + $sth->execute(array($scheme . "_" . $source, $key, $_POST[$key])); + } else { + $sql = "DELETE FROM superfectaconfig WHERE source = ? AND field = ?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($scheme . "_" . $source, $key)); + } + } + return array("status" => true); + break; + case "options": + include(__DIR__."/includes/superfecta_base.php"); + $scheme = $_REQUEST['scheme']; + $source = $_REQUEST['source']; + + $sql = "SELECT field, value FROM superfectaconfig WHERE source = ?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($scheme . "_" . $source)); + $n_settings = $sth->fetchAll(\PDO::FETCH_KEY_PAIR); + + $path = __DIR__; + + include $path.'/sources/source-'.$_REQUEST['source'].'.module'; + if(!class_exists($_REQUEST['source'])) { + return array("status" => false); + } + $module = new $_REQUEST['source']; + $params = $module->source_param; + + $form_html = '
'; + foreach($params as $key => $data) { + $form_html .= '
'; + $show = TRUE; + $default = isset($data['default']) ? $data['default'] : ''; + switch($data['type']) { + case "text": + $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; + $form_html .= ''.$data['description'].''; + $form_html .= ''; + break; + case "password": + $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; + $form_html .= ''.$data['description'].''; + $form_html .= ''; + break; + case "checkbox": + $checked = isset($n_settings[$key]) && ($n_settings[$key] == 'on') ? 'checked' : $default; + $form_html .= ''.$data['description'].''; + $form_html .= '
'; + $form_html .= ''; + $form_html .= ''; + $form_html .= ''; + $form_html .= ''; + $form_html .= ''; + break; + case "textarea": + $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; + $form_html .= ''.$data['description'].''; + $form_html .= ''; + break; + case "number": + $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; + $form_html .= ''.$data['description'].''; + $form_html .= ''; + break; + case "select": + $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; + $form_html .= ''.$data['description'].''; + $form_html .= '"; + break; + } + $form_html .= '
'; + } + + return array("status" => true, "title" => str_replace('_', ' ', $_REQUEST['source']), "html" => $form_html); + break; + } + } + + public function getAllSchemes() { + $sql = "SELECT source as scheme, value as powered FROM superfectaconfig WHERE source LIKE 'base_%' AND field = 'order' ORDER BY ABS(value)"; + $sth = $this->db->prepare($sql); + $sth->execute(); + $results = $sth->fetchAll(\PDO::FETCH_ASSOC); + + $i = 1; + $scheme_list = array(); + $total = count($results); + foreach ($results as $data) { + $scheme_list[$i] = $data; + $scheme_list[$i]['name'] = substr($data['scheme'], 5); + $scheme_list[$i]['showdown'] = $i == $total ? FALSE : TRUE; + $scheme_list[$i]['showup'] = $i == 1 ? FALSE : TRUE; + $scheme_list[$i]['showdelete'] = TRUE; + $scheme_list[$i]['powered'] = $data['powered'] < 0 ? FALSE : TRUE; + $i++; + } + return $scheme_list; + } + + public function getScheme($scheme) { + //set some default values for creating a new scheme + //TODO This is weird + if ($scheme == 'new') { + $return = array( + 'Curl_Timeout' => 3, + 'SPAM_Text' => 'SPAM' + ); + } else { + $sql = "SELECT field, value FROM superfectaconfig WHERE source = ?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($scheme)); + $return = $sth->fetchAll(\PDO::FETCH_KEY_PAIR); + } + + if (!isset($return['multifecta_timeout'])) { + $return['multifecta_timeout'] = '1.5'; + } + if (!isset($return['enable_multifecta'])) { + $return['enable_multifecta'] = ''; + } + if (!isset($return['SPAM_threshold'])) { + $return['SPAM_threshold'] = '3'; + } + + $return['sources'] = !empty($return['sources']) ? explode(',', $return['sources']) : array(); + + return $return; + } +} diff --git a/agi/phpagi-asmanager.php b/agi/phpagi-asmanager.php old mode 100755 new mode 100644 diff --git a/agi/phpagi.php b/agi/phpagi.php old mode 100755 new mode 100644 diff --git a/agi/superfecta.agi b/agi/superfecta.agi old mode 100755 new mode 100644 diff --git a/assets/js/superfecta.js b/assets/js/superfecta.js new file mode 100644 index 00000000..f8fe550b --- /dev/null +++ b/assets/js/superfecta.js @@ -0,0 +1,186 @@ +$("li.scheme i").click(function() { + var type = $(this).data("type"), name = $(this).parents("li.scheme").data("name"), $this = this; + switch (type) { + case "power": + if ($(this).hasClass("fa-toggle-on")) { + $.getJSON("ajax.php?module=superfecta&command=power&scheme=" + name, function(data) { + if (data.status) { + $($this).removeClass("fa-toggle-on").addClass("fa-toggle-off"); + } + }); + } else { + $.getJSON("ajax.php?module=superfecta&command=power&scheme=" + name, function(data) { + if (data.status) { + $($this).removeClass("fa-toggle-off").addClass("fa-toggle-on"); + } + }); + } + break; + case "up": + console.log("up"); + break; + case "down": + console.log("down"); + break; + case "duplicate": + if (confirm("Are you sure you wish to duplicate this scheme?")) { + } + break; + case "delete": + if (confirm("Are you sure you wish to delete this scheme?")) { + $.getJSON("ajax.php?module=superfecta&command=delete&scheme=" + name, function(data) { + if (data.status) { + $($this).parents("li.scheme").fadeOut("slow"); + } + }); + } + break; + } +}); + +$(".enabled input").click(function() { + var val = $(this).val(), row = $(this).parents("tr"), parent_id = row.attr("id"); + switch(val) { + case "on": + $("#sources tr").each(function(index) { + var eid = $(this).attr("id"), $this = this; + if (($(this).attr("id") != "row_header") && !$("#" + eid + "_enabled_yes").is(":checked") && parent_id != eid) { + row.fadeOut("slow", function() { + row.insertBefore($($this)); + row.fadeIn("slow"); + source_order(); + }); + return false; + } + }); + break; + case "off": + row.find(".fa-arrow-down").addClass("hidden"); + row.find(".fa-arrow-up").addClass("hidden"); + $("#sources tr").each(function(index) { + var eid = $(this).attr("id"), $this = this; + if (($(this).attr("id") != "row_header") && !$("#" + eid + "_enabled_yes").is(":checked") && parent_id != eid) { + row.fadeOut("slow", function() { + row.insertBefore($($this)); + row.fadeIn("slow"); + source_order(); + }); + return false; + } + }); + break; + } +}); + +$(".source i").click(function() { + var type = $(this).data("type"), row = $(this).parents("tr"), name = row.data("name"), scheme = row.data("scheme"), $this = this; + switch (type) { + case "down": + row.fadeOut('slow', function() { + row.insertAfter(row.next()); + row.fadeIn('slow'); + source_order(); + }) + break; + case "up": + row.fadeOut('slow', function() { + row.insertBefore(row.prev()); + row.fadeIn('slow'); + source_order(); + }) + break; + case "configure": + $( '
Loading...
' ).dialog({ + autoOpen: true, + height: 400, + width: 550, + modal: true, + buttons: { + Save: function() { + var $this = this; + $("#dialog-form form").ajaxSubmit({ + success: function(responseText, statusText, xhr, $form) { + $($this).dialog( "close" ); + $($this).remove(); + } + }); + }, + Cancel: function() { + $(this).dialog( "close" ); + $(this).remove(); + } + }, + open: function() { + var $this = this; + $.getJSON("ajax.php?module=superfecta&command=options&scheme=" + scheme + "&source=" + name, function(data) { + if(data.status) { + $($this).html(data.html); + $("a.info").each(function(){$(this).after(''+$(this).find('span').html()+'');$(this).find('span').remove();$(this).replaceWith($(this).html())}) + $(".help").on('mouseenter',function(){side=fpbx.conf.text_dir=='lrt'?'left':'right';var pos=$(this).offset();var offset=(200-pos.side)+"px";$(this).find("span").css(side,offset).stop(true,true).delay(500).animate({opacity:"show"},750);}).on('mouseleave',function(){$(this).find("span").stop(true,true).animate({opacity:"hide"},"fast");}); + } + }); + }, + close: function() { + $(this).dialog( "close" ); + $(this).remove(); + } + }); + break; + } +}); + +$("#configure").click(function() { + $( "#scheme-dialog-form" ).dialog( "open" ); +}) + +$(function() { + $( "#scheme-dialog-form" ).dialog({ + autoOpen: false, + height: 500, + width: 600, + modal: true, + buttons: { + "Agree and Save": function() { + + }, + Cancel: function() { + $(this).dialog( "close" ); + } + }, + close: function() { + $(this).dialog( "close" ); + } + }); +}); + +function source_order() { + var total = $("#sources tr").size(), source_order = []; + $("#sources tr").each(function(index) { + var id = $(this).attr("id"), up = $(this).find(".fa-arrow-up"), down = $(this).find(".fa-arrow-down"); + if (($(this).attr("id") != "row_header") && $("#" + id + "_enabled_yes").is(":checked")) { + if(index == 1) { + up.addClass("hidden"); + var nextid = $(this).next().attr("id"); + if($("#" + nextid + "_enabled_yes").is(":checked")) { + down.removeClass("hidden"); + } else { + down.addClass("hidden"); + } + } else { + var nextid = $(this).next().attr("id"); + if($("#" + nextid + "_enabled_yes").is(":checked")) { + down.removeClass("hidden"); + } else { + down.addClass("hidden"); + } + up.removeClass("hidden"); + } + source_order.push(id); + } + }); + $.getJSON("ajax.php?module=superfecta&command=update_sources&scheme=" + scheme, { + data: source_order + }, + function(json) { + }); +} diff --git a/assets/less/bootstrap.less b/assets/less/bootstrap.less new file mode 100644 index 00000000..f36b826c --- /dev/null +++ b/assets/less/bootstrap.less @@ -0,0 +1,63 @@ +#schemeorder_list { + font-size: 120%; + .scheme { + padding: 2px .4em; + i { + font-size: 120%; + cursor: pointer; + } + i.fa-toggle-on { + color: green; + } + i.fa-toggle-off { + color: red; + } + span { + cursor: pointer; + } + } +} + +#configure { + cursor: pointer; +} + +#scheme-dialog-form, #dialog-form { + font-size: 130%; + label { + font-weight: bold; + } +} + +.sfooter { + font-size: 10px; + position: absolute; + bottom: 100px; + width: 95%; +} + + +.intro-message { + margin-top:5px; + font-size: 80%; + text-align: center; +} + +#sources { + width: 80%; + border-spacing: 0; + i { + cursor: pointer; + } + th { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); + font-weight: bold; + } + .enabled { + width: 150px; + } + .description { + font-size: 90%; + padding: 12px; + } +} diff --git a/disclaimer.html b/disclaimer.html old mode 100755 new mode 100644 diff --git a/functions.inc.php b/functions.inc.php old mode 100755 new mode 100644 diff --git a/includes/ajax.inc b/includes/ajax.inc index f7434511..d9d83618 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -13,13 +13,6 @@ switch($_REQUEST['type']) { echo "ok"; die(); break; - case "update_sources": - $sources_list = json_decode($_REQUEST['data']); - $sources_commaed = implode(",", $sources_list); - $sql = "REPLACE INTO superfectaconfig (value, source, field) VALUES('".$db->escapeSimple($sources_commaed)."', '".$db->escapeSimple($_REQUEST['scheme'])."', 'sources')"; - sql($sql); - $out = array("success" => true); - break; case "update_schemes": $scheme_list = json_decode($_REQUEST['data']); $order = 1; @@ -73,7 +66,7 @@ switch($_REQUEST['type']) { { $sql = "UPDATE superfectaconfig SET source = 'base_".$scheme_name."' WHERE source = 'base_".$scheme_name_orig."'"; sql($sql); - + $sql = "UPDATE superfecta_to_incoming SET scheme = 'base_".$scheme_name."' WHERE scheme = 'base_".$scheme_name_orig."'"; sql($sql); } @@ -132,116 +125,6 @@ switch($_REQUEST['type']) { sql($sql); } break; - case "delete_scheme": - $data = preg_replace('/^scheme_/i', '', $_REQUEST['scheme']); - $sql = "DELETE FROM superfectaconfig WHERE source = '". $db->escapeSimple($data)."'"; - sql($sql); - - //We now have to reorder the array. Well, we don't -have- to. But it's prettier - $sql = "SELECT * FROM superfectaconfig WHERE field LIKE 'order' ORDER BY value ASC"; - $scheme_list = sql($sql, 'getAll', DB_FETCHMODE_ASSOC); - $order = 1; - foreach($scheme_list as $data) { - $sql = "REPLACE INTO superfectaconfig (value, source, field) VALUES('".$db->escapeSimple($order)."', '".$db->escapeSimple($data['source'])."', 'order')"; - sql($sql); - $order++; - } - - $out = array("success" => true); - break; - case "power_scheme": - $data = preg_replace('/^scheme_/i', '', $_REQUEST['scheme']); - $sql = "UPDATE superfectaconfig SET value = (value * -1) WHERE field = 'order' AND source = '". $db->escapeSimple($data)."'"; - sql($sql); - $out = array("success" => true); - break; - case "options": - $show = FALSE; - $scheme = str_replace("base_", "", $_REQUEST['scheme']); - - $source = $_REQUEST['source']; - - $sql = "SELECT * FROM superfectaconfig WHERE source = '".$scheme . "_" . $source."'"; - $settings = sql($sql, 'getAll'); - - foreach($settings as $data) { - $n_settings[$data[1]] = $data[2]; - } - - $path = dirname(dirname(__FILE__)); - require_once($path.'/sources/source-'.$_REQUEST['source'].'.module'); - $module = new $_REQUEST['source']; - $params = $module->source_param; - - $title = str_replace('_', ' ', $_REQUEST['source']); - $form_html = '

'.$title.'

'; - $form_html .= ''; - foreach($params as $key => $data) { - $form_html .= ''; - $show = TRUE; - $default = isset($data['default']) ? $data['default'] : ''; - switch($data['type']) { - case "text": - $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; - $form_html .= ''; - break; - case "password": - $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; - $form_html .= ''; - break; - case "checkbox": - $checked = isset($n_settings[$key]) && ($n_settings[$key] == 'on') ? 'checked' : $default; - $form_html .= ''; - break; - case "textarea": - $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; - $form_html .= ''; - break; - case "number": - $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; - $form_html .= ''; - break; - case "select": - $value = isset($n_settings[$key]) ? $n_settings[$key] : $default; - $form_html .= '"; - break; - default: - $form_html .= ''; - break; - } - $form_html .= ''; - } - $form_html .= '
'.str_replace("_", " ", $key).''.$data['description'].''.str_replace("_", " ", $key).''.$data['description'].''.str_replace("_", " ", $key).''.$data['description'].''.str_replace("_", " ", $key).''.$data['description'].''.str_replace("_", " ", $key).''.$data['description'].''.str_replace("_", " ", $key).''.$data['description'].'WARN: Unrecognized option \''.$data['type'].'\'
'; - $form_html .= '
'; - - $out = array("success" => true, "show" => $show, "data" => $form_html); - break; - case "save_options": - file_put_contents($amp_conf['AMPWEBROOT'].'/admin/modules/superfecta/log', print_r($_REQUEST,TRUE)); - - $path = dirname(dirname(__FILE__)); - require_once($path.'/sources/source-'.$_REQUEST['source'].'.module'); - $module = new $_REQUEST['source']; - $params = $module->source_param; - - $scheme = str_replace("base_", "", $_REQUEST['scheme']); - $source = $_REQUEST['source']; - - foreach($params as $key => $data) { - if(isset($_REQUEST[$key])) { - $sql = "REPLACE INTO superfectaconfig (source,field,value) VALUES ('".$scheme . "_" . $source."', '".$key."', '".$_REQUEST[$key]."')"; - sql($sql); - } else { - $sql = "DELETE FROM superfectaconfig WHERE source = '".$scheme . "_" . $source."' AND field = '".$key."'"; - sql($sql); - } - } - break; } echo json_encode($out); diff --git a/includes/callerid.php b/includes/callerid.php old mode 100755 new mode 100644 diff --git a/includes/processors/superfecta_multi.php b/includes/processors/superfecta_multi.php old mode 100755 new mode 100644 diff --git a/includes/processors/superfecta_single.php b/includes/processors/superfecta_single.php old mode 100755 new mode 100644 diff --git a/includes/rain.tpl.class.php b/includes/rain.tpl.class.php deleted file mode 100755 index f43c9750..00000000 --- a/includes/rain.tpl.class.php +++ /dev/null @@ -1,1013 +0,0 @@ -), stylesheet (), script ( - -
- -
-

Caller ID Superfecta

-
-

CallerID Superfecta for FreePBX is a utility program which adds incoming CallerID name lookups to your Asterisk system using multiple data sources.

\ No newline at end of file diff --git a/views/header.php b/views/header.php new file mode 100644 index 00000000..63348870 --- /dev/null +++ b/views/header.php @@ -0,0 +1,24 @@ +
+ +
+

+
+
+ +
+ This Project is hosted/maintained at https://github.com/POSSA/Caller-ID-Superfecta Feel free to fork/help/complain. +
+ This Module's wiki pages can be found here. +
diff --git a/views/sources.html b/views/sources.html deleted file mode 100755 index 174243c9..00000000 --- a/views/sources.html +++ /dev/null @@ -1,387 +0,0 @@ -

Add, Remove, Enable, Disable, Sort and Configure data sources as appropriate for your situation.

-

Select which data source(s) to use for your lookups, and the order in which you want them used:

-
- - - - - - - - - - - - - -
- - - - - - - - - - - {loop="sources"} - - - - - - - - - - {/loop} -
    Data Source NameDisabledEnabled
  {if condition="$value.show_link === TRUE"}{/if}{$value.pretty_source_name}{if condition="$value.show_link === TRUE"}{/if}{$value.description}
-
-
-
- -
-

- - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Scheme Name:Duplicate Scheme names not allowed.

General Options
DID RulesDefine the expected DID Number if your trunk passes DID on incoming calls.

Leave this blank to match calls with any or no DID info.

This rule trys both absolute and pattern matching (eg "_2[345]X", to match a range of numbers). (The "_" underscore is optional.)
:
- -
- CID RulesIncoming calls with CID matching the patterns specified here will use this CID Scheme. If this is left blank, this scheme will be used for any CID. It can be used to add or remove prefixes.
- Many sources require a specific number of digits in the phone number. It is recommended that you use the patterns to remove excess country code data from incoming CID to increase the effectiveness of this module.
- Note that a pattern without a + or | (to add or remove a prefix) will not make any changes but will create a match. Only the first matched pattern will be executed and the remaining rules will not be acted on.

Rules:
- X    matches any digit from 0-9
- Z    matches any digit from 1-9
- N    matches any digit from 2-9
- [1237-9]  matches any digit or letter in the brackets (in this example, 1,2,3,7,8,9)
- .    wildcard, matches one or more characters (not allowed before a | or +)
- |    removes a dialing prefix from the number (for example, 613|NXXXXXX would match when some one dialed "6135551234" but would only pass "5551234" to the Superfecta look up.)
+    adds a dialing prefix to the number (for example, 1613+NXXXXXX would match when someone dialed "5551234" and would pass "16135551234" to the Superfecta look up.)

- You can also use both + and |, for example: 01+0|1ZXXXXXXXXX would match "016065551234" and dial it as "0116065551234" Note that the order does not matter, eg. 0|01+1ZXXXXXXXXX does the same thing.
: -
- -
  
Lookup TimeoutSpecify a timeout in seconds for each source. If the source fails to return a result within the alloted time, the script will move on.
- Superfecta Processor - These are the types of Superfecta Processors:
- {loop="processors_list"} - {$value.name}: {$value.description}
- {/loop} -
-
- -
Multifecta TimeoutSpecify a timeout in seconds defining how long multifecta will obey the source priority. After this timeout, the first source to respond with a CNAM will be taken, until "Lookup Timeout" is reached.
CID Prefix URLIf you wish to prefix information on the caller id you can specify a url here where that prefix can be retrieved.
The data will not be parsed in any way, and will be truncated to the first 10 characters.
Example URL: http://www.example.com/GetCID.php?phone_number=[thenumber]
[thenumber] will be replaced with the full 10 digit phone number when the URL is called.
  
SPAM TextThis text will be prepended to Caller ID information to help you identify calls as SPAM calls.
SPAM Text SubstitutedWhen enabled, the text entered in "SPAM Text" (above) will replace the CID completely rather than pre-pending the CID value. - -
Enable SPAM InterceptionWhen enabled, Spam calls can be diverted or terminated. - -
- - - - - - - - - - - -
SPAM Send ThresholdThis is the threshold to send the call to the specified destination below
Send Spam Call To:
{$interceptor_select}
-

(License Terms) 

-

(* By clicking on either the "Agree and Save"
button, or the "Debug" button on this form
you are agreeing to the Caller ID Superfecta
Licensing Terms.)

-
-
-
-

Test a phone number against the selected sources.
- DID Number:The DID to test this scheme against.
- Phone Number:Phone number to test this scheme against.
- - Test all CID schemesWhen enabled, the debug function will test the number entered against all of the configured CID schemes.
When disabled, debug only checks up to the first scheme that provides positive results.

- Debug Level:

-
-
-
- \ No newline at end of file diff --git a/views/sources.php b/views/sources.php new file mode 100755 index 00000000..f552eead --- /dev/null +++ b/views/sources.php @@ -0,0 +1,128 @@ +

Scheme Name:

+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
   
+ + /> + + /> + + +
+ +
+
+ +
+ + +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
CID Prefix URLIf you wish to prefix information on the caller id you can specify a url here where that prefix can be retrieved.
The data will not be parsed in any way, and will be truncated to the first 10 characters.
Example URL: http://www.example.com/GetCID.php?phone_number=[thenumber]
[thenumber] will be replaced with the full 10 digit phone number when the URL is called.
  
SPAM TextThis text will be prepended to Caller ID information to help you identify calls as SPAM calls.
SPAM Text SubstitutedWhen enabled, the text entered in "SPAM Text" (above) will replace the CID completely rather than pre-pending the CID value. + +
Enable SPAM InterceptionWhen enabled, Spam calls can be diverted or terminated. + +
+ + + + + + + + + + + +
SPAM Send ThresholdThis is the threshold to send the call to the specified destination below
Send Spam Call To:
{$interceptor_select}
+

(License Terms) 

+

(* By clicking on either the "Agree and Save"
button, or the "Debug" button on this form
you are agreeing to the Caller ID Superfecta
Licensing Terms.)

+
+
diff --git a/views/style.css b/views/style.css deleted file mode 100755 index dfa93340..00000000 --- a/views/style.css +++ /dev/null @@ -1,18 +0,0 @@ -/* CSS Document */ - -body{ margin:0px; color:#333; font: 13px Helvetica; background:#eee;} -a{ color: #333; } -a:hover{ color: #999; } -img{border:0px;} - -#logo{width:100%;height:80px;background:url('img/top.gif') repeat-x #666;} -#content{ height: 100%;padding:20px; } -#footer{background: url('img/bottom.gif') repeat-x;color:#ccff00; padding:15px; text-align:center;} -#footer a{color:#ccff00;} - -.layout{background:#fff;border: 1px solid #ccc; padding:20px;margin-bottom:30px;} -code{ display:block;font:12px monospace; background: #e9ffe9;padding: 15px; border: solid 1px #ccddcc; margin-bottom:10px;} -tt{ display:block; font:12px monospace; background: #f6fdfd; padding: 15px; border: solid 1px #ccdddd; margin-bottom:0 0 10px 0; } - -.color1{background:#eeeeff;} -.color2{background:#ddddee;} \ No newline at end of file