/l3/users/Illia-fuck2you/voip-lab-11-2013/linux1.unix.nt/root :1 :2 :3 :4 |
|
#play /var/spool/asterisk/monitor/
No protocol specified xcb_connection_has_error() returned true play WARN alsa: can't encode 0-bit Unknown or not applicable play FAIL formats: can't determine type of file `/var/spool/asterisk/monitor/' |
#apt-get install mutt
Reading package lists... Done Building dependency tree Reading state information... Done mutt is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#nano /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-29432.22869.31539 2013-11-19 15:43:33.233434657 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 15:43:45.501434495 +0200 @@ -16,10 +16,10 @@ ;exten => _2XXX,n,Monitor(wav,${MON_FILE},m) ;exten => _2XXX,1,Monitor(wav,123,m) -exten => _2XXX,1,Answer | -exten => _2XXX,n,Set(MON_FILE=${EXTEN}-${CALLERID(num)}-${EPOCH}) | -exten => _2XXX,n,Monitor(wav,${MON_FILE},m) | -exten => _2XXX,n,Dial(SIP/${EXTEN},5) | +exten => _2XXX,1,Answer +exten => _2XXX,n,Set(MON_FILE=${EXTEN}-${CALLERID(num)}-${EPOCH}) +exten => _2XXX,n,Monitor(wav,${MON_FILE},m) +exten => _2XXX,n,Dial(SIP/${EXTEN},5) exten => _2XXX,n,Voicemail(${EXTEN}@default) exten => _3XXX,1,Dial(SIP/ottawa/${EXTEN}) |
#nano /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-29432.32687.31894 2013-11-19 15:47:14.381431695 +0200 +++ /etc/asterisk/voicemail.conf 2013-11-19 15:48:09.897430953 +0200 @@ -382,6 +382,7 @@ [default] 1234 => 4242,Example Mailbox,root@localhost +2111 => 1234,User 1,user@localhost ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net ;4310 => -5432,Sales,sales@marko.net |
#apt-get install asterisk-core-sounds-ru
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-core-sounds-ru-gsm The following NEW packages will be installed: asterisk-core-sounds-ru asterisk-core-sounds-ru-gsm 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 2,078 kB of archives. After this operation, 2,263 kB of additional disk space will be used. ... Fetched 2,078 kB in 0s (35.4 MB/s) Selecting previously unselected package asterisk-core-sounds-ru-gsm. (Reading database ... 132203 files and directories currently installed.) Unpacking asterisk-core-sounds-ru-gsm (from .../asterisk-core-sounds-ru-gsm_1.4.22-1_all.deb) ... Selecting previously unselected package asterisk-core-sounds-ru. Unpacking asterisk-core-sounds-ru (from .../asterisk-core-sounds-ru_1.4.22-1_all.deb) ... Setting up asterisk-core-sounds-ru-gsm (1.4.22-1) ... Setting up asterisk-core-sounds-ru (1.4.22-1) ... update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru (asterisk-prompt-ru) in auto mode update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru_RU (asterisk-prompt-ru-ru) in auto mode |
#rasterisk -vvvvvvvv
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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~dfsg-3+deb7u1 currently running on linux1 (pid = 28179) ... [Nov 19 15:53:57] WARNING[31665]: app_voicemail.c:9799 vm_authenticate: Couldn't read username == Using SIP RTP CoS mark 5 -- Executing [8100@default:1] VoiceMailMain("SIP/1101-0000004f", "") in new stack -- <SIP/1101-0000004f> Playing 'vm-login.gsm' (language 'en') -- <SIP/1101-0000004f> Playing 'vm-password.gsm' (language 'en') -- Incorrect password '' for user '1101' (context = default) -- <SIP/1101-0000004f> Playing 'vm-incorrect-mailbox.gsm' (language 'en') linux1*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/sip.conf
|
#apt-get install dahdi-source
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dahdi-linux fxload The following NEW packages will be installed: dahdi-linux dahdi-source fxload 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 1,014 kB of archives. After this operation, 1,357 kB of additional disk space will be used. ... (Reading database ... 132672 files and directories currently installed.) Unpacking fxload (from .../fxload_0.0.20081013-1_amd64.deb) ... Selecting previously unselected package dahdi-linux. Unpacking dahdi-linux (from .../dahdi-linux_1%3a2.6.1+dfsg2-1_all.deb) ... Selecting previously unselected package dahdi-source. Unpacking dahdi-source (from .../dahdi-source_1%3a2.6.1+dfsg2-1_all.deb) ... Processing triggers for man-db ... Setting up fxload (0.0.20081013-1) ... Setting up dahdi-linux (1:2.6.1+dfsg2-1) ... Setting up dahdi-source (1:2.6.1+dfsg2-1) ... |
#m-a a-i dahdi
┌────────────────────┤ Updating cached package data ├─────────────────────┐ │ Reading apt-cache output... │ │ │ │ │ │ 100% │ │ │ └─────────────────────────────────────────────────────────────────────────┘ Updated infos about 1 packages unpack Extracting the package tarball, /usr/src/dahdi.tar.bz2, please wait... "/usr/share/modass/packages/default.sh" build KVERS=3.2.0-4-amd64 KSRC=/lib/modules/3.2.0-4-amd64/build KDREV=3.2.51-1 kdist_image |
#modprobe dahdi
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-29432.373.19955 2013-11-19 16:55:10.529377086 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 16:55:18.573376977 +0200 @@ -29,4 +29,4 @@ exten => 8000,n,Playback(/var/tmp/asterisk/records/record00) exten => 8100,1,VoiceMailMain() -exten => 8101,1,MeetMe() +exten => 8101,1,MeetMe(101) |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#cd
|
#locate metme.so
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory |
#locate metme.so
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory |
#rasterisk -vvvvvvvv
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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~dfsg-3+deb7u1 currently running on linux1 (pid = 4107) Verbosity is at least 8 == Using SIP RTP CoS mark 5 [Nov 19 16:59:09] WARNING[4196]: pbx.c:4218 pbx_extension_helper: No application 'MeetMe' for extension (default, 8101, 1) == Spawn extension (default, 8101, 1) exited non-zero on 'SIP/1101-00000001' > Saved useragent "Cisco-CP7912/8.0.1-060412A" for peer 1101 > Saved useragent "Zoiper for Windows 2.39 r16838" for peer 1102 linux1*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#apt-get install mpg123
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libmpg123-0 Suggested packages: alsa-utils jackd nas oss-compat oss4-base The following NEW packages will be installed: libmpg123-0 mpg123 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 318 kB of archives. After this operation, 723 kB of additional disk space will be used. Do you want to continue [Y/n]? <Y Abort. |
#apt-get install mpg123
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libmpg123-0 Suggested packages: alsa-utils jackd nas oss-compat oss4-base The following NEW packages will be installed: libmpg123-0 mpg123 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... (Reading database ... 141827 files and directories currently installed.) Unpacking libmpg123-0:amd64 (from .../libmpg123-0_1.14.4-1_amd64.deb) ... Selecting previously unselected package mpg123. Unpacking mpg123 (from .../mpg123_1.14.4-1_amd64.deb) ... Processing triggers for man-db ... Processing triggers for mime-support ... Setting up libmpg123-0:amd64 (1.14.4-1) ... Setting up mpg123 (1.14.4-1) ... update-alternatives: using /usr/bin/mpg123.bin to provide /usr/bin/mpg123 (mpg123) in auto mode update-alternatives: using /usr/bin/mpg123.bin to provide /usr/bin/mp3-decoder (mp3-decoder) in auto mode |
#mpg123 -w /tmp/scorp.wav /home/user/Downloads/scorpions_-
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 version 1.14.4; written and copyright by Michael Hipp and others free software (LGPL/GPL) without any warranty but with best wishes [readers.c:1182] error: Cannot open file /home/user/Downloads/scorpions_-: No such file or directory [mpg123.c:629] error: Cannot open /home/user/Downloads/scorpions_-: File access error. (code 22) |
#_still_loving_you_\(zaycev.net\).mp3
l3script: _still_loving_you_(zaycev.net).mp3: command not found |
#mpg123 -w /tmp/scorp.wav /home/user/Downloads/scorpions_-
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 version 1.14.4; written and copyright by Michael Hipp and others free software (LGPL/GPL) without any warranty but with best wishes [readers.c:1182] error: Cannot open file /home/user/Downloads/scorpions_-: No such file or directory [mpg123.c:629] error: Cannot open /home/user/Downloads/scorpions_-: File access error. (code 22) |
#sox -t wav /tmp/scorp.wav -r8000 -c1 -t gsm /tmp/scorp.gs
|
#sox -t wav /tmp/scorp.wav -r8000 -c1 -t gsm /tmp/woll.gsm resample
sox FAIL formats: can't open input file `/tmp/woll.gsm': No such file or directory |
#cd /tmp/
|
#ls-l
l3script: ls-l: command not found |
#ls -l
total 40368 -rw------- 1 user user 524 Nov 19 17:18 gnash-cookies.5qxDmo -rw------- 1 user user 1278 Nov 19 17:20 gnash-cookies.C6zFKo -rw------- 1 user user 467 Nov 19 17:17 gnash-cookies.hIxrXg -rw------- 1 user user 1282 Nov 19 17:20 gnash-cookies.vuVsGz -rw------- 1 user user 1282 Nov 19 17:20 gnash-cookies.z8Q7RN drwxr-xr-x 2 root root 4096 Nov 18 13:40 hsperfdata_root -rw-r--r-- 1 root root 5281 Nov 18 14:13 install drwx------ 2 root root 4096 Nov 19 09:46 libgksu-f3eZ1v drwx------ 2 root root 4096 Nov 18 13:12 mc-root drwx------ 2 user user 4096 Jan 1 1970 orbit-user drwx------ 2 user user 4096 Nov 19 09:37 pulse-nuOdMqjwEN22 drwx------ 2 root root 4096 Nov 19 14:53 pulse-PKdhtXMmr18n drwx------ 2 Debian-gdm Debian-gdm 4096 Nov 19 09:38 pulse-t9upJ4g7YdpD -rw-r--r-- 1 root root 382404 Nov 19 17:27 scorp.gs -rw-r--r-- 1 root root 40882220 Nov 19 17:25 scorp.wav drwx------ 2 user user 4096 Nov 19 09:37 ssh-WOuTk69PHErH drwxr-xr-x 2 user user 4096 Nov 18 13:44 tracker-user |
#ls -l
total 39992 -rw------- 1 user user 524 Nov 19 17:18 gnash-cookies.5qxDmo -rw------- 1 user user 1278 Nov 19 17:20 gnash-cookies.C6zFKo -rw------- 1 user user 467 Nov 19 17:17 gnash-cookies.hIxrXg -rw------- 1 user user 1282 Nov 19 17:20 gnash-cookies.vuVsGz -rw------- 1 user user 1282 Nov 19 17:20 gnash-cookies.z8Q7RN drwxr-xr-x 2 root root 4096 Nov 18 13:40 hsperfdata_root -rw-r--r-- 1 root root 5281 Nov 18 14:13 install drwx------ 2 root root 4096 Nov 19 09:46 libgksu-f3eZ1v drwx------ 2 root root 4096 Nov 18 13:12 mc-root drwx------ 2 user user 4096 Jan 1 1970 orbit-user drwx------ 2 user user 4096 Nov 19 09:37 pulse-nuOdMqjwEN22 drwx------ 2 root root 4096 Nov 19 14:53 pulse-PKdhtXMmr18n drwx------ 2 Debian-gdm Debian-gdm 4096 Nov 19 09:38 pulse-t9upJ4g7YdpD -rw-r--r-- 1 root root 40882220 Nov 19 17:25 scorp.wav drwx------ 2 user user 4096 Nov 19 09:37 ssh-WOuTk69PHErH drwxr-xr-x 2 user user 4096 Nov 18 13:44 tracker-user |
#sox -t wav /tmp/scorp.wav -r8000 -c1 -t gsm /tmp/woll.gsm resample
sox FAIL formats: can't open input file `/tmp/woll.gsm': No such file or directory |
#sox -t wav /tmp/scorp.wav -r8000 -c1 -t gsm /tmp/woll.gsm
|
#mv /tmp/woll.gsm /var/lib/asterisk/moh/
|
#nano /etc/asterisk/
|
#nano /etc/asterisk/musiconhold.conf
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-29432.12798.22861 2013-11-19 17:46:35.977335747 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 17:47:10.825335281 +0200 @@ -18,6 +18,7 @@ exten => _2XXX,1,Answer exten => _2XXX,n,Set(MON_FILE=${EXTEN}-${CALLERID(num)}-${EPOCH}) +exten => _2XXX,n,Set(CHANNEL(musicclass)=${DB(music/${EXTEN})})) exten => _2XXX,n,Monitor(wav,${MON_FILE},m) exten => _2XXX,n,Dial(SIP/${EXTEN},5) exten => _2XXX,n,Voicemail(${EXTEN}@default) |
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-29432.28988.22804 2013-11-19 18:00:27.801324604 +0200 +++ /etc/asterisk/sip.conf 2013-11-19 18:00:55.649324231 +0200 @@ -9,16 +9,16 @@ register => kiev:1234@192.168.15.4/london register => kiev:1234@192.168.15.7/ottawa +;;;;;;;;;;;;;;;q234uqyhu4oejh9j90i23901i-0 - -[local-phone](!) | -type=friend | -host=dynamic | -directmedia=no | -qualify=yes | - | -[1701](local-phone) | -secret=1234 | +[local-phone](!) +type=friend +host=dynamic +directmedia=no +qualify=yes + +[1701](local-phone) +secret=1234 language=ru [kharkov] |
#l3
l3 l3cd l3-config l3mass_upload l3_save_last_line l3shot l3-agent l3_close_session l3_fix_prompt l3pwd l3script l3upload |
#l3
l3 l3cd l3-config l3mass_upload l3_save_last_line l3shot l3-agent l3_close_session l3_fix_prompt l3pwd l3script l3upload |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-29432.32607.1924 2013-11-19 18:05:40.405320416 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 18:05:48.081320313 +0200 @@ -15,7 +15,7 @@ ;exten => _2XXX,n,Set(MON_FILE=${EXTEN}-${CALLERID(num)}-${EPOCH}) ;exten => _2XXX,n,Monitor(wav,${MON_FILE},m) ;exten => _2XXX,1,Monitor(wav,123,m) - +;jsehdfuiowehuirhewuihuiweh exten => _2XXX,1,Answer exten => _2XXX,n,Set(MON_FILE=${EXTEN}-${CALLERID(num)}-${EPOCH}) exten => _2XXX,n,Set(CHANNEL(musicclass)=${DB(music/${EXTEN})})) |
#rasterisk -vvvvvvvv
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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~dfsg-3+deb7u1 currently running on linux1 (pid = 4107) ... -- Added extension '~~s~~' priority 4 to ael-std-exten-ael -- Added extension '~~s~~' priority 5 to ael-std-exten-ael -- Added extension '~~s~~' priority 6 to ael-std-exten-ael -- Added extension '~~s~~' priority 7 to ael-std-exten-ael -- Added extension '~~s~~' priority 8 to ael-std-exten-ael -- Added extension 'a' priority 1 to ael-std-exten-ael [Nov 19 18:05:54] WARNING[4130]: chan_sip.c:20720 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'kiev' to '192.168.15.7' linux1*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#apt-get install festival
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: alsa-base alsa-utils esound-common festlex-cmu festlex-poslex festvox-kallpc16k libaudiofile1 libesd0 libestools2.1 Suggested packages: alsa-oss oss-compat pidgin-festival festival-freebsoft-utils pulseaudio-esound-compat The following NEW packages will be installed: ... Setting up libaudiofile1:amd64 (0.3.4-2) ... Setting up esound-common (0.2.41-10) ... Setting up libesd0:amd64 (0.2.41-10+b1) ... Setting up libestools2.1:amd64 (1:2.1~release-5) ... Setting up alsa-utils (1.0.25-4) ... Setting up festival (1:2.1~release-5.1) ... Processing triggers for sgml-base ... Setting up festlex-cmu (1.4.0-6) ... Setting up festlex-poslex (1.4.0-5) ... Setting up festvox-kallpc16k (1.4.0-5) ... |
#apt-get install festvox-ru
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: festvox-ru 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 196 MB of archives. After this operation, 247 MB of additional disk space will be used. Get:1 http://192.168.15.254/debian/ wheezy/main festvox-ru all 0.5-5 [196 MB] |
#nano /v
|
#nano /v
|
#nano /var/tmp/
|
#nano /var/tmp/texts/
|
#nano /var/tmp/texts/
|
#lynx -dump http://pravda.com.ua/ | less
|
#cp -R /home/user/texts/ /var/tmp/
cp: cannot stat `/home/user/texts/': No such file or directory |
#cat /var/tmp/texts/burunduki.txt | text2wave -eval '(voic|
> e_msu_ru_nsh_clunits)' > /var/tmp/texts/burunduki.wav SIOD ERROR: unbound variable : voic| |
#cat /var/tmp/texts/burunduki.txt | text2wave -eval '(voic|
|
#ls -l /var/tmp/texts/burunduki.wav
-rw-r--r-- 1 root root 2033006 Nov 20 10:32 /var/tmp/texts/burunduki.wav |
#ls -l /var/tmp/texts/burunduki.wav
-rw-r--r-- 1 root root 2033006 Nov 20 10:32 /var/tmp/texts/burunduki.wav |
#play /v
var/ vmlinuz |
#play /v
var/ vmlinuz |
#play /var/tmp/texts/govorun.
govorun.txt govorun.wav |
#play /var/tmp/texts/govorun.wav
No protocol specified xcb_connection_has_error() returned true play WARN alsa: can't encode 0-bit Unknown or not applicable /var/tmp/texts/govorun.wav: File Size: 360k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:11.26 In:68.2% 00:00:07.68 [00:00:03.58] Out:336k [ ====|==== ] Hd:4.9 Clip:0 Aborted. |
#play /var/tmp/texts/burunduki.wav
No protocol specified xcb_connection_has_error() returned true ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave play FAIL sox: Sorry, there is no default audio device configured |
#play /var/tmp/texts/govorun.wav
No protocol specified xcb_connection_has_error() returned true play WARN alsa: can't encode 0-bit Unknown or not applicable /var/tmp/texts/govorun.wav: File Size: 360k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:11.26 In:18.2% 00:00:02.05 [00:00:09.21] Out:65.5k [-=====|=====-] Clip:0 Aborted. |
#play /var/tmp/texts/burunduki.wav
No protocol specified xcb_connection_has_error() returned true play WARN alsa: can't encode 0-bit Unknown or not applicable /var/tmp/texts/burunduki.wav: File Size: 2.03M Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:01:03.53 In:24.2% 00:00:15.36 [00:00:48.17] Out:696k [ =====|===== ] Hd:3.6 Clip:0 Aborted. |
#mkdir /var/lib/asterisk/sounds/tts -p
|
#chown -R asterisk:asterisk /var/lib/asterisk/sounds/tts
|
#chmod +x /usr/local/bin/asterisk-festival.pl
chmod: cannot access `/usr/local/bin/asterisk-festival.pl': No such file or directory |
#/usr/local/bin/asterisk-festival.pl /var/tmp/texts/burund
l3script: /usr/local/bin/asterisk-festival.pl: No such file or directory |
#apt-get install libasterisk-agi-perl
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libasterisk-agi-perl 0 upgraded, 1 newly installed, 0 to remove and 0 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.15.254/debian/ wheezy/main libasterisk-agi-perl all 1.01-2 [42.2 kB] Fetched 42.2 kB in 0s (2,461 kB/s) Selecting previously unselected package libasterisk-agi-perl. (Reading database ... 144234 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) ... |
#apt-get install libasterisk-agi-perl
|
#apt-get install libasterisk-agi-perl
|
#nano /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-6933.12284.20602 2013-11-20 11:32:09.287510665 +0200 +++ /etc/asterisk/extensions.conf 2013-11-20 11:32:25.587510447 +0200 @@ -31,9 +31,6 @@ exten => 8100,1,VoiceMailMain() exten => 8101,1,MeetMe(101) -exten => 8102,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/texts/burundu| -ki.txt) -exten => 8103,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/texts/pesec.t -xt) | -exten => 8104,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/texts/govorun -.txt) +exten => 8102,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/texts/burunduki.txt) +exten => 8103,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/texts/pesec.txt) +exten => 8104,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/texts/govorun.txt) |
#ls /var/tmp/texts/pesec.txt
ls: cannot access /var/tmp/texts/pesec.txt: No such file or directory |
#cd /var/tmp/texts/pescy.txt ^C
|
#nano /tmp/call.call
--- /dev/null 2013-11-18 12:01:21.855283397 +0200 +++ /tmp/call.call 2013-11-20 11:43:45.471501335 +0200 @@ -0,0 +1,3 @@ +Channel: SIP/2201 +Context: internal +Extension: 8104 |
#Channel: SIP/2201
|
#cp -p /tmp/call.call /var/spool/asterisk/outgoing/
|
#Channel:SIP/2201
|
#nano /tmp/call.call
|
#Channel: SIP/2201
|
#Channel: SIP/1201
|
#nano /home/pescyvsem.txt
--- /dev/null 2013-11-18 12:01:21.855283397 +0200 +++ /home/pescyvsem.txt 2013-11-20 12:04:18.167484820 +0200 @@ -0,0 +1,17 @@ +#!/bin/sh + +for CHANNEL in `< channels.txt` +do + + file=/tmp/${RANDOM}.call + + cat <<EOF > $file +Channel: $CHANNEL +Context: internal +Extension: 8104 +EOF + + chown asterisk:asterisk $file + mv $file /var/spool/asterisk/outgoing + +done |
#!/bin/sh
|
#!/bin/sh
|
#!/bin/sh
/home/pescyvsem.sh: line 17: warning: here-document at line 8 delimited by end-of-file (wanted `EOF') /home/pescyvsem.sh: line 18: syntax error: unexpected end of file |
#bash /home/pescyvsem.sh
|
#nano /home/pescyvsem.sh
--- /tmp/l3-saved-6933.13569.21932 2013-11-20 13:27:54.679417614 +0200 +++ /home/pescyvsem.sh 2013-11-20 13:28:16.995417315 +0200 @@ -7,7 +7,7 @@ cat <<EOF > $file Channel: $CHANNEL -Context: internal +Context: default Extension: 8104 EOF |
#SIP/1101
|
#[default]
GNU nano 2.2.6 File: /etc/asterisk/extensions.conf Modified [default] exten => 4000,1,Answer exten => 4000,n,Playback(demo-thanks) exten => 1101,1,Dial(SIP/1101,m) exten => 1102,1,Dial(SIP/1102,m) ;exten => _12XX,1,Dial(SIP/${EXTEN}) exten => _12XX,1,Dial(SIP/kharkov/${EXTEN}) ;exten => _2XXX,n,Set(CHANNEL(musicclass)=${DB(music/${EXTEN})})) exten => 8100,1,VoiceMailMain(){MON_FILE},m) exten => 8101,1,MeetMe(101)${EXTEN},5) exten => 8102,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/texts/burunduki.txt) exten => 8103,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/texts/pescy.txt) $ ;exten => _2XXX,n,Monitor(wav,${MON_FILE},m) exten => 8000,1,Answertor(wav,123,m) exten => 8000,n,Record(/var/tmp/asterisk/records/record00:gsm) exten => 8000,n,Playback(/var/tmp/asterisk/records/record00)POCH}) ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell |
#!/bin/sh
|
#bash /home/pescyvsem.sh
|
#SIP/1101
SIP/2202 SIP/2301 SIP/3101 SIP/3202 SIP/3301 [ Read 9 lines ] ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos Use "fg" to return to nano.y ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell [2]+ Stopped /usr/bin/nano "$@" |
#nano /home/pescyvsem.sh
|
#cd /
bin/ etc/ initrd.img lost+found/ opt/ run/ srv/ usr/ boot/ home/ lib/ media/ proc/ sbin/ sys/ var/ dev/ img lib64/ mnt/ root/ selinux/ tmp/ vmlinuz |
#cd /
bin/ etc/ initrd.img lost+found/ opt/ run/ srv/ usr/ boot/ home/ lib/ media/ proc/ sbin/ sys/ var/ dev/ img lib64/ mnt/ root/ selinux/ tmp/ vmlinuz |
#cd /home/
pescyvsem.sh pescyvsem.txt user/ |
#locate a2billing
|
#find a2billing
find: `a2billing': No such file or directory |
#find a2billing*
find: `a2billing*': No such file or directory |
#find /home/a2billing*
find: `/home/a2billing*': No such file or directory |
#cd
.bash_history Desktop/ .gstreamer-0.10/ .mission-control/ Templates/ .bash_logout Documents/ .gtk-bookmarks .mozilla/ .thumbnails/ .bash_profile Downloads/ .gvfs/ Music/ Videos/ .bashrc .fontconfig/ .ICEauthority Pictures/ .xsession-errors .cache/ .gconf/ img .profile .xsession-errors.old channels.txt .gksu.lock .l3rc Public/ .config/ .gnome2/ .lilalo/ .pulse/ .dbus/ .gnome2_private/ .local/ .pulse-cookie |
#cd
.bash_history Desktop/ .gstreamer-0.10/ .mission-control/ Templates/ .bash_logout Documents/ .gtk-bookmarks .mozilla/ .thumbnails/ .bash_profile Downloads/ .gvfs/ Music/ Videos/ .bashrc .fontconfig/ .ICEauthority Pictures/ .xsession-errors .cache/ .gconf/ img .profile .xsession-errors.old channels.txt .gksu.lock .l3rc Public/ .config/ .gnome2/ .lilalo/ .pulse/ .dbus/ .gnome2_private/ .local/ .pulse-cookie |
#cd
|
#cd
|
Время первой команды журнала | 13:53:09 2013-11-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:33:40 2013-11-21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 20.79 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.92 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.43 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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