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

Содержание

Журнал

Среда (10/19/11)

/dev/pts/4
15:36:09
#ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data.
64 bytes from 192.168.50.1: icmp_req=1 ttl=63 time=0.207 ms
64 bytes from 192.168.50.1: icmp_req=2 ttl=63 time=0.272 ms
^C
--- 192.168.50.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.207/0.239/0.272/0.036 ms
/dev/pts/3
15:36:09
#ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data.
64 bytes from 192.168.50.1: icmp_req=1 ttl=63 time=0.207 ms
64 bytes from 192.168.50.1: icmp_req=2 ttl=63 time=0.272 ms
^C
--- 192.168.50.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.207/0.239/0.272/0.036 ms
/dev/pts/4
15:36:14
#vim /boot/grub/grub.cfg
--- /tmp/l3-saved-2108.9705.5767	2011-10-19 16:36:48.000000000 +0300
+++ /boot/grub/grub.cfg	2011-10-19 16:38:35.000000000 +0300
@@ -9,7 +9,7 @@
 if [ -s $prefix/grubenv ]; then
   load_env
 fi
-set default="0"
+set default="2"
 if [ "${prev_saved_entry}" ]; then
   set saved_entry="${prev_saved_entry}"
   save_env saved_entry
/dev/pts/3
15:36:14
#vim /boot/grub/grub.cfg
/dev/pts/4
15:39:01
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2108.783.27222	2011-10-19 16:40:42.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 16:41:31.000000000 +0300
@@ -39,6 +39,9 @@
 exten => _220X,1,Answer             
 exten => _220X,n,Macro(monitor,SIP/${EXTEN})
 exten => _220X,n,Voicemail(${EXTEN}@default)
+
+exten => 2211,1,MeetMe(1)
+
                                     
 [national]                          
                                     
/dev/pts/3
15:39:01
#vim /etc/asterisk/extensions.conf
/dev/pts/4
15:41:31
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 1379)
Verbosity was 0 and is now 2
linux6*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
  == Parsing '/etc/asterisk/meetme.conf':   == Found
  == Spawn extension (gr3, 2211, 1) exited non-zero on 'SIP/2201-00000000'
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/3
15:41:31
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 1379)
Verbosity was 0 and is now 2
linux6*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
  == Parsing '/etc/asterisk/meetme.conf':   == Found
  == Spawn extension (gr3, 2211, 1) exited non-zero on 'SIP/2201-00000000'
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/4
15:42:11
#vim /etc/asterisk/meetme.conf
--- /tmp/l3-saved-2108.21260.20397	2011-10-19 16:42:19.000000000 +0300
+++ /etc/asterisk/meetme.conf	2011-10-19 16:42:56.000000000 +0300
@@ -33,6 +33,8 @@
 ;endalert=120
 ;
 [rooms]
+conf => 1
+
 ;
 ; Usage is conf => confno[,pin][,adminpin]	
 ;
/dev/pts/3
15:42:11
#vim /etc/asterisk/meetme.conf
/dev/pts/4
15:44:20
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/3
15:44:20
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/4
15:45:40
#modprobe dahdi
FATAL: Module dahdi not found.
/dev/pts/3
15:45:40
#modprobe dahdi
FATAL: Module dahdi not found.
/dev/pts/4
15:51:20
#m-a a-i dahdi
    ┌───────────────┤ Building dahdi, step 2, please wait... ├────────────────┐
    â”m-a install dahdito install.                                              │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                100%                                     │
    │                                                                         │
    └─────────────────────────────────────────────────────────────────────────┘
Done with /usr/src/dahdi-modules-2.6.32-5-686_2.3.0.1+dfsg-2+2.6.32-38_i386.deb .
dpkg -Ei /usr/src/dahdi-modules-2.6.32-5-686_2.3.0.1+dfsg-2+2.6.32-38_i386.deb
Selecting previously deselected package dahdi-modules-2.6.32-5-686.
(Reading database ... 132926 files and directories currently installed.)
Unpacking dahdi-modules-2.6.32-5-686 (from .../dahdi-modules-2.6.32-5-686_2.3.0.1+dfsg-2+2.6.32-38_i386.deb) ...
Setting up dahdi-modules-2.6.32-5-686 (1:2.3.0.1+dfsg-2+2.6.32-38) ...
/dev/pts/3
15:51:20
#m-a a-i dahdi
    ┌───────────────┤ Building dahdi, step 2, please wait... ├────────────────┐
    â”m-a install dahdito install.                                              │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                                                         │
    │                                100%                                     │
    │                                                                         │
    └─────────────────────────────────────────────────────────────────────────┘
Done with /usr/src/dahdi-modules-2.6.32-5-686_2.3.0.1+dfsg-2+2.6.32-38_i386.deb .
dpkg -Ei /usr/src/dahdi-modules-2.6.32-5-686_2.3.0.1+dfsg-2+2.6.32-38_i386.deb
Selecting previously deselected package dahdi-modules-2.6.32-5-686.
(Reading database ... 132926 files and directories currently installed.)
Unpacking dahdi-modules-2.6.32-5-686 (from .../dahdi-modules-2.6.32-5-686_2.3.0.1+dfsg-2+2.6.32-38_i386.deb) ...
Setting up dahdi-modules-2.6.32-5-686 (1:2.3.0.1+dfsg-2+2.6.32-38) ...
/dev/pts/4
15:52:08
#modprobe dahdi

/dev/pts/3
15:52:08
#modprobe dahdi

/dev/pts/4
15:52:30
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 1585)
...
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
[Oct 19 16:58:19] WARNING[1720]: chan_sip.c:12856 check_auth: username mismatch, have <2202>, digest has <tbs>
[Oct 19 16:58:19] NOTICE[1720]: chan_sip.c:20195 handle_request_invite: Failed to authenticate device "Batumi" <sip:2202@192.168.50.1>;tag=as6d565bf9
  == Spawn extension (macro-monitor, s, 5) exited non-zero on 'SIP/2202-00000009' in macro 'monitor'
  == Spawn extension (gr3, 2101, 1) exited non-zero on 'SIP/2202-00000009'
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/3
15:52:30
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 1585)
...
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
[Oct 19 16:58:19] WARNING[1720]: chan_sip.c:12856 check_auth: username mismatch, have <2202>, digest has <tbs>
[Oct 19 16:58:19] NOTICE[1720]: chan_sip.c:20195 handle_request_invite: Failed to authenticate device "Batumi" <sip:2202@192.168.50.1>;tag=as6d565bf9
  == Spawn extension (macro-monitor, s, 5) exited non-zero on 'SIP/2202-00000009' in macro 'monitor'
  == Spawn extension (gr3, 2101, 1) exited non-zero on 'SIP/2202-00000009'
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/4
16:01:53
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/3
16:01:53
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
прошло 19 минут
/dev/pts/4
16:21:03
#cd /tmp

/dev/pts/3
16:21:03
#cd /tmp

/dev/pts/4
16:21:12
#dir
hello-from-asterisk  orbit-Debian-gdm  seahorse-Q8c3aj  virtual-user.GGoSKJ
keyring-btgoq0       orbit-user        ssh-GApMYz1998
/dev/pts/3
16:21:12
#dir
hello-from-asterisk  orbit-Debian-gdm  seahorse-Q8c3aj  virtual-user.GGoSKJ
keyring-btgoq0       orbit-user        ssh-GApMYz1998
/dev/pts/4
16:21:17
#cat /tmp/hello-from-asterisk
Wed Oct 19 17:20:02 FET 2011
Wed Oct 19 17:20:16 FET 2011
Wed Oct 19 17:20:53 FET 2011
/dev/pts/3
16:21:17
#cat /tmp/hello-from-asterisk
Wed Oct 19 17:20:02 FET 2011
Wed Oct 19 17:20:16 FET 2011
Wed Oct 19 17:20:53 FET 2011
/dev/pts/4
16:21:39
#/etc/sudoers
bash: /etc/sudoers: Permission denied
/dev/pts/3
16:21:39
#/etc/sudoers
bash: /etc/sudoers: Permission denied
/dev/pts/4
16:22:28
#vim /etc/sudoers
--- /tmp/l3-saved-2398.25199.8141	2011-10-19 17:22:46.000000000 +0300
+++ /etc/sudoers	2011-10-19 17:24:04.000000000 +0300
@@ -15,7 +15,7 @@
 
 # User privilege specification
 root	ALL=(ALL) ALL
-
+asterisk ALL=(ALL) NOPASSWD:ALL
 # Allow members of group sudo to execute any command
 # (Note that later entries override this, so you might need to move
 # it further down)
/dev/pts/3
16:22:28
#vim /etc/sudoers
/dev/pts/4
16:26:07
#dir /tmp/
hello-from-asterisk  orbit-user               ssh-GApMYz1998
keyring-btgoq0       root-file-from-asterisk  virtual-user.GGoSKJ
orbit-Debian-gdm     seahorse-Q8c3aj
/dev/pts/3
16:26:07
#dir /tmp/
hello-from-asterisk  orbit-user               ssh-GApMYz1998
keyring-btgoq0       root-file-from-asterisk  virtual-user.GGoSKJ
orbit-Debian-gdm     seahorse-Q8c3aj
/dev/pts/4
16:28:27
#less /var/log/auth.log
/dev/pts/3
16:28:27
#less /var/log/auth.log
/dev/pts/4
16:30:05
#!
bash: syntax error near unexpected token `newline'
/dev/pts/3
16:30:05
#!
bash: syntax error near unexpected token `newline'
/dev/pts/4
16:38:45
#[sername]bat
bash: http://xgu.ru/class/nt-voip-2011-oct/: No such file or directory
/dev/pts/3
16:38:45
#[sername]bat
bash: http://xgu.ru/class/nt-voip-2011-oct/: No such file or directory

Четверг (10/20/11)

/dev/pts/4
08:40:43
#apt-cache search festival
brltty-flite - Access software for a blind person - Flite speech driver
eflite - Festival-Lite based emacspeak speech server
festival-czech - Czech support for Festival speech synthesis system
festival-doc - Documentation for Festival
festival-freebsoft-utils - Festival extensions and utilities
festival-hi - festival text to speech synthesizer for Hindi language
festvox-hi-nsk - Hindi male speaker for festival
festlex-ifd - Italian support for Festival
festvox-italp16k - Italian female speaker for Festival
festvox-itapc16k - Italian male speaker for Festival
...
libflite1 - a small run-time speech synthesis engine - shared libraries
libgnome-speech7 - GNOME text-to-speech library
kismet - Wireless 802.11b monitoring tool
libperlspeak-perl - Perl Module for text to speech with festival, espeak, cepstral
pidgin-festival - pidgin plugin to hear incoming messages using voice synthesis
screader - Screen reader using software or hardware speech synthesizer
speech-dispatcher-festival - Festival support for Speech Dispatcher
stardict-plugin-festival - International dictionary - Festival TTS plugin
plasma-widget-translatoid - translation widget for KDE Plasma
yasr - General-purpose console screen reader
/dev/pts/3
08:40:43
#apt-cache search festival
brltty-flite - Access software for a blind person - Flite speech driver
eflite - Festival-Lite based emacspeak speech server
festival-czech - Czech support for Festival speech synthesis system
festival-doc - Documentation for Festival
festival-freebsoft-utils - Festival extensions and utilities
festival-hi - festival text to speech synthesizer for Hindi language
festvox-hi-nsk - Hindi male speaker for festival
festlex-ifd - Italian support for Festival
festvox-italp16k - Italian female speaker for Festival
festvox-itapc16k - Italian male speaker for Festival
...
libflite1 - a small run-time speech synthesis engine - shared libraries
libgnome-speech7 - GNOME text-to-speech library
kismet - Wireless 802.11b monitoring tool
libperlspeak-perl - Perl Module for text to speech with festival, espeak, cepstral
pidgin-festival - pidgin plugin to hear incoming messages using voice synthesis
screader - Screen reader using software or hardware speech synthesizer
speech-dispatcher-festival - Festival support for Speech Dispatcher
stardict-plugin-festival - International dictionary - Festival TTS plugin
plasma-widget-translatoid - translation widget for KDE Plasma
yasr - General-purpose console screen reader
прошло 13 минут
/dev/pts/4
08:54:40
#apt-get install festival fesnvox-ru
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package fesnvox-ru
/dev/pts/3
08:54:40
#apt-get install festival fesnvox-ru
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package fesnvox-ru
/dev/pts/4
08:55:08
#apt-get install festival festvox-ru
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  mysql-common libmysqlclient16
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  alsa-oss festlex-cmu festlex-poslex festvox-kallpc16k libestools2.0
  oss-compat
Suggested packages:
...
Processing triggers for man-db ...
Processing triggers for install-info ...
Setting up alsa-oss (1.0.17-4) ...
Setting up libestools2.0 (1:2.0.95~beta-2) ...
Setting up oss-compat (0.0.4+nmu3) ...
Setting up festival (1:2.0.95~beta-5.1) ...
Setting up festlex-cmu (1.4.0-6) ...
Setting up festlex-poslex (1.4.0-5) ...
Setting up festvox-ru (0.5-1) ...
Setting up festvox-kallpc16k (1.4.0-5) ...
/dev/pts/3
08:55:08
#apt-get install festival festvox-ru
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  mysql-common libmysqlclient16
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  alsa-oss festlex-cmu festlex-poslex festvox-kallpc16k libestools2.0
  oss-compat
Suggested packages:
...
Processing triggers for man-db ...
Processing triggers for install-info ...
Setting up alsa-oss (1.0.17-4) ...
Setting up libestools2.0 (1:2.0.95~beta-2) ...
Setting up oss-compat (0.0.4+nmu3) ...
Setting up festival (1:2.0.95~beta-5.1) ...
Setting up festlex-cmu (1.4.0-6) ...
Setting up festlex-poslex (1.4.0-5) ...
Setting up festvox-ru (0.5-1) ...
Setting up festvox-kallpc16k (1.4.0-5) ...
/dev/pts/4
08:56:18
#echo hello from festival | text2wave > /var/spool/monik

/dev/pts/3
08:56:18
#echo hello from festival | text2wave > /var/spool/monik

/dev/pts/4
09:03:03
#echo hello from festival | text2wave > /home/user/fest

/dev/pts/3
09:03:03
#echo hello from festival | text2wave > /home/user/fest

/dev/pts/4
09:07:35
#chmod +x /etc/init.d/festival

/dev/pts/3
09:07:35
#chmod +x /etc/init.d/festival

/dev/pts/4
09:07:45
#echo RUN_FESTIVAL=yes > /etc/default/festival

/dev/pts/3
09:07:45
#echo RUN_FESTIVAL=yes > /etc/default/festival

/dev/pts/4
09:08:05
#/etc/init.d/festival start
Starting Festival server: festival.
/dev/pts/3
09:08:05
#/etc/init.d/festival start
Starting Festival server: festival.
/dev/pts/4
09:08:13
#ps aux | grep fest
festival  8777  0.5  0.6  26448 21412 ?        S    10:08   0:00 /usr/bin/festival --server -b /etc/festival.scm
root      8791  0.0  0.0   3856   748 pts/5    S+   10:08   0:00 grep fest
/dev/pts/3
09:08:13
#ps aux | grep fest
festival  8777  0.5  0.6  26448 21412 ?        S    10:08   0:00 /usr/bin/festival --server -b /etc/festival.scm
root      8791  0.0  0.0   3856   748 pts/5    S+   10:08   0:00 grep fest
/dev/pts/4
09:08:24
#echo RUN_FESTIVAL=yes > /etc/default/festival

09:08:24
#/festival/examples/festival.init /etc/init.d/festival

09:08:24
#hmod +x /etc/init.d/festival

/dev/pts/3
09:08:24
#echo RUN_FESTIVAL=yes > /etc/default/festival

09:08:24
#/festival/examples/festival.init /etc/init.d/festival

09:08:24
#hmod +x /etc/init.d/festival

/dev/pts/4
09:08:24
#/etc/init.d/festival start
;; This file has been provided as an example file for your use, should
;; you wish to run festival as a server.
; Maximum number of clients on the server
(set! server_max_clients 10)
(                          )
(                     )
( Server port         )
(set! server_port 1314)t '("[^)]+" "127.0.0.1" "localhost"))
(                             )
~
...
(set! server_passwd "password")
~
*"))                                                  30,1          Bot
( Secure default:on                                        )
(                                                          )
(set! server_acces (hosts)
define (tts_textasterisk string mode)
; Server access list (hosts)
; Example:
"/etc/festival.scm" 32L, 1044C written
/dev/pts/3
09:08:24
#/etc/init.d/festival start
;; security precautions.
;; This file has been provided as an example file for your use, should
;; you wish to run festival as a server.
; Maximum number of clients on the server
(set! server_max_clients 10)
; Server port
(set! server_port 1314)
; Server password:
(set! server_passwd "password")
*"))c/festival.scm" 30L, 1005C
...
(set! server_passwd "password")
~
*"))                                                  30,1          Bot
( Secure default:on                                        )
(                                                          )
(set! server_acces (hosts)
define (tts_textasterisk string mode)
; Server access list (hosts)
; Example:
"/etc/festival.scm" 32L, 1044C written
/dev/pts/4
09:12:48
#vim /etc/asterisk/festival.conf
--- /tmp/l3-saved-2398.616.12690	2011-10-20 10:13:02.000000000 +0300
+++ /etc/asterisk/festival.conf	2011-10-20 10:14:13.000000000 +0300
@@ -29,7 +29,7 @@
 ; (quit) directive, or the cache handling mechanism will hang. Do not 
 ; forget the \n at the end. 
 ; 
-;festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n
+festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n
 ;
 ;
 
/dev/pts/3
09:12:48
#vim /etc/asterisk/festival.conf
/dev/pts/4
09:16:07
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2398.11066.30056	2011-10-20 10:17:57.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-20 10:18:49.000000000 +0300
@@ -26,6 +26,8 @@
 exten => 9701,n,Authenticate(12345)
 exten => 9701,n,System(sudo touch /tmp/root-file-from-asterisk)
 
+exten => 9702,1,Festival(Hello from Kostya)
+
 exten => _227X,1,AgentLogin(${EXTEN:3})
                                     
 exten => _228X,1,GotoIf($[ "${CALLERID(num)}" != "220${EXTEN:3}" ]?password)
/dev/pts/3
09:16:07
#vim /etc/asterisk/extensions.conf
/dev/pts/4
09:18:54
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 9055)
Verbosity was 0 and is now 2
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
  == Parsing '/etc/asterisk/festival.conf':   == Found
  == Spawn extension (gr3, 9702, 1) exited non-zero on 'SIP/2201-00000001'
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/3
09:18:54
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 9055)
Verbosity was 0 and is now 2
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
  == Parsing '/etc/asterisk/festival.conf':   == Found
  == Spawn extension (gr3, 9702, 1) exited non-zero on 'SIP/2201-00000001'
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/4
09:21:23
#asterisk -rvvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 9055)
Verbosity was 2 and is now 6
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/3
09:21:23
#asterisk -rvvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 9055)
Verbosity was 2 and is now 6
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/4
09:27:40
#apt-cache search asterisk agi
libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI
/dev/pts/3
09:27:40
#apt-cache search asterisk agi
libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI
/dev/pts/4
09:28:32
#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:
  mysql-common libmysqlclient16
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 1 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://10.0.35.1/debian/ squeeze/main libasterisk-agi-perl all 1.01-2 [42.2 kB]
Fetched 42.2 kB in 0s (0 B/s)
Selecting previously deselected package libasterisk-agi-perl.
(Reading database ... 135138 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) ...
/dev/pts/3
09:28:32
#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:
  mysql-common libmysqlclient16
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 1 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://10.0.35.1/debian/ squeeze/main libasterisk-agi-perl all 1.01-2 [42.2 kB]
Fetched 42.2 kB in 0s (0 B/s)
Selecting previously deselected package libasterisk-agi-perl.
(Reading database ... 135138 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) ...
/dev/pts/4
09:29:04
#mkdir /var/lib/asterisk/sounds/tts

/dev/pts/3
09:29:04
#mkdir /var/lib/asterisk/sounds/tts

/dev/pts/4
09:32:27
#chmod +x /usr/local/bin/festival-agi.pl

/dev/pts/3
09:32:27
#chmod +x /usr/local/bin/festival-agi.pl

/dev/pts/4
09:32:52
#festival-agi.pl hello from festival
Use of uninitialized value $offset in concatenation (.) or string at /usr/share/perl5/Asterisk/AGI.pm line 1059.
STREAM FILE tts/tts-5d41402abc4b2a76b9719d911017c592 ""
^C
/dev/pts/3
09:32:52
#festival-agi.pl hello from festival
Use of uninitialized value $offset in concatenation (.) or string at /usr/share/perl5/Asterisk/AGI.pm line 1059.
STREAM FILE tts/tts-5d41402abc4b2a76b9719d911017c592 ""
^C
/dev/pts/4
09:34:05
#ls /var/lib/asterisk/sounds/tts/
tts-5d41402abc4b2a76b9719d911017c592.wav
/dev/pts/3
09:34:05
#ls /var/lib/asterisk/sounds/tts/
tts-5d41402abc4b2a76b9719d911017c592.wav
/dev/pts/4
09:35:07
#ls /var/lib/asterisk/sounds/tts/
exten => s,n,GotoIf($[ "${CALLERID(num):0:2}" = "21" ]?dial)
exten => s,n,SetMusicOnHold(class2)
[             ]
[xten => s,n(d]al),Dial(${ARG1},10,tTx)${STRFTIME(${EPOCH},Europe/Kiev,""
)
exten => _99XX,n,Record(${FILENAME}:gsm)
exten => _99XX,n,Playback(${FILENAME})
exten => _99XX,1,Answer
[        ]
[xten => ]700,1,System(date >> /tmp/hello-from-asterisk)/menu/${EXTEN:2}}
exten => 9701,1,Answer
exten => 9701,n,Authenticate(12345)
exten => 9701,n,System(sudo touch /tmp/root-file-from-asterisk)
"/etc/asterisk/extensions.conf" 95L, 2748C
exten => 9702,1,Festival(Hello from Kostya)
               ,AGI(/usr/local/bin/festival-agi.pl,Hello from Kostya)
exten => _227X,1,AgentLogin(${EXTEN:3})
ord)
exten => _228X,n,VoicemailMain(220${EXTEN:3},s)
exten => _228X,1,GotoIf($[ "${CALLERID(num)}" != "220${EXTEN:3}" ]?passww
"/etc/asterisk/extensions.conf" 95L, 2774C written
/dev/pts/3
09:35:07
#ls /var/lib/asterisk/sounds/tts/
exten => s,n,GotoIf($[ "${CALLERID(num):0:2}" = "21" ]?dial)
exten => s,n,SetMusicOnHold(class2)
[             ]
[xten => s,n(d]al),Dial(${ARG1},10,tTx)${STRFTIME(${EPOCH},Europe/Kiev,""
)
exten => _99XX,n,Record(${FILENAME}:gsm)
exten => _99XX,n,Playback(${FILENAME})
exten => _99XX,1,Answer
[        ]
[xten => ]700,1,System(date >> /tmp/hello-from-asterisk)/menu/${EXTEN:2}}
exten => 9701,1,Answer
exten => 9701,n,Authenticate(12345)
exten => 9701,n,System(sudo touch /tmp/root-file-from-asterisk)
"/etc/asterisk/extensions.conf" 95L, 2748C
exten => 9702,1,Festival(Hello from Kostya)
               ,AGI(/usr/local/bin/festival-agi.pl,Hello from Kostya)
exten => _227X,1,AgentLogin(${EXTEN:3})
ord)
exten => _228X,n,VoicemailMain(220${EXTEN:3},s)
exten => _228X,1,GotoIf($[ "${CALLERID(num)}" != "220${EXTEN:3}" ]?passww
"/etc/asterisk/extensions.conf" 95L, 2774C written
/dev/pts/4
09:36:36
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/3
09:36:36
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/4
09:36:51
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 10841)
Verbosity was 0 and is now 3
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
    -- Executing [9702@gr3:1] AGI("SIP/2201-00000000", "/usr/local/bin/festival-agi.pl,Hello from Kostya") in new stack
    -- Launched AGI Script /usr/local/bin/festival-agi.pl
[Oct 20 10:37:04] WARNING[10892]: file.c:650 ast_openstream_full: File tts/tts-1bfc5f98339f27985a3a7146e8e56abb does not exist in any format
    -- <SIP/2201-00000000>AGI Script /usr/local/bin/festival-agi.pl completed, returning 0
    -- Auto fallthrough, channel 'SIP/2201-00000000' status is 'UNKNOWN'
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/3
09:36:51
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux6 (pid = 10841)
Verbosity was 0 and is now 3
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
    -- Executing [9702@gr3:1] AGI("SIP/2201-00000000", "/usr/local/bin/festival-agi.pl,Hello from Kostya") in new stack
    -- Launched AGI Script /usr/local/bin/festival-agi.pl
[Oct 20 10:37:04] WARNING[10892]: file.c:650 ast_openstream_full: File tts/tts-1bfc5f98339f27985a3a7146e8e56abb does not exist in any format
    -- <SIP/2201-00000000>AGI Script /usr/local/bin/festival-agi.pl completed, returning 0
    -- Auto fallthrough, channel 'SIP/2201-00000000' status is 'UNKNOWN'
linux6*CLI> quit
Executing last minute cleanups
/dev/pts/4
09:37:20
#ls /var/lib/asterisk/sounds/tts/

/dev/pts/3
09:37:20
#ls /var/lib/asterisk/sounds/tts/

/dev/pts/4
09:37:20
#ls /var/lib/asterisk/sounds/tts/

/dev/pts/3
09:37:20
#ls /var/lib/asterisk/sounds/tts/

/dev/pts/4
09:37:20
#vim /etc/asterisk/extensions.conf
/dev/pts/3
09:37:20
#vim /etc/asterisk/extensions.conf
/dev/pts/4
09:37:20
#ls /var/lib/asterisk/sounds/tts/
bin/               scp linux9:/usr/local/bin/festival-agi.pl /usr/local/b
root@linux9's password:
festival-agi.pl                       100%  614     0.6KB/s   00:00
/dev/pts/3
09:37:20
#ls /var/lib/asterisk/sounds/tts/
bin/               scp linux9:/usr/local/bin/festival-agi.pl /usr/local/b
root@linux9's password:
festival-agi.pl                       100%  614     0.6KB/s   00:00
/dev/pts/4
09:41:32
#asterisk -rvvv

Файлы

  • /tmp/hello-from-asterisk
  • /tmp/hello-from-asterisk
    >
    Wed Oct 19 17:20:02 FET 2011
    Wed Oct 19 17:20:16 FET 2011
    Wed Oct 19 17:20:53 FET 2011
    

    Статистика

    Время первой команды журнала15:36:09 2011-10-19
    Время последней команды журнала09:41:32 2011-10-20
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 7.92
    Процент синтаксически неверно набранных команд, % 1.98
    Суммарное время работы с терминалом *, час 2.06
    Количество командных строк в единицу времени, команда/мин 0.82
    Частота использования команд
    vim14|============| 12.17%
    asterisk11|=========| 9.57%
    ls10|========| 8.70%
    echo8|======| 6.96%
    /etc/init.d/asterisk6|=====| 5.22%
    apt-get6|=====| 5.22%
    chmod4|===| 3.48%
    /etc/init.d/festival4|===| 3.48%
    /etc/default/festival4|===| 3.48%
    modprobe4|===| 3.48%
    dir4|===| 3.48%
    text2wave4|===| 3.48%
    apt-cache4|===| 3.48%
    fest2|=| 1.74%
    ps2|=| 1.74%
    mkdir2|=| 1.74%
    m-a2|=| 1.74%
    monik2|=| 1.74%
    ping2|=| 1.74%
    festival.init2|=| 1.74%
    festival-agi.pl2|=| 1.74%
    hmod2|=| 1.74%
    /etc/sudoers2|=| 1.74%
    cd2|=| 1.74%
    [sername]bat2|=| 1.74%
    !2|=| 1.74%
    less2|=| 1.74%
    cat2|=| 1.74%
    grep2|=| 1.74%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ 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
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$