| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
require ("Ini.php"); |
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
if(($managers = manager_list()) !== null) |
|---|
| 7 |
{ |
|---|
| 8 |
$managerFound = false; |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
foreach($managers as $manager) |
|---|
| 12 |
{ |
|---|
| 13 |
if($manager['name'] == "NJClick" ) |
|---|
| 14 |
{ |
|---|
| 15 |
$managerFound = true; |
|---|
| 16 |
|
|---|
| 17 |
$manager = manager_get($manager['name']); |
|---|
| 18 |
break; |
|---|
| 19 |
} |
|---|
| 20 |
} |
|---|
| 21 |
} |
|---|
| 22 |
|
|---|
| 23 |
$action = isset($_REQUEST['action'])?$_REQUEST['action']:''; |
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
if ($action == 'save') |
|---|
| 27 |
{ |
|---|
| 28 |
$permit = $_REQUEST['permit']; |
|---|
| 29 |
$secret = $_REQUEST['secret']; |
|---|
| 30 |
|
|---|
| 31 |
$manager['permit'] = $permit; |
|---|
| 32 |
$manager['secret'] = $secret; |
|---|
| 33 |
|
|---|
| 34 |
manager_del($manager['name']); |
|---|
| 35 |
manager_add($manager['name'],$manager['secret'],$manager['deny'],$manager['permit'],$manager['read'],$manager['write']); |
|---|
| 36 |
manager_gen_conf(); |
|---|
| 37 |
needreload(); |
|---|
| 38 |
} |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
?> |
|---|
| 42 |
|
|---|
| 43 |
<H1>Noojee Click</H1> |
|---|
| 44 |
<H2>Overview</H2> |
|---|
| 45 |
<p>Noojee Click⢠for Asterisk is a free Firefox and Chromium extension which turns phone numbers on EVERY web page into 'Click to Dial' links.<br> |
|---|
| 46 |
Noojee Click scans web pages for phone numbers as the page loads. Phone numbers are identified using a set of configurable Patterns. Each time a phone number is identified Noojee Click adds a Noojee Click 'Dial icon' straight after the phone number. You can dial a number just by clicking on the Dial Icon. |
|---|
| 47 |
</p> |
|---|
| 48 |
<H2>Download</H2> |
|---|
| 49 |
You can download Noojee Click from our <a target="_blank" href="https://wiki.noojee.com.au/Noojee_Click">wiki</a>. It's Free! |
|---|
| 50 |
|
|---|
| 51 |
<H2>Module Details</H2> |
|---|
| 52 |
<p>Noojee's FreePBX module provides all of the core configuration required by Noojee Click to operate with your PBX.</p> |
|---|
| 53 |
<p> |
|---|
| 54 |
1) Creates a Asterisk API account for Noojee Click to connect to.<br> |
|---|
| 55 |
</p> |
|---|
| 56 |
|
|---|
| 57 |
<p>If Noojee Click is having trouble connecting to your Asterisk server then you should start |
|---|
| 58 |
by checking each of the following settings. Each setting, excluding 'Manager permit', must match the configuration |
|---|
| 59 |
details of the 'Asterisk' tab within the Noojee Click Configuration dialog.</p> |
|---|
| 60 |
|
|---|
| 61 |
<?php |
|---|
| 62 |
|
|---|
| 63 |
$ini = new Ini("/etc/asterisk/http.conf"); |
|---|
| 64 |
$ini->read(); |
|---|
| 65 |
$general = $ini->getSection("general"); |
|---|
| 66 |
$httpport = $general->getKeyValue("bindport"); |
|---|
| 67 |
|
|---|
| 68 |
?> |
|---|
| 69 |
|
|---|
| 70 |
<H2>Configuration</H2> |
|---|
| 71 |
<form name="general" action="config.php" method="post"> |
|---|
| 72 |
<input type="hidden" name="display" value="noojee_click_setup" /> |
|---|
| 73 |
<input type="hidden" name="action" value="save" /> |
|---|
| 74 |
<b>Asterisk:</b> |
|---|
| 75 |
|
|---|
| 76 |
<table> |
|---|
| 77 |
<tr> |
|---|
| 78 |
<td><a href=# class="info"><?php echo _("Server Type:")?> |
|---|
| 79 |
<span> <?php echo _("The connection type used by Noojee Click to connect to this asterisk server."); ?> |
|---|
| 80 |
</span> </a></td> |
|---|
| 81 |
<td>AJAM (Asterisk 1.4+)</td> |
|---|
| 82 |
</tr> |
|---|
| 83 |
<tr> |
|---|
| 84 |
<td><a href=# class="info"><?php echo _("Asterisk Hostname:")?> |
|---|
| 85 |
<span> <?php echo _("The IP address of your asterisk server."); ?> |
|---|
| 86 |
</span> </a></td> |
|---|
| 87 |
<td><?php echo $_SERVER['SERVER_ADDR'];?></td> |
|---|
| 88 |
</tr> |
|---|
| 89 |
<tr> |
|---|
| 90 |
<td><a href=# class="info"><?php echo _("Manager Port:")?> |
|---|
| 91 |
<span> <?php echo _("The port number used by Noojee Click to connect to the Asterisk HTTP mini-server."); ?> |
|---|
| 92 |
</span> </a></td> |
|---|
| 93 |
<td> <?php echo $httpport;?></td> |
|---|
| 94 |
</tr> |
|---|
| 95 |
<tr> |
|---|
| 96 |
<td><a href=# class="info"><?php echo _("Manager Username:")?> |
|---|
| 97 |
<span> <?php echo _("The username for the Asterisk API account used by Noojee Click to connect to Asterisk."); ?> |
|---|
| 98 |
</span> </a></td> |
|---|
| 99 |
<td><?php echo $manager["name"];?></td> |
|---|
| 100 |
</tr> |
|---|
| 101 |
<tr> |
|---|
| 102 |
<td><a href=# class="info"><?php echo _("Manager Secret:")?> |
|---|
| 103 |
<span> <?php echo _("The secret (password) for the Asterisk API account used by Noojee Click to connect to Asterisk."); ?> |
|---|
| 104 |
</span> </a></td> |
|---|
| 105 |
<td><input name="secret" value="<?php echo $manager["secret"];?>"></td> |
|---|
| 106 |
</tr> |
|---|
| 107 |
<tr> |
|---|
| 108 |
<td><a href=# class="info"><?php echo _("Context:")?> |
|---|
| 109 |
<span> <?php echo _("The context to use when dialing."); ?> |
|---|
| 110 |
</span> </a></td> |
|---|
| 111 |
<td>from-internal</td> |
|---|
| 112 |
</tr> |
|---|
| 113 |
|
|---|
| 114 |
<tr> |
|---|
| 115 |
<td><a href=# class="info"><?php echo _("Use HTTPS:")?> |
|---|
| 116 |
<span> <?php echo _("Determins if HTTPS is used to communicate between Noojee Click and Asterisk."); ?> |
|---|
| 117 |
</span> </a></td> |
|---|
| 118 |
<td>Leave the check box unselected.</td> |
|---|
| 119 |
</tr> |
|---|
| 120 |
|
|---|
| 121 |
<tr> |
|---|
| 122 |
<td><a href=# class="info"><?php echo _("Manager permit:")?> <span> <?php echo _("The default permit range includes all private IP address |
|---|
| 123 |
ranges, which means that Noojee Click should have no trouble connecting to your Asterisk PBX.<br> |
|---|
| 124 |
If you use public IP address ranges internally you may need to |
|---|
| 125 |
add the IP address ranges of all PC that will connect with Noojee Click.<br> |
|---|
| 126 |
The entry should be of the form <ip address>/<subnet mask><br> e.g. |
|---|
| 127 |
10.10.0.123/255.255.255.0<br> If you are unsure what the subnet mask |
|---|
| 128 |
should be then just use 255.255.255.0."); ?> </span> </a> |
|---|
| 129 |
</td> |
|---|
| 130 |
<td><input name="permit" value="<?php echo $manager["permit"];?>" size="40"></td> |
|---|
| 131 |
</tr> |
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 |
</table> |
|---|
| 135 |
<!-- <?php print_r($manager); print_r($amp_conf);?> --> |
|---|
| 136 |
<h6> |
|---|
| 137 |
<input name="Submit" type="submit" |
|---|
| 138 |
value="<?php echo _("Submit Changes")?>"> |
|---|
| 139 |
</h6> |
|---|
| 140 |
</form> |
|---|
| 141 |
|
|---|
| 142 |
|
|---|