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

Содержание

Журнал

Четверг (04/11/13)

/dev/pts/3
09:53:30
#fg 1
[general]
context=default
register => chicago:1234@192.168.10.1/boston
language=ru
;register => brest:1234@192.168.60.1/minsk
;register => 223:rootpass22@178.63.229.229/external
;register => brest:1234@192.168.60.1/chicago
;register => 223:rootpass22@178.63.229.229/external
;xxx;register => minsk:1234@192.168.60.1/boston
;xxx;register => 223:rootpass22@178.63.229.229/Moscau
; SIP-peer
[1201]
type=friend
secret=12345
host=dynamic
context=gr1
username=Cisco
callgroup=1
pickupgroup=1
[1202]
/dev/pts/1
09:53:41
#type=friend
проверка русского языка
/dev/pts/3
09:53:41
#type=friend
проверка русского языка
/dev/pts/1
09:53:47
#~
^X^Z
[1]+  Stopped                 /usr/local/bin/asterisk-festival.pl test.txt
/dev/pts/3
09:53:47
#~
^X^Z
[1]+  Stopped                 /usr/local/bin/asterisk-festival.pl test.txt
09:59:08
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4289.19685.25691	2013-04-11 10:59:15.000000000 +0300
+++ /etc/asterisk/extensions.conf	2013-04-11 11:19:34.000000000 +0300
@@ -4,6 +4,7 @@
 exten => 8000,1,Answer
 exten => 8000,n,Wait(2)
 exten => 8000,n,Playback(welcome)
+exten => 8700,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/text/burunduki.txt)
 
 
 ;exten => 1201,1,Dial(Sip/1201)
@@ -56,7 +57,7 @@
 exten => _13XX,1,Dial(SIP/boston/${EXTEN})
 exten => _21XX,1,Dial(SIP/boston/${EXTEN})
 
-exten => _380XXXXXXXXX,1,Dial(SIP/minsk${EXTEN})
+exten => _380XXXXXXXXX,1,Dial(SIP/chicago${EXTEN})
 
 ;exten => 1205,1,Answer
 ;exten => 1205,n,Dial(SIP/1202&SIP/1203)                      
/dev/pts/1
09:59:08
#vim /etc/asterisk/extensions.conf
прошло 58 минут
10:57:27
#vin /usr/sudoers
bash: vin: command not found
/dev/pts/3
10:57:27
#vin /usr/sudoers
bash: vin: command not found
/dev/pts/1
10:58:04
#vim /usr/sudoers
/dev/pts/3
10:58:04
#vim /usr/sudoers
/dev/pts/1
10:58:22
#~
# User alias specification
# Cmnd alias specification
"/etc/sudoers" [readonly] 24L, 491C
# User privilege specification
root    ALL=(ALL) 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)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d
/dev/pts/3
10:58:22
#~
# User alias specification
# Cmnd alias specification
"/etc/sudoers" [readonly] 24L, 491C
# User privilege specification
root    ALL=(ALL) 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)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d
/dev/pts/1
11:01:39
#includedir /etc/sudoers.d
exten => 1205,1,Answer
exten => 1205,n,Dial(SIP/1202&SIP/1203)
;exten => 8701,1,System(touch /tmp/asterisk-sdelal-file)
;exten => 8702,1,System(sudo eject)
;exten => 8703,1,System(sudo eject -t)
i
exten => 8702,1,Answer
exten => 8702,n,GotoIf($[${PASSWORD} == 1234]?invalid_password:correct_password)
exten => 8702,n(invalid_password),Playback(vm-invalid-password)
;exten => 1201,1,Dial(Sip/1201)
...
exten => 8703,1,System(sudo eject -t)
exten => 8701,1,Backtiks(ABC|date)
exten => 8702,1,AnswerOp(${ABC})),Playback(vm-invalid-password)
exten => 8702,n,Hangup
exten => 8702,n(correct_password),System(sudo eject)
;exten => 1201,1,Dial(Sip/1201)
;exten => 1205,1,Dial(Sip/1202&Sip/1203)
exten => _81XX,n
exten => 1205,1,Answer
"/etc/asterisk/extensions.conf" 89L, 2788C written
/dev/pts/3
11:01:39
#includedir /etc/sudoers.d
exten => 1205,1,Answer
exten => 1205,n,Dial(SIP/1202&SIP/1203)
;exten => 8701,1,System(touch /tmp/asterisk-sdelal-file)
;exten => 8702,1,System(sudo eject)
;exten => 8703,1,System(sudo eject -t)
i
exten => 8702,1,Answer
exten => 8702,n,GotoIf($[${PASSWORD} == 1234]?invalid_password:correct_password)
exten => 8702,n(invalid_password),Playback(vm-invalid-password)
;exten => 1201,1,Dial(Sip/1201)
...
exten => 8703,1,System(sudo eject -t)
exten => 8701,1,Backtiks(ABC|date)
exten => 8702,1,AnswerOp(${ABC})),Playback(vm-invalid-password)
exten => 8702,n,Hangup
exten => 8702,n(correct_password),System(sudo eject)
;exten => 1201,1,Dial(Sip/1201)
;exten => 1205,1,Dial(Sip/1202&Sip/1203)
exten => _81XX,n
exten => 1205,1,Answer
"/etc/asterisk/extensions.conf" 89L, 2788C written
прошло 22 минуты
/dev/pts/1
11:23:47
#apt-get install art-file
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package art-file
/dev/pts/3
11:23:47
#apt-get install art-file
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package art-file
/dev/pts/1
11:24:05
#apt-get install apt-file
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl
The following NEW packages will be installed:
  apt-file curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl
0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded.
Need to get 512 kB of archives.
After this operation, 1,446 kB of additional disk space will be used.
...
Processing triggers for man-db ...
Setting up curl (7.21.0-2.1+squeeze2) ...
Setting up libconfig-file-perl (1.50-2) ...
Setting up libapt-pkg-perl (0.1.24+b1) ...
Setting up liblist-moreutils-perl (0.25~02-1) ...
Setting up libregexp-assemble-perl (0.34-3) ...
Setting up apt-file (2.4.0) ...
The system-wide cache is empty. You may want to run 'apt-file update'
as root to update the cache. You can also run 'apt-file update' as
normal user to use a cache in the user's home directory.
/dev/pts/3
11:24:05
#apt-get install apt-file
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl
The following NEW packages will be installed:
  apt-file curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl
0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded.
Need to get 512 kB of archives.
After this operation, 1,446 kB of additional disk space will be used.
...
Processing triggers for man-db ...
Setting up curl (7.21.0-2.1+squeeze2) ...
Setting up libconfig-file-perl (1.50-2) ...
Setting up libapt-pkg-perl (0.1.24+b1) ...
Setting up liblist-moreutils-perl (0.25~02-1) ...
Setting up libregexp-assemble-perl (0.34-3) ...
Setting up apt-file (2.4.0) ...
The system-wide cache is empty. You may want to run 'apt-file update'
as root to update the cache. You can also run 'apt-file update' as
normal user to use a cache in the user's home directory.
прошла 81 минута
/dev/pts/1
12:46:04
#[ ]
[1]+  Stopped                 /usr/bin/vim "$@"
/dev/pts/3
12:46:04
#[ ]
[1]+  Stopped                 /usr/bin/vim "$@"
/dev/pts/1
12:46:09
#fg 1
проверка русского языка
/dev/pts/3
12:46:09
#fg 1
проверка русского языка
/dev/pts/1
12:46:23
#~

/dev/pts/3
12:46:23
#~

/dev/pts/1
12:56:08
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/3
12:56:08
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/1
12:56:44
#ls /etc/asterisk/a*.comf
ls: cannot access /etc/asterisk/a*.comf: No such file or directory
/dev/pts/3
12:56:44
#ls /etc/asterisk/a*.comf
ls: cannot access /etc/asterisk/a*.comf: No such file or directory
/dev/pts/5
12:56:44
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728)
Verbosity was 0 and is now 2
...
[Apr 11 14:47:11] WARNING[7059]: pbx.c:9625 pbx_parseable_goto: Priority 'start' must be a number > 0, or valid label
  == Spawn extension (menu, 9, 1) exited non-zero on 'SIP/1201-00000019'
  == Using SIP RTP CoS mark 5
[Apr 11 14:47:27] WARNING[7061]: pbx.c:4415 __ast_pbx_run: Invalid extension '0', but no rule 'i' in context 'submenu'
Linux2*CLI> xit
No such command 'xit' (type 'core show help xit' for other possible commands)
Linux2*CLI> vim /var/tmp/text/belki.txt
No such command 'vim /var/tmp/text/belki.txt' (type 'core show help vim /var/tmp/text/belki.txt' for other possible commands)
Linux2*CLI> exit
Executing last minute cleanups
/dev/pts/2
12:56:44
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728)
Verbosity was 0 and is now 2
...
[Apr 11 14:47:11] WARNING[7059]: pbx.c:9625 pbx_parseable_goto: Priority 'start' must be a number > 0, or valid label
  == Spawn extension (menu, 9, 1) exited non-zero on 'SIP/1201-00000019'
  == Using SIP RTP CoS mark 5
[Apr 11 14:47:27] WARNING[7061]: pbx.c:4415 __ast_pbx_run: Invalid extension '0', but no rule 'i' in context 'submenu'
Linux2*CLI> xit
No such command 'xit' (type 'core show help xit' for other possible commands)
Linux2*CLI> vim /var/tmp/text/belki.txt
No such command 'vim /var/tmp/text/belki.txt' (type 'core show help vim /var/tmp/text/belki.txt' for other possible commands)
Linux2*CLI> exit
Executing last minute cleanups
прошло 42 минуты
/dev/pts/3
13:39:25
#vim /etc/asterisk/extensions.conf
/dev/pts/1
13:39:25
#vim /etc/asterisk/extensions.conf
13:42:12
#exten => s,n,WaitExten(3)
exten => 1204,n,Queue(queue1)
;exten => 8300,1,Voicemailmain()        ;voicemail
;exten => 8301,1,Meetme(1234)           ;conferenc
;exten => 8302,1,Meetme(1234,m)         ;conferenc
[local]
[local]
exten => _12XX,1,Answer
;exten => _12XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${EPOCH})
;exten => _12XX,n,Monitor(wav,${CALLFILENAME},m)
exten => _12XX,n,Dial(SIP/${EXTEN},10,wW)
exten => 8000,1,Answer(/var/tmp/message/04)                                               105,1         65%
exten => _21XX,1,Dial(SIP/boston/${EXTEN})
exten => _380XXXXXXXXX,1,Dial(SIP/chicago${EXTEN})
;exten => 1205,1,Answer
;exten => 1205,n,Dial(SIP/1202&SIP/1203)
[gr1]
[gr1]
include => local
include => international
[gr2]
include => internalal(SIP/boston/${EXTEN})                                                141,0-1       95%
/dev/pts/3
13:42:12
#exten => s,n,WaitExten(3)
[internal]
[        ]
exten => 8000,n,Wait(2)
exten => 8000,n,Playback(welcome)
exten => 8700,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/text/burunduki.txt)
exten => 8800,1,Goto(menu,s,1)
;exten => 8701,1,System(touch /tmp/asterisk-sdelal-file)
;exten => 8702,1,System(sudo eject)
exten => 8000,1,Answer(/var/tmp/message/04)                                               66,1          32%
exten => _21XX,1,Dial(SIP/boston/${EXTEN})
exten => _380XXXXXXXXX,1,Dial(SIP/chicago${EXTEN})
;exten => 1205,1,Answer
;exten => 1205,n,Dial(SIP/1202&SIP/1203)
[gr1]
[gr1]
include => local
include => international
[gr2]
include => internalal(SIP/boston/${EXTEN})                                                141,0-1       95%
/dev/pts/1
13:44:15
#vim /etc/asterisk/extensions.conf
/dev/pts/3
13:44:15
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4289.31095.721	2013-04-11 14:44:18.000000000 +0300
+++ /etc/asterisk/extensions.conf	2013-04-11 14:49:27.000000000 +0300
@@ -12,9 +12,12 @@
 exten => s,n,Hangup
 
 
+exten => 1,1,Goto(submenu,s,1)
 
+exten => 9,1,Goto(menu,s,start)
+
+exten => 0,1,Goto(submenu,s,finish)
 
-                                                                                                                           
 [submenu]                                                                                                                  
 exten => s,1,Answer
 exten => s,n,Background(/var/tmp/message/06)
/dev/pts/5
13:53:34
#vim /var/tmp/text/belki.txt
/dev/pts/2
13:53:34
#vim /var/tmp/text/belki.txt
/dev/pts/3
13:54:42
#fdjasdlflkjlkjlkjkjkjljkljkKJLKJLJLKJlkjlkjjlkjLkjljLKJLKJLKJLKJlkjlkjsadfs
bash: fdjasdlflkjlkjlkjkjkjljkljkKJLKJLJLKJlkjlkjjlkjLkjljLKJLKJLKJLKJlkjlkjsadfs: command not found
/dev/pts/1
13:54:42
#fdjasdlflkjlkjlkjkjkjljkljkKJLKJLJLKJlkjlkjjlkjLkjljLKJLKJLKJLKJlkjlkjsadfs
bash: fdjasdlflkjlkjlkjkjkjljkljkKJLKJLJLKJlkjlkjjlkjLkjljLKJLKJLKJLKJlkjlkjsadfs: command not found
13:55:00
#lkjlkjlkjlkjLJKLKJljljLKJLKJlkjljlkjkjllkjljkl
bash: lkjlkjlkjlkjLJKLKJljljLKJLKJlkjljlkjkjllkjljkl: command not found
/dev/pts/3
13:55:00
#lkjlkjlkjlkjLJKLKJljljLKJLKJlkjljlkjkjllkjljkl
bash: lkjlkjlkjlkjLJKLKJljljLKJLKJlkjljlkjkjllkjljkl: command not found
/dev/pts/1
13:55:50
#nano /etc/asterisk/extensions.conf
/dev/pts/3
13:55:50
#nano /etc/asterisk/extensions.conf
/dev/pts/5
13:58:37
#vim /var/tmp/burunduki.txt
--- /dev/null	2013-04-11 09:27:26.676901704 +0300
+++ /var/tmp/burunduki.txt	2013-04-11 14:59:51.000000000 +0300
@@ -0,0 +1 @@
+Hello  two
/dev/pts/2
13:58:37
#vim /var/tmp/burunduki.txt
/dev/pts/5
14:01:31
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728)
Verbosity is at least 2
...
[Apr 11 15:19:56] WARNING[7403]: file.c:650 ast_openstream_full: File /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f does not exist in any format
[Apr 11 15:19:56] WARNING[7403]: file.c:953 ast_streamfile: Unable to open /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f (format 0x4 (ulaw)): No such file or directory
[Apr 11 15:19:56] WARNING[7403]: app_playback.c:471 playback_exec: ast_streamfile failed on SIP/1201-00000028 for /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f
  == Using SIP RTP CoS mark 5
[Apr 11 15:19:57] NOTICE[7403]: rtp.c:1143 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.20.100
  == Spawn extension (submenu3, 1, 2) exited non-zero on 'SIP/1201-00000028'
Linux2*CLI> database get order 1
Database entry not found.
Linux2*CLI> exit
Executing last minute cleanups
/dev/pts/2
14:01:31
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728)
Verbosity is at least 2
...
[Apr 11 15:19:56] WARNING[7403]: file.c:650 ast_openstream_full: File /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f does not exist in any format
[Apr 11 15:19:56] WARNING[7403]: file.c:953 ast_streamfile: Unable to open /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f (format 0x4 (ulaw)): No such file or directory
[Apr 11 15:19:56] WARNING[7403]: app_playback.c:471 playback_exec: ast_streamfile failed on SIP/1201-00000028 for /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f
  == Using SIP RTP CoS mark 5
[Apr 11 15:19:57] NOTICE[7403]: rtp.c:1143 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.20.100
  == Spawn extension (submenu3, 1, 2) exited non-zero on 'SIP/1201-00000028'
Linux2*CLI> database get order 1
Database entry not found.
Linux2*CLI> exit
Executing last minute cleanups
/dev/pts/1
14:06:07
#exten => s,n,Background(/var/tmp/message/04)
exten => 9,1,Goto(submenu,s,1)
exten => 0,1,Goto(menu,s,start)
[default]
                                                                                          40,0-1        12%
-- INSERT --                                                                              51,1          17%
exten => s,1,Answer
exten => s,n,Background(/var/tmp/message/10)
exten => s,n,WaitExten(3)
exten => s,n,Background(/var/tmp/message/03)
exten => s,n,WaitExten(3)
...
exten => s,n,WaitExten(3)
;exten => 2,1,Goto(submenu3,s,1)
;exten => s,1,Background(/var/tmp/message/07)
exten => 9,1,Goto(menu,s,start)
exten => 0,1,Goto(submenu,s,finish)
exten => s,1,Answer
[submenu]
exten => s,n,Background(/var/tmp/message/06)
exten => s,n,Background(/var/tmp/message/05)                                              23,0-1         4%
[1]+  Stopped                 /usr/bin/vim "$@"
/dev/pts/3
14:06:07
#exten => s,n,Background(/var/tmp/message/04)
exten => 2,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/text/burunduki.txt)
exten => 2,n,Goto(submenu,s,1)
exten => 9,1,Goto(submenu,s,1)
exten => 0,1,Goto(menu,s,start)
[default]
                                                                                          40,0-1        12%
-- INSERT --                                                                              49,1          16%
exten => s,1,Answer
exten => s,n,Background(/var/tmp/message/10)
exten => s,n,WaitExten(3)
...
[submenu]
;exten => 2,1,Goto(submenu3,s,1)
;exten => s,1,Background(/var/tmp/message/07)
exten => 9,1,Goto(menu,s,start)
exten => 0,1,Goto(submenu,s,finish)
exten => s,1,Answer
[submenu]
exten => s,n,Background(/var/tmp/message/06)
exten => s,n,Background(/var/tmp/message/05)                                              23,0-1         4%
[1]+  Stopped                 /usr/bin/vim "$@"
прошло 23 минуты
/dev/pts/2
14:30:06
#ast
astcanary              astgenkey              astribank_hexload
asterisk               astman                 astribank_is_starting
asterisk-festival.pl   astribank_allow        astribank_tool
/dev/pts/5
14:30:06
#ast
astcanary              astgenkey              astribank_hexload
asterisk               astman                 astribank_is_starting
asterisk-festival.pl   astribank_allow        astribank_tool
14:30:06
#asterisk -rx "database put order 1 1"
Updated database successfully
/dev/pts/2
14:30:06
#asterisk -rx "database put order 1 1"
Updated database successfully
/dev/pts/5
14:31:11
#for i in {1..1000}; do echo $i; asterisk -rx "database put order $i $[RANDOM%3]"; done
1
Updated database successfully
2
Updated database successfully
3
Updated database successfully
4
Updated database successfully
5
Updated database successfully
...
996
Updated database successfully
997
Updated database successfully
998
Updated database successfully
999
Updated database successfully
1000
Updated database successfully
/dev/pts/2
14:31:11
#for i in {1..1000}; do echo $i; asterisk -rx "database put order $i $[RANDOM%3]"; done
1
Updated database successfully
2
Updated database successfully
3
Updated database successfully
4
Updated database successfully
5
Updated database successfully
...
996
Updated database successfully
997
Updated database successfully
998
Updated database successfully
999
Updated database successfully
1000
Updated database successfully
/dev/pts/5
14:32:42
#asterisk -rx "database get order 10"
Value: 0
/dev/pts/2
14:32:42
#asterisk -rx "database get order 10"
Value: 0
/dev/pts/5
14:32:50
#asterisk -rx "database get order 310"
Value: 2
/dev/pts/2
14:32:50
#asterisk -rx "database get order 310"
Value: 2
прошло 73 минуты
/dev/pts/3
15:46:06
#vim test.txt
/dev/pts/1
15:46:06
#vim test.txt
15:46:26
#vim /etc/asterisk/extensions.conf
/dev/pts/3
15:46:26
#vim /etc/asterisk/extensions.conf
/dev/pts/1
15:46:51
#fg 1
exten => s,n,WaitExten(1)
exten => s,n,Background(/var/tmp/message/05)
exten => s,n,Hangup
exten => 1,1,Goto(submenu,s,1)
;exten => 2,1,Goto(submenu3,s,1)
;exten => s,1,Background(/var/tmp/message/07)
exten => 2,1,Read(ORDER,/var/tmp/message/07)
exten => 2,n,Background(/var/tmp/message/16)
exten => 9,1,Goto(menu,s,start)
exten => 2,n,SayDigits({$ORDER})
"/etc/asterisk/extensions.conf" 215L, 5770C written
/dev/pts/3
15:46:51
#fg 1
exten => s,n,WaitExten(1)
exten => s,n,Background(/var/tmp/message/05)
exten => s,n,Hangup
exten => 1,1,Goto(submenu,s,1)
;exten => 2,1,Goto(submenu3,s,1)
;exten => s,1,Background(/var/tmp/message/07)
exten => 2,1,Read(ORDER,/var/tmp/message/07)
exten => 2,n,Background(/var/tmp/message/16)
exten => 9,1,Goto(menu,s,start)
exten => 2,n,SayDigits({$ORDER})
"/etc/asterisk/extensions.conf" 215L, 5770C written
/dev/pts/1
15:47:05
#fg 2
cret=1234cret=1234                                                                        28,1           5%
canreinvite=no
qualify=yes
defaultuser=brest                                                                         31,1          21%
callerid="Igor Chubin" cret=1234cret=1234 cret=123cret=123cret=123444
callerid="Igor Chubin" cret=1234cret=1234 cret=123cret=123cret=123444
[root@linux7:~]# # http://db.tt/I6AEo6jh
[allerid="Igor]Chubin" cret=1234cret=1234 cret=123cret=123cret=123444                     37,1          52%
toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id)                         40,1          68%
exten => 2,n,Hangup
exten => 2,n(wrong_order_id),Playback(/var/tmp/message/12)
                                                                                          46,0-1        Bot
-- INSERT --                                                                              48,1          Bot
_STATUS=${SHELL(/var/tmp/commands/order-state.sh ${ORDER})})
 ${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id)
 der_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+3])
"test.txt" 69L, 1909C written
/dev/pts/3
15:47:05
#fg 2
ot@linux7:~]# mkdir /var/tmp/message/
[root@linux7:~]# chown asterisk:asterisk /var/tmp/message/
[             ]
[             ]
includ => internal
ot@linux7:~]#
[general]
register => br
; SIP-peer
[2301]
...
host=dynamic
defaultuser=brest
canreinvite=no
[minsk]
qualify=yes
exten => 2,n(wrong_order_id),Playback(/var/tmp/message/12)                                22,1          Top
_STATUS=${SHELL(/var/tmp/commands/order-state.sh ${ORDER})})
 ${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id)
 der_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+3])
"test.txt" 69L, 1909C written
/dev/pts/1
15:47:54
#vim /etc/asterisk/extensions.conf
/dev/pts/3
15:47:54
#vim /etc/asterisk/extensions.conf
/dev/pts/1
15:48:27
#exten => 0,1,Goto(menu,s,start)
include => internal
include => local
include => international
[gr2]
include => internal
include => local
[gr3]
include => internal
toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id)
exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2])
...
exten => 2,1,Read(ORDER,/var/tmp/message/07)
exten => 2,n,Background(/var/tmp/message/16)
-- INSERT --                                                                              42,1           7%
toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id)                         24,0-1        Top
exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2])
;toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id)
;exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2])
;exten => 2,n,Hanguprder_id),Playback(/var/tmp/message/12)
;exten => 2,n(wrong_order_id),Playback(/var/tmp/message/12)
"/etc/asterisk/extensions.conf" 244L, 6029C written
/dev/pts/3
15:48:27
#exten => 0,1,Goto(menu,s,start)
"/etc/asterisk/extensions.conf" 215L, 5770C
exten => 1,1,Goto(submenu,s,1)
;exten => 2,1,Goto(submenu3,s,1)
;exten => s,1,Background(/var/tmp/message/07)
exten => 2,1,Read(ORDER,/var/tmp/message/07)
exten => 2,n,Background(/var/tmp/message/16)
exten => 2,n,SayDigits({$ORDER})                                                          25,0-1        Top
-- INSERT --                                                                              31,1           2%
exten => _12XX,n,Voicemail(${EXTEN}@default)
;exten => _12XX,1,Answer
...
exten => 2,1,Read(ORDER,/var/tmp/message/07)
exten => 2,n,Background(/var/tmp/message/16)
-- INSERT --                                                                              42,1           7%
toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id)                         24,0-1        Top
exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2])
;toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id)
;exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2])
;exten => 2,n,Hanguprder_id),Playback(/var/tmp/message/12)
;exten => 2,n(wrong_order_id),Playback(/var/tmp/message/12)
"/etc/asterisk/extensions.conf" 244L, 6029C written
/dev/pts/5
15:56:15
#chown asterisk:asterisk /var/tmp/text/channel.txt

/dev/pts/2
15:56:15
#chown asterisk:asterisk /var/tmp/text/channel.txt

/dev/pts/5
15:56:44
#cp /var/tmp/text/channel.txt /var/spool/asterisk/outgoing/

/dev/pts/2
15:56:44
#cp /var/tmp/text/channel.txt /var/spool/asterisk/outgoing/

/dev/pts/1
15:59:09
#mv /var/tmp/text/channel.txt /var/spool/asterisk/outgoing/

/dev/pts/3
15:59:09
#mv /var/tmp/text/channel.txt /var/spool/asterisk/outgoing/

/dev/pts/5
16:01:59
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728)
Verbosity is at least 2
[Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:234 apply_outgoing: Unknown keyword 'hannel' at line 1 of /var/spool/asterisk/outgoing/channel.txt
[Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:242 apply_outgoing: At least one of app or extension must be specified, along with tech and dest in file /var/spool/asterisk/outgoing/channel.txt
[Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:400 scan_service: Invalid file contents in /var/spool/asterisk/outgoing/channel.txt, deleting
[Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:492 scan_thread: Failed to scan service '/var/spool/asterisk/outgoing/channel.txt'
Linux2*CLI> exit
Executing last minute cleanups
/dev/pts/2
16:01:59
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728)
Verbosity is at least 2
[Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:234 apply_outgoing: Unknown keyword 'hannel' at line 1 of /var/spool/asterisk/outgoing/channel.txt
[Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:242 apply_outgoing: At least one of app or extension must be specified, along with tech and dest in file /var/spool/asterisk/outgoing/channel.txt
[Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:400 scan_service: Invalid file contents in /var/spool/asterisk/outgoing/channel.txt, deleting
[Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:492 scan_thread: Failed to scan service '/var/spool/asterisk/outgoing/channel.txt'
Linux2*CLI> exit
Executing last minute cleanups
/dev/pts/1
16:02:16
#vim /var/tmp/text/channel.txt
/dev/pts/3
16:02:16
#vim /var/tmp/text/channel.txt
--- /dev/null	2013-04-11 09:27:26.676901704 +0300
+++ /var/tmp/text/channel.txt	2013-04-11 17:03:23.000000000 +0300
@@ -0,0 +1,3 @@
+channel:SIP/2301                                                                                                           
+Context:default                                                                                                            
+Extension:8301 
/dev/pts/1
16:03:23
#chown asterisk:asterisk /var/tmp/text/channel.txt

/dev/pts/3
16:03:23
#chown asterisk:asterisk /var/tmp/text/channel.txt

16:03:37
#chown asterisk:asterisk /var/tmp/text/channel.txt
chown: cannot access `/var/tmp/text/channel.txt': No such file or directory
/dev/pts/1
16:03:37
#chown asterisk:asterisk /var/tmp/text/channel.txt
chown: cannot access `/var/tmp/text/channel.txt': No such file or directory
прошло 32 минуты
16:35:47
#init 0

/dev/pts/3
16:35:47
#init 0

Пятница (04/12/13)

/dev/pts/2
08:32:51
#lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 09da:000a A4 Tech Co., Ltd Port Mouse
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
08:33:19
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)
00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02)
00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02)
00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02)
00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02)
07:0b.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog card (rev 11)
прошло 17 минут
/dev/pts/2
08:51:08
#dahdi_genconf
Unrecognized garbage 'Reserved' in WCTDM/0/0
Unrecognized garbage 'Reserved' in WCTDM/0/1
Unrecognized garbage 'Reserved' in WCTDM/0/3

Статистика

Время первой команды журнала09:53:30 2013- 4-11
Время последней команды журнала08:51:08 2013- 4-12
Количество командных строк в журнале92
Процент команд с ненулевым кодом завершения, %32.61
Процент синтаксически неверно набранных команд, % 6.52
Суммарное время работы с терминалом *, час 2.20
Количество командных строк в единицу времени, команда/мин 0.70
Частота использования команд
vim20|===================| 19.23%
asterisk14|=============| 13.46%
fg7|======| 6.73%
chown6|=====| 5.77%
~6|=====| 5.77%
exten6|=====| 5.77%
apt-get4|===| 3.85%
type=friend2|=| 1.92%
fdjasdlflkjlkjlkjkjkjljkljkKJLKJLJLKJlkjlkjjlkjLkjljLKJLKJLKJLKJlkjlkjsadfs2|=| 1.92%
lkjlkjlkjlkjLJKLKJljljLKJLKJlkjljlkjkjllkjljkl2|=| 1.92%
/etc/init.d/asterisk2|=| 1.92%
cp2|=| 1.92%
for2|=| 1.92%
04)2|=| 1.92%
includedir2|=| 1.92%
nano2|=| 1.92%
[2|=| 1.92%
init2|=| 1.92%
ast2|=| 1.92%
vin2|=| 1.92%
mv2|=| 1.92%
ls2|=| 1.92%
do2|=| 1.92%
0,1,Goto(menu,s,start)2|=| 1.92%
done2|=| 1.92%
s,n,WaitExten(3)2|=| 1.92%
lsusb1|| 0.96%
lspci1|| 0.96%
dahdi_genconf1|| 0.96%
____
*) Интервалы неактивности длительностью 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$