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

Содержание

Журнал

Среда (06/22/11)

/dev/tty1
16:35:35
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 4757)
...
    -- <SIP/2201-00000000> Playing '/var/tmp/asterisk/record03.gsm' (language 'ru')
[Jun 22 17:42:14] NOTICE[4806]: rtp.c:1143 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.106.200
[Jun 22 17:42:17] WARNING[4806]: pbx.c:4415 __ast_pbx_run: Invalid extension '1', but no rule 'i' in context 'animalmenu'
[Jun 22 17:42:19] NOTICE[4801]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #1)
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/tty2
16:41:59
#service asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/tty1
16:42:26
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 4918)
...
[Jun 22 17:43:41] NOTICE[4962]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #2)
[Jun 22 17:43:56] NOTICE[4962]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2203
[Jun 22 17:44:01] NOTICE[4962]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #3)
[Jun 22 17:44:21] NOTICE[4962]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #4)
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
16:44:39
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 5018)
Verbosity was 0 and is now 3
[Jun 22 17:45:00] NOTICE[5062]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #1)
[Jun 22 17:45:03] WARNING[5067]: pbx.c:4415 __ast_pbx_run: Invalid extension '1', but no rule 'i' in context 'animalmenu'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
16:45:19
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 5110)
...
[Jun 22 17:46:20] NOTICE[5154]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #3)
[Jun 22 17:46:40] NOTICE[5154]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #4)
[Jun 22 17:46:59] NOTICE[5154]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2203
[Jun 22 17:47:00] NOTICE[5154]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #5)
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
16:47:01
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 5210)
...
    -- <SIP/2201-00000000> Playing '/var/lib/asterisk/sounds/tts/tts-9996a343f1534b4d51035ca049f59dfc.slin' (language 'ru')
[Jun 22 17:47:22] NOTICE[5254]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #1)
    -- <SIP/2201-00000000>AGI Script /usr/local/bin/festival-script.pl completed, returning 0
    -- Auto fallthrough, channel 'SIP/2201-00000000' status is 'UNKNOWN'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
16:47:38
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 5311)
...
[Jun 22 17:47:59] NOTICE[5355]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #1)
    -- <SIP/2201-00000000>AGI Script /usr/local/bin/festival-script.pl completed, returning 0
    -- Auto fallthrough, channel 'SIP/2201-00000000' status is 'UNKNOWN'
[Jun 22 17:48:19] NOTICE[5355]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #2)
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
16:48:36
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 5408)
...
    -- Auto fallthrough, channel 'SIP/2201-00000000' status is 'UNKNOWN'
[Jun 22 17:48:57] NOTICE[5452]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #1)
[Jun 22 17:49:17] NOTICE[5452]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #2)
[Jun 22 17:49:37] NOTICE[5452]: chan_sip.c:11696 sip_reg_timeout:    -- Registration for 'la@192.168.105.1' timed out, trying again (Attempt #3)
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
16:49:44
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 5505)
...
    -- <SIP/2201-00000002>AGI Script /usr/local/bin/festival-script.pl completed, returning 0
    -- Executing [s@kievmenu:2] WaitExten("SIP/2201-00000002", "1") in new stack
[Jun 23 09:55:18] WARNING[7181]: pbx.c:8793 pbx_builtin_waitexten: Timeout but no rule 't' in context 'kievmenu'
  == Spawn extension (kievmenu, s, 2) exited non-zero on 'SIP/2201-00000002'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups

Четверг (06/23/11)

/dev/tty2
08:50:48
#[
bin/     games/   include/ lib/     lib32/   lib64/   local/   sbin/    share/   src/
08:50:48
#cd /usr/local/bin/

08:51:03
#ls
check-stream.pl  festival-script.pl  l3-agent  l3-config  l3script
08:51:04
#vim festival-script.pl
--- /tmp/l3-saved-1996.23260.20049	2011-06-23 09:51:11.000000000 +0300
+++ festival-script.pl	2011-06-23 09:51:56.000000000 +0300
@@ -34,5 +34,6 @@
 #$AGI->stream_file('tts/'.basename($wavefile,".wav")); 
 $wavefile =~ s/.wav$//;
 #$AGI->stream_file($wavefile);
-$AGI->exec('Background', "$wavefile");
+$AGI->exec('Background', "$wavefile",m);
+
 
/dev/tty3
08:52:38
#ssh user@192.168.106.253
exten => i,1,Background(/var/tmp/asterisk/record05)     ; oshibka
exten => i,n,WaitExten(1)
exten => i,n,Goto(menu,s,start-menu)
exten => 1,1,Goto(kievmenu,s,1)
exten => 2,1,Goto(submenu,s,1)
exten => 3,1,AGI(/usr/local/bin/festival-script.pl, /var/tmp/ru-asterisk.txt)
exten => 4,1,Playback(/var/tmp/asterisk/record06)
exten => 4,n,Dial(SIP/1102)
exten => 5,1,Goto(system-menu,s,1)
exten => 9,1,Goto(menu,s,start-menu)
...
                                                                                     5,1
[kievmenu]
exten => s,1,AGI(/usr/local/bin/festival-script.pl, /var/tmp/ru-kiev.txt)
exten => s,n,WaitExten(1)
exten => 9,1,Goto(menu,s,start-menu)
exten => i,1,Background(/var/tmp/asterisk/record05)     ; oshibka
exten => i,n,WaitExten(1)
exten => i,n,Goto(kievmenu,s,1)
-- INSERT --                                                                        60,13         87%
------------------------------------------------------------------------------------------------------
/dev/tty2
08:54:22
#vim /etc/asterisk/extensions.conf
08:56:22
#[
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/tty1
08:56:28
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 7236)
...
    -- <SIP/2201-00000002>AGI Script /usr/local/bin/festival-script.pl completed, returning 0
    -- Executing [s@kievmenu:2] WaitExten("SIP/2201-00000002", "1") in new stack
[Jun 23 09:57:17] WARNING[7298]: pbx.c:8793 pbx_builtin_waitexten: Timeout but no rule 't' in context 'kievmenu'
  == Spawn extension (kievmenu, s, 2) exited non-zero on 'SIP/2201-00000002'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
09:01:56
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 7412)
...
    -- Executing [s@kievmenu:1] AGI("SIP/2201-00000000", "/usr/local/bin/festival-script.pl, /var/tmp/ru-kiev.txt") in new stack
    -- Launched AGI Script /usr/local/bin/festival-script.pl
    -- <SIP/2201-00000000>AGI Script /usr/local/bin/festival-script.pl completed, returning 0
    -- Auto fallthrough, channel 'SIP/2201-00000000' status is 'UNKNOWN'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
09:03:20
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 7509)
...
    -- Executing [2@animalmenu:1] AGI("SIP/2201-00000004", "/usr/local/bin/festival-script.pl, /var/tmp/ru-burunduk.txt") in new stack
    -- Launched AGI Script /usr/local/bin/festival-script.pl
    -- <SIP/2201-00000004>AGI Script /usr/local/bin/festival-script.pl completed, returning 0
    -- Auto fallthrough, channel 'SIP/2201-00000004' status is 'UNKNOWN'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/tty2
09:07:09
#service festival restart
Restarting Festival server: festivalNo /usr/bin/festival found running; none killed.
.
09:08:15
#service asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/tty1
09:08:15
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 7684)
Verbosity was 0 and is now 3
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/tty4
09:10:49
#ssh user@192.168.
ssh: Could not resolve hostname 192.168.: Name or service not known
прошло 16 минут
/dev/tty2
09:27:20
#exten => i,n,Goto(kievmenu,s,1)
[default]
exten => _22XX,n,Set(MON_FILENAME=record-${STRFTIME(${EPOCH},,%Y-%m-%d-%H-%M-%S)}-to${EXTEN}-from${CALLERID(num)})
[        ]
[xten => _22XX,n,Monitor(wav,${MON_FILENAME},m)
[internal]
exten => _22XX,n,Dial(SIP/${EXTEN},10)
                                                                        ; glavnoe menu
[local]> _22XX,n,Voicemail(${EXTEN}@default)
exten => 8000,1,Waiten(5)
exten => 8000,n,Playback/var/tmp/asterisk${STRFTIME(${EPOCH},,%Y-%m-%d-%H-%M-%S)}-to${EXTEN}-from${CALLERID(num)}
...
exten => 9,1,Goto(menu,s
exten => 5,1,Goto
exten => 0,1,Playback
[        ]
[kievmenu]
exten => s,1,AGI(/usr/local/bin/festival-script.pl, /var/tmp/ru-kiev.txt)
exten => s,n,WaitExten(1)
exten => 9,1,Goto(menu,s,start-menu)
-- ВСТАВ                                                                                                                                                                                   69,1           5%
exten => i,1,Background
прошло 11 минут
/dev/tty1
09:38:26
#cd //

09:38:54
#cd //

09:38:54
#cd //

09:38:55
#cd /var/tmp/asterisk/

09:39:12
#ls
melody.gsm  record01.gsm  record03.gsm  record05.gsm  record07.gsm  record09.gsm  record1.gsm              splash.gsm
melody.mp3  record02.gsm  record04.gsm  record06.gsm  record08.gsm  record11.gsm  reel_around_the_sun.gsm
09:39:13
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 2533)
...
  == Using SIP RTP CoS mark 5
[Jun 23 10:42:46] NOTICE[2577]: chan_sip.c:20281 handle_request_invite: Call from '2201' to extension '8210' rejected because extension not found in context 'gr3'.
  == Using SIP RTP CoS mark 5
[Jun 23 10:42:57] NOTICE[2577]: chan_sip.c:20281 handle_request_invite: Call from '2201' to extension '8208' rejected because extension not found in context 'gr3'.
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/tty2
09:43:53
#[
[ype=fri]nd
secret=password
host=dynamic
user=2201
callerid="Voip Phone <2201>"
context=gr3
[2201]
[2201]x=2201@default
[2202]
type=friend
...
~
~
~
~
~
~
~
~
~
~                                                                                                                                                                                               20,0-1       Весь
/dev/tty1
09:44:57
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 2669)
Verbosity was 0 and is now 3
  == Using SIP RTP CoS mark 5
[Jun 23 10:45:08] NOTICE[2713]: chan_sip.c:20281 handle_request_invite: Call from '2201' to extension '8111' rejected because extension not found in context 'gr2'.
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/tty2
09:44:57
#q!
bash: q!: команда не найдена
09:45:15
#service asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/tty1
09:45:19
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 2868)
...
    -- Executing [8222@gr2:6] Wait("SIP/2201-00000003", "1") in new stack
    -- Executing [8222@gr2:7] Playback("SIP/2201-00000003", "/var/tmp/asterisk/record22") in new stack
    -- <SIP/2201-00000003> Playing '/var/tmp/asterisk/record22.gsm' (language 'ru')
    -- Auto fallthrough, channel 'SIP/2201-00000003' status is 'UNKNOWN'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/tty2
09:47:25
#cd /var/tmp/

09:48:27
#ls
asterisk  grub.swp  ru-asterisk.txt  ru-belka.txt  ru-burunduk.txt  ru-kiev.txt
09:48:28
#cd asterisk/

09:48:30
#ls
melody.gsm  record01.gsm  record03.gsm  record05.gsm  record07.gsm  record09.gsm  record1.gsm              splash.gsm
melody.mp3  record02.gsm  record04.gsm  record06.gsm  record08.gsm  record11.gsm  reel_around_the_sun.gsm
09:48:33
#mkd
mkdir    mkdosfs
09:48:33
#mkdir ru

09:48:45
#mkdir uk

09:48:48
#ls
melody.gsm  record01.gsm  record03.gsm  record05.gsm  record07.gsm  record09.gsm  record1.gsm              ru          uk
melody.mp3  record02.gsm  record04.gsm  record06.gsm  record08.gsm  record11.gsm  reel_around_the_sun.gsm  splash.gsm
09:48:49
#mv record
record01.gsm  record02.gsm  record03.gsm  record04.gsm  record05.gsm  record06.gsm  record07.gsm  record08.gsm  record09.gsm  record11.gsm  record1.gsm
09:48:49
#ls
melody.gsm  record01.gsm  record03.gsm  record05.gsm  record07.gsm  record09.gsm  record1.gsm   reel_around_the_sun.gsm  splash.gsm
melody.mp3  record02.gsm  record04.gsm  record06.gsm  record08.gsm  record11.gsm  record22.gsm  ru                       uk
09:51:05
#mv record22.gsm /uk

09:51:14
#cd uk/

09:51:16
#ls

09:51:18
#ls

09:51:23
#ls

09:51:37
#cd ..

09:51:39
#ls
melody.gsm  record01.gsm  record03.gsm  record05.gsm  record07.gsm  record09.gsm  record1.gsm              ru          uk
melody.mp3  record02.gsm  record04.gsm  record06.gsm  record08.gsm  record11.gsm  reel_around_the_sun.gsm  splash.gsm
09:51:40
#whereis uk
uk:
09:51:53
#cd ..

09:51:57
#cd ..

09:51:58
#cd ..

09:51:58
#cd ..

09:51:59
#cd ..

09:51:59
#ls
bin  boot  dev  etc  home  initrd.img  lib  lib32  lib64  lost+found  media  mnt  opt  proc  root  sbin  selinux  srv  sys  tmp  uk  usr  var  vmlinuz
09:52:00
#mv u
uk   usr/
09:52:00
#mv u
uk   usr/
09:52:00
#mv /uk
bin/        dev/        home/       lib/        lib64/      media/      opt/        root/       selinux/    sys/        uk          var/
boot/       etc/        initrd.img  lib32/      lost+found/ mnt/        proc/       sbin/       srv/        tmp/        usr/        vmlinuz
09:52:00
#mv /uk /var/tmp/asterisk/
melody.gsm               record02.gsm             record05.gsm             record08.gsm             record1.gsm              splash.gsm
melody.mp3               record03.gsm             record06.gsm             record09.gsm             reel_around_the_sun.gsm  uk/
record01.gsm             record04.gsm             record07.gsm             record11.gsm             ru/
09:52:00
#mv /uk /var/tmp/asterisk/
melody.gsm               record02.gsm             record05.gsm             record08.gsm             record1.gsm              splash.gsm
melody.mp3               record03.gsm             record06.gsm             record09.gsm             reel_around_the_sun.gsm  uk/
record01.gsm             record04.gsm             record07.gsm             record11.gsm             ru/
09:52:00
#mv /uk /var/tmp/asterisk/
mv: невозможно перезаписать каталог «/var/tmp/asterisk/uk» файлом, не являющимся каталогом
09:52:26
#cd ..

09:52:36
#cd ..

09:52:37
#ls
bin  boot  dev  etc  home  initrd.img  lib  lib32  lib64  lost+found  media  mnt  opt  proc  root  sbin  selinux  srv  sys  tmp  uk  usr  var  vmlinuz
09:52:39
#d
Display all 189 possibilities? (y or n)
09:52:39
#de
deallocvt               debconf-copydb          debconf-show            defoma                  defoma-id               delgroup                desktop-file-install
debconf                 debconf-escape          debconf-updatepo        defoma-app              defoma-reconfigure      delpart                 desktop-file-validate
debconf-apt-progress    debconf-gettextize      debugfs                 defoma-font             defoma-subst            deluser                 devdump
debconf-communicate     debconf-set-selections  declare                 defoma-hints            defoma-user             depmod                  dexconf
09:52:39
#cd /var/tmp/asterisk/

09:53:00
#ls
melody.gsm  record01.gsm  record03.gsm  record05.gsm  record07.gsm  record09.gsm  record1.gsm              ru          uk
melody.mp3  record02.gsm  record04.gsm  record06.gsm  record08.gsm  record11.gsm  reel_around_the_sun.gsm  splash.gsm
09:53:01
#cd uk/

09:53:05
#ls

09:53:06
#cd ..

09:53:09
##cd uk/

09:53:49
#mv record22.gsm
melody.gsm               record02.gsm             record05.gsm             record08.gsm             record1.gsm              ru/
melody.mp3               record03.gsm             record06.gsm             record09.gsm             record22.gsm             splash.gsm
record01.gsm             record04.gsm             record07.gsm             record11.gsm             reel_around_the_sun.gsm  uk/
09:53:49
#mv record22.gsm /var/tmp/asterisk/uk/

09:54:07
#cd uk

09:54:11
#ls
record22.gsm
09:54:12
#chmod asterisk /u
uk   usr/
09:54:12
#chmod asterisk /u
uk   usr/
09:54:12
#chmod asterisk /uk
chmod: неверный режим: «asterisk»
Попробуйте `chmod --help' для получения более подробного описания.
09:55:53
#ls
melody.gsm  record01.gsm  record03.gsm  record05.gsm  record07.gsm  record09.gsm  record1.gsm              ru          uk
melody.mp3  record02.gsm  record04.gsm  record06.gsm  record08.gsm  record11.gsm  reel_around_the_sun.gsm  splash.gsm
09:55:54
#mc record1
09:55:54
#mc record0
09:55:54
#mc record0
09:55:54
#mc record0
09:55:54
#mc record01.gsm /var/tmp/asterisk/r
/dev/tty5
09:56:36
#mv /var/tmp/asterisk/
melody.gsm               record02.gsm             record05.gsm             record08.gsm             record1.gsm              splash.gsm
melody.mp3               record03.gsm             record06.gsm             record09.gsm             reel_around_the_sun.gsm  uk/
record01.gsm             record04.gsm             record07.gsm             record11.gsm             ru/
09:56:36
#mv /var/tmp/asterisk/re
record01.gsm             record03.gsm             record05.gsm             record07.gsm             record09.gsm             record1.gsm
record02.gsm             record04.gsm             record06.gsm             record08.gsm             record11.gsm             reel_around_the_sun.gsm
09:56:36
#mv /var/tmp/asterisk/record0
record01.gsm  record02.gsm  record03.gsm  record04.gsm  record05.gsm  record06.gsm  record07.gsm  record08.gsm  record09.gsm
09:56:36
#mv /var/tmp/asterisk/record01.gsm /var/tmp/asterisk/r
record01.gsm             record03.gsm             record05.gsm             record07.gsm             record09.gsm             record1.gsm              ru/
record02.gsm             record04.gsm             record06.gsm             record08.gsm             record11.gsm             reel_around_the_sun.gsm
09:56:36
#mv /var/tmp/asterisk/record01.gsm /var/tmp/asterisk/ru/

09:57:09
#service asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/tty1
09:57:21
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 3645)
...
    -- Timeout on SIP/2201-00000001, continuing...
    -- Executing [s@menu:4] BackGround("SIP/2201-00000001", "/var/tmp/asterisk//record02") in new stack
    -- <SIP/2201-00000001> Playing '/var/tmp/asterisk//record02.gsm' (language 'ru')
  == Spawn extension (menu, s, 4) exited non-zero on 'SIP/2201-00000001'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
10:01:26
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 3788)
...
    -- Executing [8500@gr2:1] Goto("SIP/2201-00000001", "lang-menu,s,1") in new stack
    -- Goto (lang-menu,s,1)
[Jun 23 11:01:35] WARNING[3838]: pbx.c:3680 pbx_extension_helper: No application 'Answer,1' for extension (lang-menu, s, 1)
  == Spawn extension (lang-menu, s, 1) exited non-zero on 'SIP/2201-00000001'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
10:02:02
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 3886)
...
    -- Goto (lang-menu,s,1)
    -- Executing [s@lang-menu:1] Answer("SIP/2201-00000000", "") in new stack
[Jun 23 11:02:06] WARNING[3935]: pbx.c:3680 pbx_extension_helper: No application 'Background ' for extension (lang-menu, s, 2)
  == Spawn extension (lang-menu, s, 2) exited non-zero on 'SIP/2201-00000000'
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
linux6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
10:03:05
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, 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+squeeze2 currently running on linux6 (pid = 3988)
...
    -- Executing [i@lang-menu:2] WaitExten("SIP/2201-00000002", "1") in new stack
    -- Timeout on SIP/2201-00000002, continuing...
    -- Executing [i@lang-menu:3] Goto("SIP/2201-00000002", "menu,s,start-menu") in new stack
    -- Goto (menu,s,4)
    -- Executing [s@menu:4] BackGround("SIP/2201-00000002", "/var/tmp/asterisk//record02") in new stack
    -- <SIP/2201-00000002> Playing '/var/tmp/asterisk//record02.gsm' (language 'ru')
[Jun 23 11:03:54] NOTICE[4039]: rtp.c:1143 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.106.200
  == Spawn extension (menu, s, 4) exited non-zero on 'SIP/2201-00000002'
linux6*CLI> quit
Executing last minute cleanups
10:04:32
#cd /var/tmp/asterisk/

10:04:47
#ls
melody.gsm  melody.mp3  record02.gsm  record03.gsm  record04.gsm  record05.gsm  record06.gsm  record07.gsm  record08.gsm  record09.gsm  record11.gsm  record1.gsm  reel_around_the_sun.gsm  ru  splash.gsm  uk

Статистика

Время первой команды журнала16:35:35 2011- 6-22
Время последней команды журнала10:04:47 2011- 6-23
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, % 2.97
Процент синтаксически неверно набранных команд, % 0.99
Суммарное время работы с терминалом *, час 1.47
Количество командных строк в единицу времени, команда/мин 1.15
Частота использования команд
cd21|====================| 20.59%
asterisk19|==================| 18.63%
ls17|================| 16.67%
mv15|==============| 14.71%
service5|====| 4.90%
mc5|====| 4.90%
chmod3|==| 2.94%
[3|==| 2.94%
mkdir2|=| 1.96%
vim2|=| 1.96%
ssh2|=| 1.96%
de1|| 0.98%
i,n,Goto(kievmenu,s,1)1|| 0.98%
whereis1|| 0.98%
mkd1|| 0.98%
#cd1|| 0.98%
d1|| 0.98%
exten1|| 0.98%
q!1|| 0.98%
____
*) Интервалы неактивности длительностью 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$