@@ -20,11 +20,11 @@ |
||
20 | 20 | |
21 | 21 | protected function generateConfigProtected(): void |
22 | 22 | { |
23 | - $country = 'ru';//TODO:: Добавить в интерфейс если это важная опция |
|
23 | + $country = 'ru'; //TODO:: Добавить в интерфейс если это важная опция |
|
24 | 24 | $filePath = appPath('src/Core/Asterisk/Configs/Samples/indications.conf.sample'); |
25 | 25 | $data = file_get_contents($filePath); |
26 | 26 | $conf = str_replace('{country}', $country, $data); |
27 | - Util::fileWriteContent($this->config->path('asterisk.astetcdir') . '/indications.conf', $conf); |
|
27 | + Util::fileWriteContent($this->config->path('asterisk.astetcdir').'/indications.conf', $conf); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | } |
31 | 31 | \ No newline at end of file |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | $app_data = ''; |
65 | 65 | foreach ($arr_data_app as $row) { |
66 | 66 | if ('' === $app_data) { |
67 | - $app_data .= "exten => _{$app['extension']},$row" . "\n\t"; |
|
67 | + $app_data .= "exten => _{$app['extension']},$row"."\n\t"; |
|
68 | 68 | } else { |
69 | - $app_data .= "same => $row" . "\n\t"; |
|
69 | + $app_data .= "same => $row"."\n\t"; |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
@@ -81,13 +81,13 @@ discard block |
||
81 | 81 | private function generatePhpApp($app): string |
82 | 82 | { |
83 | 83 | $agiBinDir = $this->config->path('asterisk.astagidir'); |
84 | - $text_app = "#!/usr/bin/php\n"; |
|
85 | - $text_app .= base64_decode($app['applicationlogic']); |
|
84 | + $text_app = "#!/usr/bin/php\n"; |
|
85 | + $text_app .= base64_decode($app['applicationlogic']); |
|
86 | 86 | file_put_contents("{$agiBinDir}/{$app['uniqid']}.php", $text_app); |
87 | 87 | chmod("{$agiBinDir}/{$app['uniqid']}.php", 0755); |
88 | 88 | |
89 | - $result = 'exten => _' . $app['extension'] . ',1,ExecIf($["${CHANNEL(channeltype)}" == "Local"]?Gosub(set_orign_chan,s,1))' . "\n\t"; |
|
90 | - $result .= 'same => n,Gosub(dial_app,${EXTEN},1)' . "\n\t"; |
|
89 | + $result = 'exten => _'.$app['extension'].',1,ExecIf($["${CHANNEL(channeltype)}" == "Local"]?Gosub(set_orign_chan,s,1))'."\n\t"; |
|
90 | + $result .= 'same => n,Gosub(dial_app,${EXTEN},1)'."\n\t"; |
|
91 | 91 | $result .= "same => n,AGI({$app['uniqid']}.php)\n"; |
92 | 92 | |
93 | 93 | return $result; |
@@ -18,11 +18,11 @@ |
||
18 | 18 | |
19 | 19 | protected function generateConfigProtected(): void |
20 | 20 | { |
21 | - $conf = "[trunkgroups]\n" . |
|
22 | - "[channels]\n" . |
|
21 | + $conf = "[trunkgroups]\n". |
|
22 | + "[channels]\n". |
|
23 | 23 | ""; |
24 | 24 | |
25 | - file_put_contents($this->config->path('asterisk.astetcdir') . '/chan_dahdi.conf', $conf); |
|
25 | + file_put_contents($this->config->path('asterisk.astetcdir').'/chan_dahdi.conf', $conf); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | } |
29 | 29 | \ No newline at end of file |
@@ -19,6 +19,6 @@ |
||
19 | 19 | protected function generateConfigProtected(): void |
20 | 20 | { |
21 | 21 | $conf = ''; |
22 | - file_put_contents($this->config->path('asterisk.astetcdir') . '/udptl.conf', $conf); |
|
22 | + file_put_contents($this->config->path('asterisk.astetcdir').'/udptl.conf', $conf); |
|
23 | 23 | } |
24 | 24 | } |
25 | 25 | \ No newline at end of file |
@@ -18,10 +18,10 @@ |
||
18 | 18 | |
19 | 19 | protected function generateConfigProtected(): void |
20 | 20 | { |
21 | - $conf = "[general]\n" . |
|
21 | + $conf = "[general]\n". |
|
22 | 22 | "cc_max_requests = 20\n"; |
23 | 23 | |
24 | - file_put_contents($this->config->path('asterisk.astetcdir') . '/ccss.conf', $conf); |
|
24 | + file_put_contents($this->config->path('asterisk.astetcdir').'/ccss.conf', $conf); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | } |
28 | 28 | \ No newline at end of file |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function getSettings(): void |
26 | 26 | { |
27 | 27 | // Настройки для текущего класса. |
28 | - $this->data_peers = $this->getPeers(); |
|
28 | + $this->data_peers = $this->getPeers(); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $deny = (trim($peer['deny']) === '') ? '0.0.0.0/0.0.0.0' : $peer['deny']; |
62 | 62 | $permit = (trim($peer['permit']) === '') ? '0.0.0.0/0.0.0.0' : $peer['permit']; |
63 | 63 | |
64 | - $options = [ |
|
64 | + $options = [ |
|
65 | 65 | 'deny' => $deny, |
66 | 66 | 'permit' => $permit, |
67 | 67 | ]; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | } |
72 | 72 | |
73 | - Util::fileWriteContent($this->config->path('asterisk.astetcdir') . '/acl.conf', $conf_acl); |
|
73 | + Util::fileWriteContent($this->config->path('asterisk.astetcdir').'/acl.conf', $conf_acl); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 |
@@ -26,11 +26,11 @@ |
||
26 | 26 | $values .= "'\${CDR($value)}'"; |
27 | 27 | } |
28 | 28 | |
29 | - $conf = "[master]\n" . |
|
30 | - "table=cdr\n" . |
|
31 | - "columns => $cal \n" . |
|
29 | + $conf = "[master]\n". |
|
30 | + "table=cdr\n". |
|
31 | + "columns => $cal \n". |
|
32 | 32 | "values => $values \n"; |
33 | 33 | |
34 | - file_put_contents($this->config->path('asterisk.astetcdir') . "/cdr_sqlite3_custom.conf", $conf); |
|
34 | + file_put_contents($this->config->path('asterisk.astetcdir')."/cdr_sqlite3_custom.conf", $conf); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | \ No newline at end of file |
@@ -19,12 +19,12 @@ |
||
19 | 19 | |
20 | 20 | protected function generateConfigProtected(): void |
21 | 21 | { |
22 | - $mohpath = $this->config->path('asterisk.mohdir'); |
|
22 | + $mohpath = $this->config->path('asterisk.mohdir'); |
|
23 | 23 | |
24 | - $conf = "[default]\n" . |
|
25 | - "mode=files\n" . |
|
24 | + $conf = "[default]\n". |
|
25 | + "mode=files\n". |
|
26 | 26 | "directory=$mohpath\n\n"; |
27 | 27 | |
28 | - Util::fileWriteContent($this->config->path('asterisk.astetcdir') . '/musiconhold.conf', $conf); |
|
28 | + Util::fileWriteContent($this->config->path('asterisk.astetcdir').'/musiconhold.conf', $conf); |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | \ No newline at end of file |
@@ -21,11 +21,11 @@ |
||
21 | 21 | $cal = "eventtype, eventtime, cidname, cidnum, cidani, cidrdnis, ciddnid, context, exten, channame, appname, appdata, amaflags, accountcode, uniqueid, userfield, peer, userdeftype, eventextra, linkedid"; |
22 | 22 | $values = '\'${eventtype}\',\'${eventtime}\',\'${CALLERID(name)}\',\'${CALLERID(num)}\',\'${CALLERID(ANI)}\',\'${CALLERID(RDNIS)}\',\'${CALLERID(DNID)}\',\'${CHANNEL(context)}\',\'${CHANNEL(exten)}\',\'${CHANNEL(channame)}\',\'${CHANNEL(appname)}\',\'${CHANNEL(appdata)}\',\'${CHANNEL(amaflags)}\',\'${CHANNEL(accountcode)}\',\'${CHANNEL(uniqueid)}\',\'${CHANNEL(userfield)}\',\'${BRIDGEPEER}\',\'${userdeftype}\',\'${eventextra}\',\'${CHANNEL(linkedid)}\''; |
23 | 23 | |
24 | - $conf = "[master]\n" . |
|
25 | - "table = cel\n" . |
|
26 | - "columns => $cal \n" . |
|
24 | + $conf = "[master]\n". |
|
25 | + "table = cel\n". |
|
26 | + "columns => $cal \n". |
|
27 | 27 | "values => $values \n"; |
28 | 28 | |
29 | - file_put_contents($this->config->path('asterisk.astetcdir') . "/cel_sqlite3_custom.conf", $conf); |
|
29 | + file_put_contents($this->config->path('asterisk.astetcdir')."/cel_sqlite3_custom.conf", $conf); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | \ No newline at end of file |