Журнал лабораторных работ

Содержание

Журнал

Вторник (11/19/13)

/dev/pts/1
18:17:46
#ls
asterisk
18:17:49
#ls -la
total 12
drwxrwxrwt  3 root root 4096 Nov 19 19:11 .
drwxr-xr-x 12 root root 4096 Nov 18 16:02 ..
drwxr-xr-x  3 root root 4096 Nov 19 19:10 asterisk
18:17:51
#chown asterisk:asterisk
chown: missing operand after `asterisk:asterisk'
Try `chown --help' for more information.
18:18:00
#chown asterisk:asterisk asterisk/

18:18:03
#ls -la
total 12
drwxrwxrwt  3 root     root     4096 Nov 19 19:11 .
drwxr-xr-x 12 root     root     4096 Nov 18 16:02 ..
drwxr-xr-x  3 asterisk asterisk 4096 Nov 19 19:10 asterisk
18:18:05
#chmod 777 asterisk/

18:18:33
#ll
l3script: ll: command not found
18:18:34
#ls -la
total 12
drwxrwxrwt  3 root     root     4096 Nov 19 19:11 .
drwxr-xr-x 12 root     root     4096 Nov 18 16:02 ..
drwxrwxrwx  3 asterisk asterisk 4096 Nov 19 19:10 asterisk
18:18:36
#cd asterisk/

18:18:38
#ls -la
total 12
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 .
drwxrwxrwt 3 root     root     4096 Nov 19 19:11 ..
drwxr-xr-x 2 root     root     4096 Nov 19 19:10 records
18:18:40
#cd ..

18:18:46
#chown -R asterisk:asterisk asterisk/

18:19:11
#ls -la
total 12
drwxrwxrwt  3 root     root     4096 Nov 19 19:11 .
drwxr-xr-x 12 root     root     4096 Nov 18 16:02 ..
drwxrwxrwx  3 asterisk asterisk 4096 Nov 19 19:10 asterisk
18:19:14
#cd /

/dev/pts/5
18:20:17
#cd /var/tmp/asterisk/records/

18:20:35
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:19 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:19 record01.gsm
/dev/pts/1
18:21:59
#cd /var/

18:22:03
#ls -la
total 48
drwxr-xr-x 12 root root  4096 Nov 18 16:02 .
drwxr-xr-x 23 root root  4096 Nov 18 15:24 ..
drwxr-xr-x  2 root root  4096 Sep 23 01:31 backups
drwxr-xr-x 15 root root  4096 Nov 18 15:45 cache
drwxr-xr-x  2 root root  4096 Nov 18 16:03 games
drwxr-xr-x 45 root root  4096 Nov 18 14:54 lib
drwxrwsr-x  2 root staff 4096 Sep 23 01:31 local
lrwxrwxrwx  1 root root     9 Nov 18 15:20 lock -> /run/lock
drwxr-xr-x 11 root root  4096 Nov 19 10:19 log
drwxrwsr-x  2 root mail  4096 Nov 18 15:20 mail
drwxr-xr-x  2 root root  4096 Nov 18 15:20 opt
lrwxrwxrwx  1 root root     4 Nov 18 15:20 run -> /run
drwxr-xr-x  7 root root  4096 Nov 18 14:54 spool
drwxrwxrwt  3 root root  4096 Nov 19 19:20 tmp
18:22:06
#cd tmp/

18:22:12
#ls -la
total 12
drwxrwxrwt  3 root     root     4096 Nov 19 19:20 .
drwxr-xr-x 12 root     root     4096 Nov 18 16:02 ..
drwxrwxrwx  3 asterisk asterisk 4096 Nov 19 19:10 asterisk
18:22:13
#cd asterisk/records/\
> ^C
18:22:41
#ls
asterisk
18:22:43
#cd asterisk/records/

18:22:48
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:21 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
18:22:50
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:21 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
18:23:03
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:08
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:09
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:10
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:11
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:13
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:14
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:15
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:16
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:18
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:18
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:19
#ls -la
total 8
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:21 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
18:23:20
#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:
  alsa-base alsa-utils esound-common festival festlex-cmu festlex-poslex festvox-kallpc16k libaudiofile1
...
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) ...
/dev/pts/5
18:24:27
#cd /tmp/

Среда (11/20/13)

/dev/pts/1
09:00:25
#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]
прошло 12 минут
/dev/pts/5
09:13:20
#man ls text2wave >
09:13:38
#man ls | text2wave > ls.wav

09:13:54
#play ls.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
ls.wav:
 File Size: 17.0M     Bit Rate: 256k
  Encoding: Signed PCM
  Channels: 1 @ 16-bit
Samplerate: 16000Hz
Replaygain: off
  Duration: 00:08:52.35
In:5.39% 00:00:28.67 [00:08:23.68] Out:459k  [    ==|==    ] Hd:2.3 Clip:0
Aborted.
09:14:29
#cd /var/tmp/texts/

/dev/pts/1
09:19:01
#asterisk -rvv
Asterisk 1.8.13.1~dfsg-3, 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 currently running on debian (pid = 12160)
...
    -- merging incls/swits/igpats from old(ael-dundi-e164-canonical) to new(ael-dundi-e164-canonical) context, registrar = pbx_config
    -- Registered extension context 'app_queue_gosub_virtual_context'; registrar: app_queue
    -- merging incls/swits/igpats from old(app_queue_gosub_virtual_context) to new(app_queue_gosub_virtual_context) context, registrar = pbx_config
    -- Added extension 's' priority 1 to app_queue_gosub_virtual_context
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000804 sec
    -- Time to restore hints and swap in new dialplan: 0.000003 sec
    -- Time to delete the old dialplan: 0.000067 sec
    -- Total time merge_contexts_delete: 0.000874 sec
debian*CLI> exit
Executing last minute cleanups
/dev/pts/5
09:22:31
#ls
burunduki.txt  pescy.txt
09:22:33
#bu | text2wave > ls.wav
builtin  bunzip2  busybox
09:22:33
#burunduki.txt | text2wave > ls.wav
l3script: burunduki.txt: command not found
09:31:34
#play ls.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
ls.wav:
 File Size: 245k      Bit Rate: 256k
  Encoding: Signed PCM
  Channels: 1 @ 16-bit
Samplerate: 16000Hz
Replaygain: off
  Duration: 00:00:07.67
In:100%  00:00:07.67 [00:00:00.00] Out:123k  [      |      ] Hd:2.9 Clip:0
Done.
09:31:47
#play ls.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
ls.wav:
 File Size: 245k      Bit Rate: 256k
  Encoding: Signed PCM
  Channels: 1 @ 16-bit
Samplerate: 16000Hz
Replaygain: off
  Duration: 00:00:07.67
In:100%  00:00:07.67 [00:00:00.00] Out:123k  [      |      ] Hd:2.9 Clip:0
Done.
09:34:57
#cat burunduki.txt | text2wave -eval `(voice_msu_ru_nsh.clu)> ls.wav
                     cat burunduki.txt | text2wave -eval `(voice_msu_ru_nsh.clu)> ls.wav
                                                                               nits `
l3script: voice_msu_ru_nsh.clunits: command not found
text2wave: no file specified to load
09:35:19
#cat burunduki.txt | text2wave -eval `(voice_msu_ru_nsh_clunits)`> ls.wav
l3script: voice_msu_ru_nsh_clunits: command not found
text2wave: no file specified to load
09:35:42
#cat burunduki.txt | text2wave -eval '(voice_msu_ru_nsh_clunits)'> ls.wav

09:36:08
#play burunduki.txt
play WARN alsa: can't encode 0-bit Unknown or not applicable
play FAIL formats: no handler for file extension `txt'
09:36:13
#ls
burunduki.txt  govorun.txt  ls.wav  machines  pescy.txt
09:36:18
#ls -la
total 2012
drwxr-xr-x 2 user user    4096 Nov 20 10:34 .
drwxrwxrwt 4 root root    4096 Nov 20 10:22 ..
-rw-r--r-- 1 user user    1390 Nov 20 10:09 burunduki.txt
-rw-r--r-- 1 root root     197 Nov 20 10:34 govorun.txt
-rw-r--r-- 1 root root 2033006 Nov 20 10:36 ls.wav
-rw-r--r-- 1 user user     104 Nov 20 10:24 machines
-rw-r--r-- 1 user user    1030 Nov 20 10:12 pescy.txt
09:36:21
#play ls.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
ls.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:17.7% 00:00:11.26 [00:00:52.27] Out:180k  [ -====|====- ] Hd:4.0 Clip:0
Aborted.
09:36:41
#ls -la
total 2012
drwxr-xr-x 2 user user    4096 Nov 20 10:34 .
drwxrwxrwt 4 root root    4096 Nov 20 10:22 ..
-rw-r--r-- 1 user user    1390 Nov 20 10:09 burunduki.txt
-rw-r--r-- 1 root root     197 Nov 20 10:34 govorun.txt
-rw-r--r-- 1 root root 2033006 Nov 20 10:36 ls.wav
-rw-r--r-- 1 user user     104 Nov 20 10:24 machines
-rw-r--r-- 1 user user    1030 Nov 20 10:12 pescy.txt
09:36:44
#joe govorun.txt
** Joe's Own Editor v3.7 ** (utf-8) ** Copyright © 2008 **
File govorun.txt saved
09:36:58
#cat govorun.txt | text2wave -eval '(voice_msu_ru_nsh_clunits)'> ls.wav

09:37:24
#cat govorun.txt | text2wave -eval '(voice_msu_ru_nsh_clunits)'> govorun.wav

09:39:02
#cat pescy.txt | text2wave -eval '(voice_msu_ru_nsh_clunits)'> pescy.wav

09:39:19
#play pescy.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
pescy.wav:
 File Size: 1.62M     Bit Rate: 256k
  Encoding: Signed PCM
  Channels: 1 @ 16-bit
Samplerate: 16000Hz
Replaygain: off
  Duration: 00:00:50.57
In:42.5% 00:00:21.50 [00:00:29.06] Out:344k  [ -====|====- ] Hd:4.0 Clip:0
Aborted.
прошло 32 минуты
10:12:02
#ls -la
total 20
drwxrwxrwx 2 asterisk asterisk 4096 Nov 19 19:23 .
drwxrwxrwx 3 asterisk asterisk 4096 Nov 19 19:10 ..
-rw-rw---- 1 asterisk asterisk 9438 Nov 20 11:09 record01.gsm
-rw-rw---- 1 asterisk asterisk    0 Nov 19 19:23 record02.gsm
10:12:08
#play record01.gsm
play WARN alsa: can't encode 0-bit Unknown or not applicable
record01.gsm:
 File Size: 9.44k
  Encoding: GSM
  Channels: 1 @ 16-bit
Samplerate: 8000Hz
Replaygain: off
  Duration: unknown
In:0.00% 00:00:05.72 [00:00:00.00] Out:45.8k [      |      ]        Clip:0
Done.
10:12:24
#play record01.gsm
play WARN alsa: can't encode 0-bit Unknown or not applicable
record01.gsm:
 File Size: 9.44k
  Encoding: GSM
  Channels: 1 @ 16-bit
Samplerate: 8000Hz
Replaygain: off
  Duration: unknown
In:0.00% 00:00:05.72 [00:00:00.00] Out:45.8k [      |      ]        Clip:0
Done.
10:12:36
#mkdir /var/lib/asterisk/sounds/tts -p

10:19:43
#chown -R asterisk:asterisk /var/lib/asterisk/sounds/tts

10:20:06
#chmod +x /usr/local/bin/asterisk-festival.pl

10:20:19
#/usr/local/bin/asterisk-festival.pl /var/tmp/texts/burund
Can't locate Asterisk/AGI.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/local/bin/asterisk-festival.pl line 3.
BEGIN failed--compilation aborted at /usr/local/bin/asterisk-festival.pl line 3.
10:20:41
#uki.txt
l3script: uki.txt: command not found
10:20:42
#apt-cache search asterisk agi
libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI
sipwitch-cgi - secure peer-to-peer SIP VoIP server - CGI XML-RPC interface
python-starpy - Asterisk (AMI) protocols for Twisted Python
10:21:17
#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,580 kB/s)
Selecting previously unselected package libasterisk-agi-perl.
(Reading database ... 142310 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) ...
10:29:36
#cd /var/lib/asterisk/sounds/tts/

10:33:31
#ls

10:33:32
#cd ..

10:33:35
#ls
custom  tts
10:33:36
#ls -la
total 16
drwxr-xr-x 4 asterisk asterisk 4096 Nov 20 11:19 .
drwxr-xr-x 4 asterisk asterisk 4096 Nov 20 11:30 ..
drwxr-xr-x 2 asterisk asterisk 4096 Apr  9  2013 custom
drwxr-xr-x 2 asterisk asterisk 4096 Nov 20 11:30 tts
10:33:40
#ls -la
total 16
drwxr-xr-x 4 asterisk asterisk 4096 Nov 20 11:19 .
drwxr-xr-x 4 asterisk asterisk 4096 Nov 20 11:30 ..
drwxr-xr-x 2 asterisk asterisk 4096 Apr  9  2013 custom
drwxr-xr-x 2 asterisk asterisk 4096 Nov 20 11:30 tts
10:33:49
#cd tts

10:33:52
#ls

10:33:54
#ls -la
total 8
drwxr-xr-x 2 asterisk asterisk 4096 Nov 20 11:30 .
drwxr-xr-x 4 asterisk asterisk 4096 Nov 20 11:19 ..
10:34:12
#pwd
/var/lib/asterisk/sounds/tts
10:34:21
#ls -la
total 8
drwxr-xr-x 2 asterisk asterisk 4096 Nov 20 11:30 .
drwxr-xr-x 4 asterisk asterisk 4096 Nov 20 11:19 ..
10:34:28
#cd /tmp/

прошло 10 минут
10:45:23
#joe /tmp/call.call
Extension:8104
File /tmp/call.call saved
10:46:15
#chown asterisk:asterisk call.call

10:47:18
#cp -p /tmp/call.call /var/spool/asterisk/outgoing/

10:48:13
#cp -p /tmp/call.call /var/spool/asterisk/outgoing/

10:48:16
#joe /etc/asterisk/sip.conf
host=dynamic
username=ottawa
[quebec]
type=friend
secret=1234
host=dynamic
[quebec]
username=ottawa
context=vip
secret=1234
host=dynamic
username=ottawa
File /etc/asterisk/sip.conf not changed so no update needed
прошло 105 минут
12:33:58
#cp call.call /var/spool/asterisk/outgoing/

12:34:17
#cp call.call /var/spool/asterisk/outgoing/

12:35:10
#cp call.call /var/spool/asterisk/outgoing/

12:36:10
#cp call.call /var/spool/asterisk/outgoing/

12:36:12
#cp call.call /var/spool/asterisk/outgoing/