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

Содержание

Журнал

Понедельник (11/18/13)

/dev/pts/1
13:20:02
#l3-agent

13:20:16
#date
Mon Nov 18 14:20:19 EET 2013
13:20:19
#apt-get install bb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libmikmod2 oss-compat
The following NEW packages will be installed:
  bb libmikmod2 oss-compat
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,380 kB of archives.
After this operation, 2,328 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Err http://192.168.15.254/debian/ wheezy/main libmikmod2 amd64 3.1.12-5
  500  Internal Server Error
Err http://192.168.15.254/debian/ wheezy/main oss-compat amd64 2
  500  Internal Server Error
Err http://192.168.15.254/debian/ wheezy/main bb amd64 1.3rc1-8.1
  500  Internal Server Error
Failed to fetch http://192.168.15.254:9999/debian/pool/main/libm/libmikmod/libmikmod2_3.1.12-5_amd64.deb  500  Internal Server Error
Failed to fetch http://192.168.15.254:9999/debian/pool/main/o/oss-compat/oss-compat_2_amd64.deb  500  Internal Server Error
Failed to fetch http://192.168.15.254:9999/debian/pool/main/b/bb/bb_1.3rc1-8.1_amd64.deb  500  Internal Server Error
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
прошло 10 минут
13:31:17
#apt-get update
Err http://192.168.15.254 wheezy Release.gpg
  Connection failed
Ign http://192.168.15.254 wheezy Release
Ign http://192.168.15.254 wheezy/main amd64 Packages/DiffIndex
Err http://192.168.15.254 wheezy/main Translation-en_US
  Connection failed
Err http://192.168.15.254 wheezy/main Translation-en
  Connection failed
Err http://192.168.15.254 wheezy/main amd64 Packages
  Connection failed
W: Failed to fetch http://192.168.15.254:9999/debian/dists/wheezy/Release.gpg  Connection failed
W: Failed to fetch http://192.168.15.254:9999/debian/dists/wheezy/main/i18n/Translation-en_US  Connection failed
W: Failed to fetch http://192.168.15.254:9999/debian/dists/wheezy/main/i18n/Translation-en  Connection failed
W: Failed to fetch http://192.168.15.254:9999/debian/dists/wheezy/main/binary-amd64/Packages  Connection failed
E: Some index files failed to download. They have been ignored, or old ones used instead.
13:35:57
#dpkg -l | wc -l\
> dpkg -l | wc -l
wc: invalid option -- 'd'
Try `wc --help' for more information.
0
13:42:37
#dpkg -l | wc -l
1421
13:42:45
#dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  accountsservic 0.6.21-8     amd64        query and manipulate user account
ii  acl            2.2.51-8     amd64        Access control list utilities
ii  acpi           1.6-1        amd64        displays information on ACPI devi
ii  acpi-support-b 0.140-5      all          scripts for handling base ACPI ev
ii  acpid          1:2.0.16-1+d amd64        Advanced Configuration and Power
...
ii  xserver-xorg-v 1:12.0.2-1+b amd64        X.Org X server -- VMware display
ii  xserver-xorg-v 1:1.2.4-2+b3 amd64        X.Org X server -- Voodoo display
ii  xulrunner-17.0 17.0.9esr-1~ amd64        XUL + XPCOM application runner
ii  xz-utils       5.1.1alpha+2 amd64        XZ-format compression utilities
ii  yelp           3.4.2-1+b1   amd64        Help browser for GNOME
ii  yelp-xsl       3.4.2-1      all          XSL stylesheets for the yelp help
ii  zeitgeist-core 0.9.0.1-1    amd64        event logging framework - engine
ii  zenity         3.4.0-2      amd64        Display graphical dialog boxes fr
ii  zenity-common  3.4.0-2      all          Display graphical dialog boxes fr
ii  zlib1g:amd64   1:1.2.7.dfsg amd64        compression library - runtime
13:43:06
#apt-cache search asterisk
asterisk - Open Source Private Branch Exchange (PBX)
asterisk-config - Configuration files for Asterisk
asterisk-dahdi - DAHDI devices support for the Asterisk PBX
asterisk-dbg - Debugging symbols for Asterisk
asterisk-dev - Development files for Asterisk
asterisk-doc - Source code documentation for Asterisk
asterisk-mobile - Bluetooth phone support for the Asterisk PBX
asterisk-modules - loadable modules for the Asterisk PBX
asterisk-mp3 - MP3 playback support for the Asterisk PBX
asterisk-mysql - MySQL database protocol support for the Asterisk PBX
...
linphone-dbg - Debugging symbols for linphone and its libraries
op-panel - switchboard type application for the Asterisk PBX
libopenr2-3 - MFC/R2 (telephony) call setup library
python-asterisk - Asterisk Manager API interface module for Python
libsipwitch-dev - secure peer-to-peer SIP VoIP server - development files
libsipwitch1 - secure peer-to-peer SIP VoIP server - development files
libsipwitch1-dbg - secure peer-to-peer SIP VoIP server - development files
sipwitch - secure peer-to-peer VoIP server for the SIP protocol
sipwitch-cgi - secure peer-to-peer SIP VoIP server - CGI XML-RPC interface
python-starpy - Asterisk (AMI) protocols for Twisted Python
13:48:52
#. /etc/bash_completion

13:49:30
#telnet 192.168.15.254L:9999
l3script: telnet: command not found
13:50:05
#telnet 192.168.15.254:9999
l3script: telnet: command not found
13:50:07
#apt-get install telnet\
> ^C^@
13:50:24
#apt-get install telnet
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  telnet
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 71.8 kB of archives.
After this operation, 205 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  telnet
Install these packages without verification [y/N]? y
Err http://192.168.15.254/debian/ wheezy/main telnet amd64 0.17-36
  Connection failed
Failed to fetch http://192.168.15.254:9999/debian/pool/main/n/netkit-telnet/telnet_0.17-36_amd64.deb  Connection failed
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
13:50:30
#nc 192.168.15.254 9999

13:51:42
#nc
Cmd line: ^C
13:52:05
#nc ?
?: forward host lookup failed: Unknown host : Connection timed out
13:52:07
#nc -h
[v1.10-40]
connect to somewhere:   nc [-options] hostname port[s] [ports] ...
listen for inbound:     nc -l -p port [-options] [hostname] [port]
options:
        -c shell commands       as `-e'; use /bin/sh to exec [dangerous!!]
        -e filename             program to exec after connect [dangerous!!]
        -b                      allow broadcasts
        -g gateway              source-routing hop point[s], up to 8
        -G num                  source-routing pointer: 4, 8, 12, ...
        -h                      this cruft
...
        -q secs                 quit after EOF on stdin and delay of secs
        -s addr                 local source address
        -T tos                  set Type Of Service
        -t                      answer TELNET negotiation
        -u                      UDP mode
        -v                      verbose [use twice to be more verbose]
        -w secs                 timeout for connects and final net reads
        -z                      zero-I/O mode [used for scanning]
port numbers can be individual or ranges: lo-hi [inclusive];
hyphens in port names must be backslash escaped (e.g. 'ftp\-data').
13:52:10
#nc 192.168.15.254 9999
^C
13:55:37
#dpkg -L
dpkg-query: error: --listfiles needs at least one package name argument
Use --help for help about querying packages.
прошло 24 минуты
14:20:30
#dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version        Architecture   Description
+++-===================-==============-==============-===========================================
ii  accountsservice     0.6.21-8       amd64          query and manipulate user account informati
ii  acl                 2.2.51-8       amd64          Access control list utilities
ii  acpi                1.6-1          amd64          displays information on ACPI devices
ii  acpi-support-base   0.140-5        all            scripts for handling base ACPI events such
ii  acpid               1:2.0.16-1+deb amd64          Advanced Configuration and Power Interface
...
ii  xserver-xorg-video- 1:12.0.2-1+b1  amd64          X.Org X server -- VMware display driver
ii  xserver-xorg-video- 1:1.2.4-2+b3   amd64          X.Org X server -- Voodoo display driver
ii  xulrunner-17.0      17.0.9esr-1~de amd64          XUL + XPCOM application runner
ii  xz-utils            5.1.1alpha+201 amd64          XZ-format compression utilities
ii  yelp                3.4.2-1+b1     amd64          Help browser for GNOME
ii  yelp-xsl            3.4.2-1        all            XSL stylesheets for the yelp help browser
ii  zeitgeist-core      0.9.0.1-1      amd64          event logging framework - engine
ii  zenity              3.4.0-2        amd64          Display graphical dialog boxes from shell s
ii  zenity-common       3.4.0-2        all            Display graphical dialog boxes from shell s
ii  zlib1g:amd64        1:1.2.7.dfsg-1 amd64          compression library - runtime
14:20:34
#dpkg -L asterisk | less
14:23:53
#dpkg -L asterisk-modules | less
14:24:15
#dpkg -L asterisk | less
14:25:44
#ls /etc/init.d/asterisk
/etc/init.d/asterisk
14:25:56
#ls -l /etc/rc2.d/*asterisk
lrwxrwxrwx 1 root root 18 Nov 18 14:55 /etc/rc2.d/S02asterisk -> ../init.d/asterisk
14:27:04
#runlevel
N 2
14:27:40
#update-rc.d
update-rc.d: using dependency based boot sequencing
update-rc.d: error: not enough arguments
usage: update-rc.d [-n] [-f] <basename> remove
       update-rc.d [-n] <basename> defaults [NN | SS KK]
       update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
       update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
                -n: not really
                -f: force
The disable|enable API is not stable and might change in the future.
14:28:22
#update-rc.d
update-rc.d: using dependency based boot sequencing
update-rc.d: error: not enough arguments
usage: update-rc.d [-n] [-f] <basename> remove
       update-rc.d [-n] <basename> defaults [NN | SS KK]
       update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
       update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
                -n: not really
                -f: force
The disable|enable API is not stable and might change in the future.
14:28:48
#ls /etc/init.d
acpid                   dbus            motd                   pulseaudio      single
asterisk                exim4           mountall-bootclean.sh  rc              skeleton
avahi-daemon            gdm3            mountall.sh            rc.local        speech-dispatcher
binfmt-support          halt            mountdevsubfs.sh       rcS             ssh
bluetooth               hdparm          mountkernfs.sh         README          sudo
bootlogs                hostname.sh     mountnfs-bootclean.sh  reboot          udev
bootmisc.sh             hwclock.sh      mountnfs.sh            rmnologin       udev-mtab
checkfs.sh              kbd             mtab.sh                rsync           umountfs
checkroot-bootclean.sh  keyboard-setup  networking             rsyslog         umountnfs.sh
checkroot.sh            killprocs       network-manager        saned           umountroot
console-setup           kmod            pppd-dns               screen-cleanup  urandom
cron                    minissdpd       procps                 sendsigs        x11-common
14:30:00
#ls /etc/init.d/asterisk
/etc/init.d/asterisk
14:30:10
#/etc/default/asterisk
l3script: /etc/default/asterisk: Permission denied
14:30:42
#dpkg -L asterisk | grep default
/etc/default
/etc/default/asterisk
14:30:59
#ps aux | less
14:34:30
#ps aux | wc -l
127
14:34:41
#kill -l
 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP
 6) SIGABRT      7) SIGBUS       8) SIGFPE       9) SIGKILL     10) SIGUSR1
11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR
31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3
38) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7
58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX
14:35:45
#ps ajx
 PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
    0     1     1     1 ?           -1 Ss       0   0:01 init [2]
    0     2     0     0 ?           -1 S        0   0:00 [kthreadd]
    2     3     0     0 ?           -1 S        0   0:00 [ksoftirqd/0]
    2     6     0     0 ?           -1 S        0   0:00 [migration/0]
    2     7     0     0 ?           -1 S        0   0:00 [watchdog/0]
    2     8     0     0 ?           -1 S        0   0:00 [migration/1]
    2     9     0     0 ?           -1 S        0   0:00 [kworker/1:0]
    2    10     0     0 ?           -1 S        0   0:00 [ksoftirqd/1]
    2    12     0     0 ?           -1 S        0   0:00 [watchdog/1]
...
 3765  3796  3765  3333 pts/1     3765 S+       0   0:00 script -f -c l3script -q /root/.lilalo//1398
 3796  3797  3797  3797 pts/2    10073 Ss       0   0:00 l3script
    1  3819  3819  3819 ?           -1 Ss       0   0:35 l3-agent
    1  3927  3054  3054 ?           -1 Sl    1000   0:15 iceweasel
    1  3939  3099  3099 ?           -1 Sl    1000   0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
    1  9153  9153  9153 ?           -1 Ssl    112   0:03 /usr/sbin/asterisk -p -U asterisk
 9153  9154  9153  9153 ?           -1 S      112   0:00 astcanary /var/run/asterisk/alt.asterisk.can
    2  9252     0     0 ?           -1 S        0   0:00 [kworker/0:2]
    2  9258     0     0 ?           -1 S        0   0:00 [kworker/0:1]
 3797 10073 10073  3797 pts/2    10073 R+       0   0:00 ps ajx
14:43:58
#/etc/init.d/asterisk
Usage: /etc/init.d/asterisk {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload}
14:51:04
#/etc/init.d/asterisk start
Asterisk PBX is already running. Use restart.
14:51:07
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
14:51:14
#asterisk
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.
14:51:18
#asterisk -r
Asterisk 1.8.13.1~dfsg-3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg-3 currently running on linux8 (pid = 10134)
linux8*CLI>
linux8*CLI>
linux8*CLI>
linux8*CLI> exit
14:51:25
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk.
14:54:01
#dpkg -L asterisk-modules | sort | less
14:56:11
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk.
прошло 111 минут
/dev/pts/2
16:47:13
#l3-agent
Removing stale pidfile
16:55:43
#[default]

16:55:44
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4103.14621.11810	2013-11-18 17:58:06.568883019 +0200
+++ /etc/asterisk/extensions.conf	2013-11-18 18:14:01.516887654 +0200
@@ -5,3 +5,9 @@
 
 exten=> 5601,1,Dial(SIP/5601)
 exten=> 5602,1,Dial(SIP/5602)
+
+
+
+exten=> _4601,1,Dial(SIP/56${EXTEN:2})
+
+exten=> _0140,1,Dial(SIP/56${EXTEN:0:2})
прошло 18 минут
17:14:05
#shutdown now

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

/dev/pts/1
09:13:35
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3523.28994.16474	2013-11-19 10:29:28.614176489 +0200
+++ /etc/asterisk/extensions.conf	2013-11-19 11:43:40.618173523 +0200
@@ -1,13 +1,45 @@
 [default]
 
-exten=> 5600,1,Answer
-exten=> 5600,n,Playback(demo-thanks)
+exten=> 3200,1,Answer
+exten=> 3200,n,Playback(demo-thanks)
 
-exten=> 5601,1,Dial(SIP/5601)
-exten=> 5602,1,Dial(SIP/5602)
+exten=> 3201,1,Dial(SIP/3201)
 
 
+exten=> 3202,1,Dial(SIP/3202)
 
-exten=> _4601,1,Dial(SIP/56${EXTEN:2})
 
-exten=> _0140,1,Dial(SIP/56${EXTEN:0:2})
+
+exten => _31XX,1,Answer
+exten => _31XX,n,Dial(SIP/ottawa/${EXTEN})
+
+exten => _33XX,1,Answer
+exten => _33XX,n,Dial(SIP/quebec/${EXTEN})
+
+
+exten => _1XXX,1,Answer
+exten => _1XXX,n,Dial(SIP/ottawa/${EXTEN})
+
+exten => _2XXX,1,Answer
+exten => _2XXX,n,Dial(SIP/ottawa/${EXTEN})
+
+
+
+
+
+;exten=> _4601,1,Dial(SIP/56${EXTEN:2})
+
+;exten=> _0140,1,Dial(SIP/56${EXTEN:0:2})
+
+
+;exten => _13XX,1,Answer                                                       |
+;exten => _13XX,n,Dial(SIP/${EXTEN})                                           |
+
+;exten => _11XX,1,Answer                                                       |
+;exten => _11XX,n,Dial(SIP/kiev/${EXTEN})                                      |
+
+;exten => _12XX,1,Answer                                                       |
+;exten => _12XX,n,Dial(SIP/kharkov/${EXTEN})                                   |
+
+;exten => _[23]XXX,1,Answer                                                    |
+;exten => _[23]XXX,n,Dial(SIP/kiev/${EXTEN})  
прошло 23 минуты
/dev/pts/3
09:37:30
#l3-agent

09:37:34
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-3662.1482.12420	2013-11-19 10:37:48.186176156 +0200
+++ /etc/asterisk/sip.conf	2013-11-20 15:57:00.134105830 +0200
@@ -1,16 +1,57 @@
 [general]
 
+
+
+
 context=default
+directmedia=no
 
-[5601]
+register =>montreal:1234@192.168.15.254/quebec
+register =>montreal:1234@192.168.15.7/ottawa
 
+
+[template1] (!)
+type=friend
+host=dynamic
+context=local
+directmedia=no
+
+[3203](template1)
+secret=1234
+
+
+[3201]
+context=pomiru
 type=friend
 secret=1234
 host=dynamic
+qualify=yes
+language=ru
 
-[5602]
 
+[3202]
+context=postrane
 type=friend
 secret=4567
 host=dynamic
+qualify=yes
+language=ru
+
+[ottawa]
+context=pomiru
+context=default
+context=postrane
+type=friend
+secret=1234
+host=dynamic
+username=montreal
+
+
+
+[quebec]
+context=postrane
+type=friend
+secret=1234
+host=dynamic
+username=montreal
 
прошло 19 минут
/dev/pts/5
09:56:59
#ifconfig
eth0      Link encap:Ethernet  HWaddr 2c:27:d7:30:42:78
          inet addr:192.168.15.8  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::2e27:d7ff:fe30:4278/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4368 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1773 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:581803 (568.1 KiB)  TX bytes:140126 (136.8 KiB)
          Interrupt:20 Memory:fe400000-fe420000
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:70 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4378 (4.2 KiB)  TX bytes:4378 (4.2 KiB)
09:57:04
#asterisk
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.
09:57:09
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg-3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/etc/asterisk/extconfig.conf':   == Found
Connected to Asterisk 1.8.13.1~dfsg-3 currently running on linux8 (pid = 2285)
...
  == Using SIP RTP CoS mark 5
    -- Called SIP/3202
    -- SIP/3202-00000007 is ringing
  == Spawn extension (default, 3202, 1) exited non-zero on 'SIP/192.168.15.7-00000006'
[Nov 19 11:20:35] NOTICE[2576]: chan_sip.c:25030 handle_request_register: Registration from '<sip:ottawa@192.168.15.8>' failed for '192.168.15.7:5060' - Wrong password
[Nov 19 11:21:18] NOTICE[2576]: chan_sip.c:25030 handle_request_register: Registration from '<sip:ottawa@192.168.15.8>' failed for '192.168.15.7:5060' - Wrong password
linux8*CLI> quir
No such command 'quir' (type 'core show help quir' for other possible commands)
linux8*CLI> quit
Executing last minute cleanups
прошло 24 минуты
10:22:07
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3828.20858.10906	2013-11-19 11:22:14.022174380 +0200
+++ /etc/asterisk/sip.conf	2013-11-19 11:22:25.910174372 +0200
@@ -18,7 +18,7 @@
 secret=4567
 host=dynamic
 
-[ottava]
+[ottawa]
 type=friend
 secret=1234
 host=dynamic
10:22:40
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3828.4848.19658	2013-11-19 11:22:41.414174362 +0200
+++ /etc/asterisk/sip.conf	2013-11-19 11:22:46.198174360 +0200
@@ -5,8 +5,8 @@
 
 register =>montreal:1234@192.168.15.254/quebec
 register =>montreal:1234@192.168.15.7/ottawa
-register =>montreal:1234@192.168.15.4/london
-register =>montreal:1234@192.168.15.1/kiev
+;register =>montreal:1234@192.168.15.4/london
+;register =>montreal:1234@192.168.15.1/kiev
 
 [3201]
 type=friend
прошло 36 минут
/dev/pts/1
10:59:12
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3523.26665.31031	2013-11-19 11:59:14.902172900 +0200
+++ /etc/asterisk/extensions.conf	2013-11-19 13:16:01.278169831 +0200
@@ -1,15 +1,15 @@
 [default]
 
+
+[local]
 exten=> 3200,1,Answer
 exten=> 3200,n,Playback(demo-thanks)
 
 exten=> 3201,1,Dial(SIP/3201)
-
-
 exten=> 3202,1,Dial(SIP/3202)
 
 
-
+[national]
 exten => _31XX,1,Answer
 exten => _31XX,n,Dial(SIP/ottawa/${EXTEN})
 
@@ -17,29 +17,20 @@
 exten => _33XX,n,Dial(SIP/quebec/${EXTEN})
 
 
+[international]
 exten => _1XXX,1,Answer
 exten => _1XXX,n,Dial(SIP/ottawa/${EXTEN})
-
 exten => _2XXX,1,Answer
 exten => _2XXX,n,Dial(SIP/ottawa/${EXTEN})
 
 
 
 
-
-;exten=> _4601,1,Dial(SIP/56${EXTEN:2})
-
-;exten=> _0140,1,Dial(SIP/56${EXTEN:0:2})
-
-
-;exten => _13XX,1,Answer                                                       |
-;exten => _13XX,n,Dial(SIP/${EXTEN})                                           |
-
-;exten => _11XX,1,Answer                                                       |
-;exten => _11XX,n,Dial(SIP/kiev/${EXTEN})                                      |
-
-;exten => _12XX,1,Answer                                                       |
-;exten => _12XX,n,Dial(SIP/kharkov/${EXTEN})                                   |
-
-;exten => _[23]XXX,1,Answer                                                    |
-;exten => _[23]XXX,n,Dial(SIP/kiev/${EXTEN})  
+[postrane]
+include => local
+include => national
+
+[pomiru]
+include => local
+include => national
+include => international
прошло 100 минут
12:39:39
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3523.8071.30618	2013-11-19 13:39:41.130168885 +0200
+++ /etc/asterisk/extensions.conf	2013-11-19 14:19:17.734167302 +0200
@@ -1,10 +1,16 @@
 [default]
 
 
-[local]
+[internal]
 exten=> 3200,1,Answer
 exten=> 3200,n,Playback(demo-thanks)
 
+exten=> 8000,1,Answer
+exten=> 8000,n,Record(record00:gsm)
+
+
+
+[local]
 exten=> 3201,1,Dial(SIP/3201)
 exten=> 3202,1,Dial(SIP/3202)
 
@@ -27,10 +33,12 @@
 
 
 [postrane]
+include => internal
 include => local
 include => national
 
 [pomiru]
+include => internal
 include => local
 include => national
 include => international
прошло 40 минут
13:19:47
#mkdir -p /var/tmp/asterisk/records

прошла 21 минута
13:40:55
#ls /var/spool/asterisk/monitor/

13:41:09
#ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos
прошло 15 минут
/dev/pts/5
13:56:30
#play /var/spool/asterisk/monitor/123.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
/var/spool/asterisk/monitor/123.wav:
 File Size: 121k      Bit Rate: 128k
  Encoding: Signed PCM
  Channels: 1 @ 16-bit
Samplerate: 8000Hz
Replaygain: off
  Duration: 00:00:07.55
In:100%  00:00:07.55 [00:00:00.00] Out:60.4k [      |      ]        Clip:0
Done.
13:56:48
#play /var/spool/asterisk/monitor/123.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
/var/spool/asterisk/monitor/123.wav:
 File Size: 121k      Bit Rate: 128k
  Encoding: Signed PCM
  Channels: 1 @ 16-bit
Samplerate: 8000Hz
Replaygain: off
  Duration: 00:00:07.55
In:100%  00:00:07.55 [00:00:00.00] Out:60.4k [      |      ]        Clip:0
Done.
13:57:22
#rasterisk
Asterisk 1.8.13.1~dfsg-3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg-3 currently running on linux8 (pid = 2285)
Verbosity is at least 3
linux8*CLI> dialplan reload
...
    -- Executing [3202@pomiru:1] Answer("SIP/3201-00000035", "") in new stack
    -- Executing [3202@pomiru:2] Monitor("SIP/3201-00000035", "wav,124") in new stack
    -- Executing [3202@pomiru:3] Dial("SIP/3201-00000035", "SIP/3202") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/3202
    -- SIP/3202-00000036 is ringing
    -- SIP/3202-00000036 answered SIP/3201-00000035
  == Spawn extension (pomiru, 3202, 3) exited non-zero on 'SIP/3201-00000035'
linux8*CLI>
Disconnected from Asterisk server
прошло 25 минут
14:23:11
#ls /var/spool/asterisk/monitor/
123.wav  124-in.wav  124-out.wav
14:23:50
#play /var/spool/asterisk/monitor/124-out.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
/var/spool/asterisk/monitor/124-out.wav:
 File Size: 140k      Bit Rate: 128k
  Encoding: Signed PCM
  Channels: 1 @ 16-bit
Samplerate: 8000Hz
Replaygain: off
  Duration: 00:00:08.72
In:100%  00:00:08.72 [00:00:00.00] Out:69.8k [      |      ]        Clip:0
Done.
14:24:04
#nano /etc/asterisk/voicemail.conf
прошло 11 минут
14:35:21
#apt-get install mutt
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libtokyocabinet9
Suggested packages:
  urlview mixmaster
The following NEW packages will be installed:
  libtokyocabinet9 mutt
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
...
Unpacking libtokyocabinet9:amd64 (from .../libtokyocabinet9_1.4.47-2_amd64.deb) ...
Selecting previously unselected package mutt.
Unpacking mutt (from .../mutt_1.5.21-6.2+deb7u1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for mime-support ...
Setting up libtokyocabinet9:amd64 (1.4.47-2) ...
Setting up mutt (1.5.21-6.2+deb7u1) ...
update-alternatives: using /usr/bin/mutt-org to provide /usr/bin/mutt (mutt) in auto mode
14:35:38
#asterisk -r
Asterisk 1.8.13.1~dfsg-3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg-3 currently running on linux8 (pid = 2285)
Verbosity is at least 3
linux8*CLI> voicemail reload
...
    -- Total time merge_contexts_delete: 0.000884 sec
linux8*CLI> dialplan show 3201@local
[ Context 'local' created by 'pbx_config' ]
  '_32XX' =>        1. Answer()                                   [pbx_config]
                    2. Monitor(wav,124)                           [pbx_config]
                    3. Dial(SIP/${EXTEN})                         [pbx_config]
                    4. Voicemail(${EXTEN}@default)                [pbx_config]
-= 1 extension (4 priorities) in 1 context. =-
linux8*CLI> dialplan reload
Disconnected from Asterisk server
14:38:20
#nano /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-3828.26857.10209	2013-11-19 15:38:22.450164140 +0200
+++ /etc/asterisk/voicemail.conf	2013-11-19 15:39:32.846164094 +0200
@@ -381,7 +381,8 @@
 
 [default]
 
-1234 => 4242,Example Mailbox,root@localhost
+3201 => 1234,user@localhost
+3202 => 1234,user@localhost
 ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10
 ;4300 => 3456,Ben Rigas,ben@american-computer.net
 ;4310 => -5432,Sales,sales@marko.net
14:39:51
#mutt

14:40:11
#asterisk
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.
14:40:57
#asterisk -r
Asterisk 1.8.13.1~dfsg-3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg-3 currently running on linux8 (pid = 2285)
Verbosity is at least 3
linux8*CLI> voicemail reload
...
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000822 sec
    -- Time to restore hints and swap in new dialplan: 0.000003 sec
    -- Time to delete the old dialplan: 0.000045 sec
    -- Total time merge_contexts_delete: 0.000870 sec
linux8*CLI>
linux8*CLI>
linux8*CLI>
linux8*CLI>
linux8*CLI>
[1]+  Stopped                 asterisk -r
14:41:13
#asterisk -rvvvvvvv
Asterisk 1.8.13.1~dfsg-3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/etc/asterisk/extconfig.conf':   == Found
Connected to Asterisk 1.8.13.1~dfsg-3 currently running on linux8 (pid = 2285)
...
    -- Recording the message
    -- x=0, open writing:  /var/spool/asterisk/voicemail/default/3202/tmp/TttfiF format: wav49, 0x2a260e8
    -- x=1, open writing:  /var/spool/asterisk/voicemail/default/3202/tmp/TttfiF format: gsm, 0x2a26788
    -- x=2, open writing:  /var/spool/asterisk/voicemail/default/3202/tmp/TttfiF format: wav, 0x7f41640e28c8
    -- User ended message by pressing #
    -- <SIP/3201-0000003b> Playing 'auth-thankyou.gsm' (language 'en')
    -- Auto fallthrough, channel 'SIP/3201-0000003b' status is 'NOANSWER'
linux8*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
14:41:44
#exit
exit
There are stopped jobs.
прошло 73 минуты
/dev/pts/1
15:55:32
#[default]
Asterisk 1.8.13.1~dfsg-3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/etc/asterisk/extconfig.conf':   == Found
Connected to Asterisk 1.8.13.1~dfsg-3 currently running on linux8 (pid = 2285)
Verbosity is at least 10
linux8*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
15:55:59
#/etc/init.d/asterisk restert
Usage: /etc/init.d/asterisk {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload}
15:56:12
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:56:18
#asterisk -rvvvvvvvv
Asterisk 1.8.13.1~dfsg-3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/etc/asterisk/extconfig.conf':   == Found
Connected to Asterisk 1.8.13.1~dfsg-3 currently running on linux8 (pid = 10327)
Verbosity was 0 and is now 8
  == Using SIP RTP CoS mark 5
[Nov 19 16:56:30] WARNING[10379]: pbx.c:4218 pbx_extension_helper: No application 'MeetMe' for extension (pomiru, 8101, 1)
  == Spawn extension (pomiru, 8101, 1) exited non-zero on 'SIP/3201-00000000'
       > Saved useragent "Asterisk PBX 1.8.13.1~dfsg-3" for peer quebec
       > Saved useragent "Asterisk PBX 1.8.13.1~dfsg-3" for peer ottawa
       > Saved useragent "MicroSIP/3.3.27" for peer 3202
linux8*CLI> FOP2
No such command 'FOP2' (type 'core show help FOP2' for other possible commands)
linux8*CLI>
[3]+  Stopped                 asterisk -rvvvvvvvv
прошло 12 минут
16:09:12
#FOP2
l3script: FOP2: command not found
16:09:14
#FOP2
l3script: FOP2: command not found
16:09:17
#FOP
l3script: FOP: command not found
16:09:18
#ls
Desktop  Documents  Downloads  Mail  Music  Pictures  Public  Templates  Videos
прошло 12 минут
16:21:41
#cd Downloads/

16:21:45
#ls
asterisk-core-sounds-ru-wav-current.tar.gz  manamana.mp3
16:21:46
#apt-get install mpg123
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libmpg123-0
Suggested packages:
  alsa-utils jackd nas oss-compat oss4-base
The following NEW packages will be installed:
  libmpg123-0 mpg123
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
...
(Reading database ... 140578 files and directories currently installed.)
Unpacking libmpg123-0:amd64 (from .../libmpg123-0_1.14.4-1_amd64.deb) ...
Selecting previously unselected package mpg123.
Unpacking mpg123 (from .../mpg123_1.14.4-1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for mime-support ...
Setting up libmpg123-0:amd64 (1.14.4-1) ...
Setting up mpg123 (1.14.4-1) ...
update-alternatives: using /usr/bin/mpg123.bin to provide /usr/bin/mpg123 (mpg123) in auto mode
update-alternatives: using /usr/bin/mpg123.bin to provide /usr/bin/mp3-decoder (mp3-decoder) in auto mode
16:22:31
#ls
asterisk-core-sounds-ru-wav-current.tar.gz  manamana.mp3
16:23:28
#mpg123 -w /tmp.manamana.wav manamana.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.14.4; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes
Playing MPEG stream 1 of 1: manamana.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
Title:   Manamana                        Artist: Animal & The Muppets
Comment:                                 Album:  Muppet Hits
Year:    1993                            Genre:  Showtunes
Note: Illegal Audio-MPEG-Header 0x416e696d at offset 2231805.
Note: Trying to resync...
Note: Hit end of (available) data during resync.
[2:19] Decoding of manamana.mp3 finished.
16:24:40
#mpg123 -w /tmp/manamana.wav manamana.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.14.4; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes
Playing MPEG stream 1 of 1: manamana.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
Title:   Manamana                        Artist: Animal & The Muppets
Comment:                                 Album:  Muppet Hits
Year:    1993                            Genre:  Showtunes
Note: Illegal Audio-MPEG-Header 0x416e696d at offset 2231805.
Note: Trying to resync...
Note: Hit end of (available) data during resync.
[2:19] Decoding of manamana.mp3 finished.
16:25:02
#ls -l .tmp
ls: cannot access .tmp: No such file or directory
16:25:13
#ls -l /tmp
total 24068
-rw------- 1 user       user             73 Nov 19 17:10 gnash-cookies.jGjlzK
-rw------- 1 user       user            121 Nov 19 17:10 gnash-cookies.vwPA2z
-rw-r--r-- 1 root       root            120 Nov 19 10:37 l3-saved-3662.1482.12420
-rw-r--r-- 1 root       root       24611372 Nov 19 17:25 manamana.wav
drwx------ 2 user       user           4096 Jan  1  1970 orbit-user
drwx------ 2 user       user           4096 Nov 19 09:51 pulse-Hn6I3jJJwxKK
drwx------ 2 Debian-gdm Debian-gdm     4096 Nov 19 09:51 pulse-tsxLaL5xIh9m
drwx------ 2 user       user           4096 Nov 19 09:51 ssh-i6Ze3nqlH05L
drwxr-xr-x 2 user       user           4096 Nov 19 09:51 tracker-user
16:25:17
#play /tmp/manamana.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable
/tmp/manamana.wav:
 File Size: 24.6M     Bit Rate: 1.41M
  Encoding: Signed PCM
  Channels: 2 @ 16-bit
Samplerate: 44100Hz
Replaygain: off
  Duration: 00:02:19.52
In:2.53% 00:00:03.53 [00:02:15.99] Out:156k  [   -==|==    ] Hd:4.6 Clip:0
Aborted.
16:25:31
#sox -t wav /tmp/scorp.wav -r8000 -c1 -t gsm /tmp/scorp.gs
sox FAIL formats: can't open input file `/tmp/scorp.wav': No such file or directory
16:26:40
#sox -t wav /tmp/manamana.wav -r8000 -c1 -t gsm /tmp/manamana.gsm

16:27:22
#ls /var/lib/asterisk/moh/

16:33:04
#ls
asterisk-core-sounds-ru-wav-current.tar.gz  manamana.mp3
16:33:09
#cp /tmp/manamana.gsm /var/lib/asterisk/moh/

16:37:10
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3523.15784.28658	2013-11-19 17:37:14.318159391 +0200
+++ /etc/asterisk/extensions.conf	2013-11-19 17:37:49.190159365 +0200
@@ -13,7 +13,7 @@
 
 exten=> _32XX,1,Answer
 exten=> _32XX,n,Monitor(wav,124)
-exten=> _32XX,n,Dial(SIP/${EXTEN},3)
+exten=> _32XX,n,Dial(SIP/${EXTEN},3,m)
 exten=> _32XX,n,Voicemail(${EXTEN}@default)
 
 exten => 8100,1,VoiceMailMain()
16:37:50
#[default]
Asterisk 1.8.13.1~dfsg-3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/etc/asterisk/extconfig.conf':   == Found
Connected to Asterisk 1.8.13.1~dfsg-3 currently running on linux8 (pid = 10327)
...
    -- Executing [3201@postrane:2] Monitor("SIP/ottawa-0000000c", "wav,124") in new stack
    -- Executing [3201@postrane:3] Dial("SIP/ottawa-0000000c", "SIP/3201,5") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/3201
[Nov 19 18:17:38] NOTICE[11337]: channel.c:4170 __ast_read: Dropping incompatible voice frame on SIP/ottawa-0000000c of format ulaw since our native format has changed to 0x2 (gsm)
    -- SIP/3201-0000000d is ringing
  == Spawn extension (postrane, 3201, 3) exited non-zero on 'SIP/ottawa-0000000c'
linux8*CLI>
Disconnected from Asterisk server
Executing last minute cleanups

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

08:58:52
#apt-get festival
E: Invalid operation festival

Статистика

Время первой команды журнала13:20:02 2013-11-18
Время последней команды журнала08:58:52 2013-11-20
Количество командных строк в журнале100
Процент команд с ненулевым кодом завершения, %25.00
Процент синтаксически неверно набранных команд, % 5.00
Суммарное время работы с терминалом *, час 5.27
Количество командных строк в единицу времени, команда/мин 0.32
Частота использования команд
ls14|============| 12.73%
dpkg10|=========| 9.09%
asterisk9|========| 8.18%
nano8|=======| 7.27%
/etc/init.d/asterisk7|======| 6.36%
apt-get7|======| 6.36%
nc5|====| 4.55%
less5|====| 4.55%
play4|===| 3.64%
wc3|==| 2.73%
ps3|==| 2.73%
l3-agent3|==| 2.73%
[default]3|==| 2.73%
update-rc.d2|=| 1.82%
telnet2|=| 1.82%
mpg1232|=| 1.82%
sox2|=| 1.82%
vim2|=| 1.82%
FOP22|=| 1.82%
ifconfig1|| 0.91%
mkdir1|| 0.91%
sort1|| 0.91%
cp1|| 0.91%
FOP1|| 0.91%
/etc/default/asterisk1|| 0.91%
cd1|| 0.91%
runlevel1|| 0.91%
.1|| 0.91%
rasterisk1|| 0.91%
mutt1|| 0.91%
shutdown1|| 0.91%
grep1|| 0.91%
kill1|| 0.91%
exit1|| 0.91%
apt-cache1|| 0.91%
date1|| 0.91%
____
*) Интервалы неактивности длительностью 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$