Skip to content

Commit ffc05a0

Browse files
fix crypt installation on DEBIAN 10
1 parent 1dddd75 commit ffc05a0

File tree

5 files changed

+25
-12
lines changed

5 files changed

+25
-12
lines changed

build/MagnusBilling-current.tar.gz

100644100755
-440 Bytes
Binary file not shown.

classic/src/view/sip/Form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Ext.define('MBilling.view.sip.Form', {
5858
}, {
5959
name: 'defaultuser',
6060
fieldLabel: t('SIP user'),
61-
minLength: 4,
61+
minLength: window.sip_user_min ? window.sip_user_min : 4,
6262
allowBlank: true,
6363
readOnly: App.user.isClient
6464
}, {

protected/commands/CryptocurrencyCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ class CryptocurrencyCommand extends CConsoleCommand
2222
public function run($args)
2323
{
2424

25-
$modelMethodPay = Methodpay::model()->find('payment_method = :key', array(':key' => 'cryptocurrency'));
26-
if (!isset($modelMethodPay->id)) {
25+
$modelMethodPay = Methodpay::model()->find('payment_method = :key', [':key' => 'cryptocurrency']);
26+
if ( ! isset($modelMethodPay->id)) {
2727
echo 'No method found';
2828
exit;
2929
}
3030

3131
$last_30_minutes = time() - 1800;
3232
$modelCryptocurrency = Cryptocurrency::model()->findAll('date > :key1 AND status = 1',
33-
array(':key1' => date('Y-m-d')));
33+
[':key1' => date('Y-m-d')]);
3434

3535
foreach ($modelCryptocurrency as $key => $payment) {
3636
$result = '';
@@ -54,7 +54,7 @@ public function run($args)
5454

5555
Yii::log('encontrou liberar credit', 'error');
5656

57-
Cryptocurrency::model()->updateByPk($payment->id, array('status' => 0));
57+
Cryptocurrency::model()->updateByPk($payment->id, ['status' => 0]);
5858
$description = 'CriptoCurrency ' . $value->coin . ', txid: ' . $value->txId;
5959
Yii::log($description, 'error');
6060
echo ($payment->id_user . ' ' . $payment->amount . ' ' . $description . ' ' . $value->txId);

protected/commands/crypto.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@
77
sudo apt install python3.9-pip
88
python3.9 -m pip install python-binance
99
10+
11+
DEBIAN 10
12+
sudo apt install wget build-essential libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
13+
cd /tmp
14+
wget https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz
15+
tar -xf Python-3.9.1.tgz
16+
cd Python-3.9.1
17+
make -j 2
18+
sudo make altinstall
19+
20+
sudo python3.9 -m pip install --upgrade pip
21+
sudo python3.9 -m pip install python-binance
22+
1023
CENTOS 7
1124
yum install libffi-devel -y
1225

resources/asterisk/DidAgi.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function checkIfIsDidCall(&$agi, &$MAGNUS, &$CalcAgi)
8787
$sql = "SELECT id FROM pkg_prefix WHERE prefix = SUBSTRING('" . $this->did . "',1,length(prefix))
8888
ORDER BY LENGTH(prefix) DESC";
8989
$modelPrefix = $agi->query($sql)->fetch(PDO::FETCH_OBJ);
90-
if (!isset($modelPrefix->id)) {
90+
if ( ! isset($modelPrefix->id)) {
9191
$agi->verbose('Not found prefix to DID ' . $this->did);
9292
}
9393
$CalcAgi->id_prefix = $modelPrefix->id;
@@ -220,8 +220,8 @@ public function checkDidDestinationType(&$agi, &$MAGNUS, &$CalcAgi)
220220

221221
$agi->verbose('voip_call ' . $this->voip_call, 5);
222222

223-
if ($this->modelDid->cbr == 1 && !$agi->get_variable("ISFROMCALLBACKPRO", true)) {
224-
if (!$agi->get_variable("SECCALL", true)) {
223+
if ($this->modelDid->cbr == 1 && ! $agi->get_variable("ISFROMCALLBACKPRO", true)) {
224+
if ( ! $agi->get_variable("SECCALL", true)) {
225225
$agi->verbose('RECEIVED 0800 CALLBACPRO', 5);
226226
CallbackAgi::advanced0800CallBack($agi, $MAGNUS, $this, $CalcAgi);
227227
return;
@@ -265,7 +265,7 @@ public function checkDidDestinationType(&$agi, &$MAGNUS, &$CalcAgi)
265265
CallbackAgi::callbackCID($agi, $MAGNUS, $CalcAgi, $this);
266266
break;
267267
case 6:
268-
if (!$agi->get_variable("SECCALL", true)) {
268+
if ( ! $agi->get_variable("SECCALL", true)) {
269269
$agi->verbose('RECEIVED 0800 CALLBACK', 5);
270270
CallbackAgi::callback0800($agi, $MAGNUS, $CalcAgi, $this);
271271
}
@@ -412,7 +412,7 @@ public function call_did(&$agi, &$MAGNUS, &$CalcAgi, $destinationIvr = false)
412412
$sql = "SELECT * FROM pkg_sip WHERE sip_group = '" . $inst_listdestination['destination'] . "'";
413413
$modelSip = $agi->query($sql)->fetchAll(PDO::FETCH_OBJ);
414414
$agi->verbose("Call group $group ", 6);
415-
if (!isset($modelSip[0]->id)) {
415+
if ( ! isset($modelSip[0]->id)) {
416416
$answeredtime = 0;
417417
continue;
418418
}
@@ -424,7 +424,7 @@ public function call_did(&$agi, &$MAGNUS, &$CalcAgi, $destinationIvr = false)
424424
$group .= "SIP/" . $value->name . "&";
425425
}
426426

427-
$dialstr = substr($group, 0, -1) . $dialparams;
427+
$dialstr = substr($group, 0, -1);
428428

429429
$MAGNUS->startRecordCall($agi, $this->did, true);
430430

@@ -581,7 +581,7 @@ public function call_did(&$agi, &$MAGNUS, &$CalcAgi, $destinationIvr = false)
581581

582582
/* PERFORM THE CALL*/
583583
$result_callperf = $CalcAgi->sendCall($agi, $MAGNUS->destination, $MAGNUS);
584-
if (!$result_callperf) {
584+
if ( ! $result_callperf) {
585585
$prompt = "prepaid-callfollowme";
586586
$agi->verbose($prompt, 10);
587587
$agi->stream_file($prompt, '#');

0 commit comments

Comments
 (0)