mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
functions.voip.php connect() method uses defaults from config.default.php instead of hard coded strings
This commit is contained in:
@@ -79,6 +79,11 @@ if (!defined('VOIP_ADMIN_USER')) define('VOIP_ADMIN_USER','admin');
|
||||
*/
|
||||
if (!defined('VOIP_ADMIN_PASS')) define('VOIP_ADMIN_PASS','amp111');
|
||||
|
||||
/**
|
||||
* The Asterisk server port for the monitor interface
|
||||
*/
|
||||
if (!defined('VOIP_PORT')) define('VOIP_PORT','5038');
|
||||
|
||||
/**
|
||||
* The meet me room id for the VOIP Server
|
||||
*/
|
||||
|
||||
@@ -265,9 +265,9 @@ class voip {
|
||||
*
|
||||
* @return bool True if connected successfully, else false
|
||||
*/
|
||||
function connect($ip,$user="admin",$pass="amp111",$events = false)
|
||||
function connect($ip=VOIP_SERVER,$user=VOIP_ADMIN_USER,$pass=VOIP_ADMIN_PASS,$events = false)
|
||||
{
|
||||
$this->socket = fsockopen($ip,"5038",$errno,$errstr,1);
|
||||
$this->socket = fsockopen($ip,VOIP_PORT,$errno,$errstr,1);
|
||||
if (!$this->socket)
|
||||
{
|
||||
print "$errno: $errstr";
|
||||
|
||||
Reference in New Issue
Block a user