/l3/users/2014-11-nt-voip/nt-voip/debian6/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#vim /var/tmp/hello-en.txt
--- /dev/null 2014-11-26 15:06:50.581666140 +0200 +++ /var/tmp/hello-en.txt 2014-11-27 09:51:52.906620052 +0200 @@ -0,0 +1,4 @@ +fconfig is used to configure the kernel-resident network interfaces. It is used at boot + time to set up interfaces as necessary. After that, it is usually only needed when + debugging or when system tuning is needed. + |
#vim /var/tmp/hello-ru.txt
--- /dev/null 2014-11-26 15:06:50.581666140 +0200 +++ /var/tmp/hello-ru.txt 2014-11-27 09:52:43.662620018 +0200 @@ -0,0 +1 @@ +Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой. |
#cat /var/tmp/hello-en.txt
fconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed. |
#cat /var/tmp/hello-ru.txt
Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой. |
#vim /var/tmp/hello-ru.txt
--- /tmp/l3-saved-3572.25084.14384 2014-11-27 09:53:03.778620004 +0200 +++ /var/tmp/hello-ru.txt 2014-11-27 09:53:20.918619995 +0200 @@ -1 +1 @@ -Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой. +Приветсвую тебя о темнейший. Я фестиваль и я пришел за тобой. |
#cat /var/tmp/hello-ru.txt | text2wave > /tmp/hello-ru.wav
|
#cat /var/tmp/hello-en.txt | text2wave > /tmp/hello-en.wav
|
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 44 Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] Clip:0 Done. |
#play /tmp/hello-en.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-en.wav: File Size: 465k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:14.53 In:59.9% 00:00:08.70 [00:00:05.83] Out:139k [-=====|=====-] Hd:0.3 Clip:0 Aborted. |
#play /tmp/hello-en.wav
ru play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 167k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:05.22 In:100% 00:00:05.22 [00:00:00.00] Out:83.5k [ | ] Hd:3.7 Clip:0 Done. |
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 167k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:05.22 In:100% 00:00:05.22 [00:00:00.00] Out:83.5k [ | ] Hd:3.7 Clip:0 Done. |
#play /tmp/hello-ru.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/hello-ru.wav: File Size: 167k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:05.22 In:100% 00:00:05.22 [00:00:00.00] Out:83.5k [ | ] Hd:3.7 Clip:0 Done. |
#cd /var/tmp
|
#ls
asterisk belki.txt burunduki.txt hello-en.txt hello-ru.txt |
#ls
play /tmp/belki.wav play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/belki.wav: File Size: 9.44M Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:04:55.03 In:10.6% 00:00:31.23 [00:04:23.80] Out:500k [ -====|====- ] Hd:5.4 Clip:0 Aborted. |
#play /tmp/belki.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/belki.wav: File Size: 9.44M Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:04:55.03 In:1.21% 00:00:03.58 [00:04:51.45] Out:57.3k [ =====|===== ] Hd:5.1 Clip:0 Aborted. |
#play /tmp/burunduki.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/burunduki.wav: File Size: 10.8M Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:05:36.46 In:6.24% 00:00:20.99 [00:05:15.47] Out:336k [ =====|===== ] Hd:5.6 Clip:0 Aborted. |
#ls /usr/lib/asterisk/modules/ | grep fest
app_festival.so |
#apt-get install libasterisk-agi-perl
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: libasterisk-agi-perl 0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded. Need to get 42.2 kB of archives. After this operation, 160 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main libasterisk-agi-perl all 1.01-2 [42.2 kB] Fetched 42.2 kB in 0s (3,166 kB/s) Selecting previously unselected package libasterisk-agi-perl. (Reading database ... 147104 files and directories currently installed.) Unpacking libasterisk-agi-perl (from .../libasterisk-agi-perl_1.01-2_all.deb) ... Processing triggers for man-db ... Setting up libasterisk-agi-perl (1.01-2) ... |
#mkdir /var/lib/asterisk/sounds/tts
|
#chown asterisk:asterisk /var/lib/asterisk/sounds/tts
|
#/usr/local/bin/asterisk-festival.pl ДПривет Темнейший
^C |
#/usr/local/bin/asterisk-festival.pl Привет Темнейший
EXEC Playback "/var/lib/asterisk/sounds/tts/tts-2eae0f7017eebeff26b514599666b652" ^C |
#/usr/local/bin/дÑls -l /var/lib/asterisk/sounds/tts/tts-2eae0f7017eebeff26b514599666b652.wav
-rw-r--r-- 1 root root 25086 Nov 27 10:20 /var/lib/asterisk/sounds/tts/tts-2eae0f7017eebeff26b514599666b652.wav |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3572.10559.1536 2014-11-27 10:22:08.354618841 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 10:24:08.282618762 +0200 @@ -21,6 +21,9 @@ exten => 8302,1,System( sudo /etc/init.d/sendmail restart) +exten => 8403,1,AGI(/usr/local/bin/asterisk-festival.pl /var/tmp/belki.txt) +exten => 8404,1,AGI(/usr/local/bin/asterisk-festival.pl /var/tmp/burunduki.txt) + ; conference exten => _801X,1,MeetMe(10${EXTEN:3}) |
#asterisk -rx "dialplan reload"
Dialplan reloaded. |
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 2475) Verbosity is at least 2 == Using SIP RTP CoS mark 5 [Nov 27 10:27:52] WARNING[10853]: res_agi.c:1621 launch_script: Failed to execute '/usr/local/bin/asterisk-festival.pl /var/tmp/burunduki.txt': File does not exist. debian6*CLI> Disconnected from Asterisk server |
#ls -l /usr/дщlocal/bin/asterisk-festival.pl
-rwxr-xr-x 1 root staff 702 Nov 27 10:06 /usr/local/bin/asterisk-festival.pl |
#chown asterisk:asterisk /usr/local/bin/asterisk-festival.pl
|
#xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 VGA1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm 1920x1080 60.0*+ 1680x1050 60.0 1280x1024 75.0 60.0 1440x900 59.9 1280x960 60.0 1280x720 60.0 1024x768 75.1 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 640x480 72.8 75.0 66.7 60.0 720x400 70.1 HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) HDMI3 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis) |
#grep Record /etc/asterisk/extensions.conf
exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm,3) |
#ls -l /var/tmp/asterisk/
total 8 -rw-rw---- 1 asterisk asterisk 7854 Nov 27 11:39 record01.gsm |
#ls -l /var/tmp/asterisk/
total 44 -rw-rw---- 1 asterisk asterisk 7854 Nov 27 11:39 record01.gsm -rw-rw---- 1 asterisk asterisk 32241 Nov 27 11:45 record02.gsm -rw-rw---- 1 asterisk asterisk 3597 Nov 27 11:44 record03.gsm |
#ls -l /var/tmp/asterisk/
total 52 -rw-rw---- 1 asterisk asterisk 7854 Nov 27 11:39 record01.gsm -rw-rw---- 1 asterisk asterisk 32241 Nov 27 11:45 record02.gsm -rw-rw---- 1 asterisk asterisk 3597 Nov 27 11:44 record03.gsm -rw-rw---- 1 asterisk asterisk 7029 Nov 27 11:45 record04.gsm |
#ls -l /var/tmp/asterisk/
total 60 -rw-rw---- 1 asterisk asterisk 7854 Nov 27 11:39 record01.gsm -rw-rw---- 1 asterisk asterisk 32241 Nov 27 11:45 record02.gsm -rw-rw---- 1 asterisk asterisk 3597 Nov 27 11:44 record03.gsm -rw-rw---- 1 asterisk asterisk 7029 Nov 27 11:45 record04.gsm -rw-rw---- 1 asterisk asterisk 3135 Nov 27 11:46 record05.gsm -rw-rw---- 1 asterisk asterisk 3201 Nov 27 11:46 record06.gsm |
#ls -l /var/tmp/asterisk/
total 76 -rw-rw---- 1 asterisk asterisk 7854 Nov 27 11:39 record01.gsm -rw-rw---- 1 asterisk asterisk 32241 Nov 27 11:45 record02.gsm -rw-rw---- 1 asterisk asterisk 3597 Nov 27 11:44 record03.gsm -rw-rw---- 1 asterisk asterisk 7029 Nov 27 11:45 record04.gsm -rw-rw---- 1 asterisk asterisk 3135 Nov 27 11:46 record05.gsm -rw-rw---- 1 asterisk asterisk 3201 Nov 27 11:46 record06.gsm -rw-rw---- 1 asterisk asterisk 2541 Nov 27 11:47 record07.gsm -rw-rw---- 1 asterisk asterisk 1584 Nov 27 11:47 record08.gsm -rw-rw---- 1 asterisk asterisk 1452 Nov 27 11:47 record09.gsm -rw-rw---- 1 asterisk asterisk 2178 Nov 27 11:47 record10.gsm |
#[ ]
exten => 2,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/burunduki.txt) ;input # zakazckground(/var/tmp/asterisk/record04) exten => 3,1,Playback(/var/tmp/asterisk/record05) exten => 3,n,Read(ORDER) exten => 3,n,Playback(/var/tmp/asterisk/record07) (ORDER) exten => 3,n,Playback(/var/tmp/asterisk/record10) ; if pressed4 goto operator exten => 4,1,Queue(queuq1) ; goto support 3 way coordinates ;context,extension,label exten => 0,1,Goto(s,start) ; wrong choice ; i = invalid (extension) exten => i,1,Playback(/var/tmp/asterisk/record06) exten => i,n,WaitExten(2) (2) exten => i,n,Goto(s,start) ( ) "/etc/asterisk/extensions.conf" 143L, 3180C written |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3572.17770.25920 2014-11-27 12:20:56.266614097 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 12:27:45.090613819 +0200 @@ -10,7 +10,7 @@ exten => s,1,Answer exten => s,n,Background(/var/tmp/asterisk/record01) exten => s,n,WaitExten(1) -exten => s,n,Background(/var/tmp/asterisk/record02) +exten => s,n(start),Background(/var/tmp/asterisk/record02) exten => s,n,WaitExten(3) exten => s,n,Background(/var/tmp/asterisk/record03) exten => s,n,WaitExten(3) @@ -24,12 +24,12 @@ exten => 3,1,Playback(/var/tmp/asterisk/record05) exten => 3,n,Read(ORDER) exten => 3,n,Playback(/var/tmp/asterisk/record07) -exten => 3,n,Read(ORDER) +exten => 3,n,SayDigits(${ORDER}) exten => 3,n,Playback(/var/tmp/asterisk/record10) ; if pressed4 goto operator -exten => 4,1,Queue(queuq1) +exten => 4,1,Queue(queue1) ; goto support 3 way coordinates ;context,extension,label @@ -75,6 +75,10 @@ exten => _801X,1,MeetMe(10${EXTEN:3}) +; IVR + +exten => 8405,1,Goto(menu,s,1) + include => parkedcalls [local] |
#asterisk -rx "dialplan reload"
Dialplan reloaded. |
#vim /usr/local/bin/asterisk-festival.pl
|
#~
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 2475) ... No such command 'database ' (type 'core show help database' for other possible commands) debian6*CLI> database put example a 10 Updated database successfully debian6*CLI> database get example a Value: 10 debian6*CLI> database del example a Database entry removed. debian6*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#феasterisk -rx "databes put order 1 9"
No such command 'databes put order 1 9' (type 'core show help databes put' for other possible commands) |
#asterisk -rx "database put order 1 9"
Updated database successfully |
#asterisk -rx "database put order 2 10"
Updated database successfully |
#{
'seq 3 20' |
#asterisk -rx "database put order 2 10"
[menu]asterisk/extensions.conf" 147L, 3234C [menu] exten => 1,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/belki.txt) exten => 2,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/burunduki.txt) ;input # zakaz exten => 3,1,Playback(/var/tmp/asterisk/record05) exten => 3,n,Read(ORDER) exten => 3,n,Playback(/var/tmp/asterisk/record07) exten => 3,n,SayDigits(${ORDER}) exten => 3,n,Playback(/var/tmp/asterisk/record10) ; if pressed4 goto operator exten => 4,1,Queue(qk(ue1) d${DB(order/${ORDER})}) ; goto support 3 way coordinates "/etc/asterisk/extensions.conf" 148L, 3254C written |
#asterisk -rx "dialplan reload"
Dialplan reloaded. |
#{
'seq 3 20' |
#asterisk -rx "database put order 2 10"
asterisk -rvvv Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 2475) Verbosity is at least 3 debian6*CLI> da dahdi data database debian6*CLI> data data database debian6*CLI> database Disconnected from Asterisk server Executing last minute cleanups |
#for i in `seq 1 20`; do asterisk -rx "database get order $i" ; done
Value: 9 Value: 10 Value: 10 Value: 10 Value: 10 Value: 9 Value: 10 Value: 10 Value: 10 Value: 9 Value: 10 Value: 9 Value: 9 Value: 10 Value: 10 Value: 9 Value: 10 Value: 9 Value: 10 Value: 9 |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3572.15690.8596 2014-11-27 14:13:45.322609583 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 14:16:12.690609482 +0200 @@ -26,8 +26,12 @@ exten => 3,n,Playback(/var/tmp/asterisk/record07) exten => 3,n,SayDigits(${ORDER}) +; work with db +exten => 3,n,GotoIf($["${DB(order/${ORDER})}" = ""]?unknown_order) exten => 3,n,Playback(/var/tmp/asterisk/record${DB(order/${ORDER})}) +exten => 3,n,Hangup +exten => 3,n(unknown_order),Playback(/var/tmp/asterisk/record10) ; if pressed4 goto operator exten => 4,1,Queue(queue1) |
#сls /var/tmp/asterisk/
record01.gsm record03.gsm record05.gsm record07.gsm record09.gsm record02.gsm record04.gsm record06.gsm record08.gsm record10.gsm |
#cp record09.gsm record9.gsm
cp: cannot stat `record09.gsm': No such file or directory |
#cd /var/tmp/asterisk/
|
#cp record09.gsm record9.gsm
|
#play record9.gsm
play WARN alsa: can't encode 0-bit Unknown or not applicable record9.gsm: File Size: 1.45k Encoding: GSM Channels: 1 @ 16-bit Samplerate: 8000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.88 [00:00:00.00] Out:7.04k [ -====|====- ] Clip:0 Done. |
#play record9.gsm
play WARN alsa: can't encode 0-bit Unknown or not applicable record9.gsm: File Size: 1.45k Encoding: GSM Channels: 1 @ 16-bit Samplerate: 8000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.88 [00:00:00.00] Out:7.04k [ -====|====- ] Clip:0 Done. |
#ls
record01.gsm record03.gsm record05.gsm record07.gsm record09.gsm record9.gsm record02.gsm record04.gsm record06.gsm record08.gsm record10.gsm |
#pwd
/var/tmp/asterisk |
#ls -l
total 80 -rw-rw---- 1 asterisk asterisk 7854 Nov 27 11:39 record01.gsm -rw-rw---- 1 asterisk asterisk 32241 Nov 27 11:45 record02.gsm -rw-rw---- 1 asterisk asterisk 3597 Nov 27 11:44 record03.gsm -rw-rw---- 1 asterisk asterisk 7029 Nov 27 11:45 record04.gsm -rw-rw---- 1 asterisk asterisk 3135 Nov 27 11:46 record05.gsm -rw-rw---- 1 asterisk asterisk 3201 Nov 27 11:46 record06.gsm -rw-rw---- 1 asterisk asterisk 2541 Nov 27 11:47 record07.gsm -rw-rw---- 1 asterisk asterisk 1584 Nov 27 11:47 record08.gsm -rw-rw---- 1 asterisk asterisk 1452 Nov 27 11:47 record09.gsm -rw-rw---- 1 asterisk asterisk 2178 Nov 27 11:47 record10.gsm -rw-r----- 1 root root 1452 Nov 27 14:22 record9.gsm |
## Ñайл недоÑÑÑпен ÐÐ´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ asterisk'Ñ
|
## а вот если бы добавили 0, всё бы работало бы :)
|
#chown asterisk:asterisk record9.gsm
|
#сcp -p record06.gsm record66.gsm
|
#ls -l
total 84 -rw-rw---- 1 asterisk asterisk 7854 Nov 27 11:39 record01.gsm -rw-rw---- 1 asterisk asterisk 32241 Nov 27 11:45 record02.gsm -rw-rw---- 1 asterisk asterisk 3597 Nov 27 11:44 record03.gsm -rw-rw---- 1 asterisk asterisk 7029 Nov 27 11:45 record04.gsm -rw-rw---- 1 asterisk asterisk 3135 Nov 27 11:46 record05.gsm -rw-rw---- 1 asterisk asterisk 3201 Nov 27 11:46 record06.gsm -rw-rw---- 1 asterisk asterisk 2541 Nov 27 11:47 record07.gsm -rw-rw---- 1 asterisk asterisk 1584 Nov 27 11:47 record08.gsm -rw-rw---- 1 asterisk asterisk 1452 Nov 27 11:47 record09.gsm -rw-rw---- 1 asterisk asterisk 2178 Nov 27 11:47 record10.gsm -rw-rw---- 1 asterisk asterisk 3201 Nov 27 11:46 record66.gsm -rw-r----- 1 asterisk asterisk 1452 Nov 27 14:22 record9.gsm |
## правильно
|
#ââ# и ÑаÑе иÑполÑзÑйе tab
|
## это вещь
|
## ÑÐºÐ¾Ð½Ð¾Ð¼Ð¸Ñ ÐºÑÑÑ ÐвÑемени
|
#~
[general] ; ; Global settings for call queues "/etc/asterisk/queues.conf" 537L, 23843C ; leastrecent - ring interface which was least recently hung up by this queue ; fewestcalls - ring the one with fewest completed calls from this queue ; random - ring random interface ; rrmemory - round robin with memory, remember where we left off last ring pass ; rrordered - same as rrmemory, except the queue member order from config file ; is preserved ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/queues.conf" 537L, 23860C written |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-3572.793.8673 2014-11-27 14:57:14.618607844 +0200 +++ /etc/asterisk/queues.conf 2014-11-27 14:57:38.838607828 +0200 @@ -532,6 +532,6 @@ ;member => Agent/@1 ; Any agent in group 1 ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty -[queque1] +[queue1] member => SIP/2301 |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-3572.29048.19011 2014-11-27 14:58:18.958607802 +0200 +++ /etc/asterisk/queues.conf 2014-11-27 14:58:55.734607777 +0200 @@ -532,6 +532,5 @@ ;member => Agent/@1 ; Any agent in group 1 ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty -[queue1] - +[queque1] member => SIP/2301 |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-3572.12756.13181 2014-11-27 14:59:14.398607765 +0200 +++ /etc/asterisk/queues.conf 2014-11-27 14:59:32.086607753 +0200 @@ -532,5 +532,5 @@ ;member => Agent/@1 ; Any agent in group 1 ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty -[queque1] +[queue1] member => SIP/2301 |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-3572.237.1974 2014-11-27 15:00:58.374607695 +0200 +++ /etc/asterisk/queues.conf 2014-11-27 15:01:38.930607667 +0200 @@ -533,4 +533,5 @@ ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty [queue1] -member => SIP/2301 +#member => SIP/2301 +member => Agent/007 |
#vim /etc/asterisk/agents.conf
--- /tmp/l3-saved-3572.4305.20734 2014-11-27 15:02:37.014607629 +0200 +++ /etc/asterisk/agents.conf 2014-11-27 15:05:15.850607524 +0200 @@ -103,3 +103,6 @@ ; ;agent => 1001,4321,Mark Spencer ;agent => 1002,4321,Will Meadows + +; number agent , agent password, name +agent => 007,1234,James Bond |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3572.32452.16541 2014-11-27 15:05:33.534607512 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 15:10:04.390607330 +0200 @@ -84,6 +84,10 @@ exten => 8405,1,Goto(menu,s,1) +exten => 8407,1,Agentlogin(007) + + + include => parkedcalls [local] |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#less /var/log/asterisk/messages
|
#less /var/log/asterisk/messages | grep queue
[Nov 27 12:31:40] WARNING[11528] app_queue.c: Unable to join queue 'queue1' [Nov 27 15:10:32] WARNING[13050] config.c: parse error: No category context for line 8 of /etc/asterisk/queues.conf [Nov 27 15:10:32] ERROR[13050] app_queue.c: Config file queues.conf is in an invalid format. Aborting. [Nov 27 15:21:54] WARNING[13240] config.c: parse error: No category context for line 8 of /etc/asterisk/queues.conf [Nov 27 15:21:54] ERROR[13240] app_queue.c: Config file queues.conf is in an invalid format. Aborting. [Nov 27 15:25:51] WARNING[13445] config.c: parse error: No category context for line 8 of /etc/asterisk/queues.conf [Nov 27 15:25:51] ERROR[13445] app_queue.c: Config file queues.conf is in an invalid format. Aborting. |
#/etc/asterisk/queues.conf 8,1 0%
|
#less /etc/asterisk/queues.conf
|
#vim /etc/asterisk/queues.conf
|
#; queue by using the same configuration parameter within a queue
; Global settings for call queues ; ; Persistent Members ; Store each dynamic member in each queue in the astdb so that ; when asterisk is restarted, each member will be automatically ; read into their recorded queues. Default is 'yes'. ; persistentmembers = yes ; ; AutoFill Behavior |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-3572.16761.10335 2014-11-27 15:38:59.318606176 +0200 +++ /etc/asterisk/queues.conf 2014-11-27 15:39:03.154606173 +0200 @@ -1,3 +1,4 @@ +[general] ; Global settings for call queues ; ; Persistent Members |
#cat > /tmp/call.call
Context: internal Channel: SIP/2301 Extension: 8405 ^C |
#more /tmp/call.call
|
#chown asterisk:asterisk /tmp/call.call
|
#cp -p /tmp/call.call /var/spool/asterisk/outgoing/
|
#scp 192.168.20.1:/usr/local/bin/call-call
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 |
#scp user@192.168.20.1:/usr/local/bin/call-call
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 |
#scp user@192.168.20.1:/usr/local/bin/call-call /usr/local/bin/call-call
The authenticity of host '192.168.20.1 (192.168.20.1)' can't be established. ECDSA key fingerprint is 33:06:01:89:bf:6b:a8:4c:14:d9:44:fa:dc:8c:92:6f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.20.1' (ECDSA) to the list of known hosts. user@192.168.20.1's password: scp: /usr/local/bin/call-call: No such file or directory |
#scp user@192.168.20.1:/usr/local/bin/call-call call-call
user@192.168.20.1's password: scp: /usr/local/bin/call-call: No such file or directory |
#more /etc/asterisk/sip.conf
|
#свcd /usr/local/bin/
|
fconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed.
Приветсвую тебя о тенейший. Я фестиваль и я пришел за тобой.
Время первой команды журнала | 08:51:36 2014-11-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:26:10 2014-11-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 6.93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.45 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008