Skip to content

Commit fa71f72

Browse files
author
magnussolution
committed
add REGEX to block callerid on Trunk
1 parent 01b8d79 commit fa71f72

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

build/MagnusBilling-current.tar.gz

-324 Bytes
Binary file not shown.

classic/src/view/trunk/Form.js

+5
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ Ext.define('MBilling.view.trunk.Form', {
187187
fieldLabel: t('CID') + ' ' + t('Remove prefix'),
188188
allowBlank: true,
189189
value: ''
190+
}, {
191+
name: 'block_cid',
192+
fieldLabel: t('Block CID REGEX'),
193+
hidden: !window.dialC || !App.user.isAdmin,
194+
allowBlank: true
190195
}, {
191196
name: 'context',
192197
fieldLabel: t('Context'),

protected/commands/UpdateMysqlCommand.php

+9
Original file line numberDiff line numberDiff line change
@@ -1950,6 +1950,15 @@ public function run($args)
19501950
$version = '7.8.4.0';
19511951
$this->update($version);
19521952
}
1953+
1954+
//2023-07-26
1955+
if ($version == '7.8.4.0') {
1956+
$sql = "ALTER TABLE pkg_trunk ADD block_cid VARCHAR(120) NOT NULL DEFAULT '' ;";
1957+
$this->executeDB($sql);
1958+
1959+
$version = '7.8.4.1';
1960+
$this->update($version);
1961+
}
19531962
}
19541963

19551964
public function executeDB($sql)

protected/commands/clear_logs.sh

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cd /var/log
55
rm -rf *202*
66
rm -rf asterisk/*202*
77
rm -rf httpd/*202*
8+
rm -rf apache2/*202*
89
rm -rf asterisk/messages.*
910
rm -rf /var/www/html/mbilling/protected/runtime/*.log.*
1011

@@ -25,3 +26,9 @@ echo '' > /var/log/httpd/deflate_log
2526
echo '' > /var/log/httpd/ssl_access_log
2627
echo '' > /var/log/httpd/ssl_error_log
2728
echo '' > /var/log/httpd/ssl_request_log
29+
echo '' > /var/log/apache2/access_log
30+
echo '' > /var/log/apache2/error_log
31+
echo '' > /var/log/apache2/deflate_log
32+
echo '' > /var/log/apache2/ssl_access_log
33+
echo '' > /var/log/apache2/ssl_error_log
34+
echo '' > /var/log/apache2/ssl_request_log

protected/models/Trunk.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function rules()
6161
array('nat, trunkcode, sms_res', 'length', 'max' => 50),
6262
array('trunkprefix, providertech, removeprefix, context, insecure, disallow', 'length', 'max' => 20),
6363
array('providerip, user,fromuser, allow, host, fromdomain', 'length', 'max' => 80),
64-
array('addparameter', 'length', 'max' => 120),
64+
array('addparameter, block_cid', 'length', 'max' => 120),
6565
array('link_sms', 'length', 'max' => 250),
6666
array('dtmfmode, qualify', 'length', 'max' => 7),
6767
array('directmedia,sendrpid', 'length', 'max' => 10),

0 commit comments

Comments
 (0)