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

Содержание

Журнал

Вторник (04/22/14)

/dev/pts/1
12:59:38
#la -al
l3script: la: command not found
13:00:11
#ls -al
total 60
drwx------  9 root root 4096 Apr 22 13:54 .
drwxr-xr-x 24 root root 4096 Apr 22 12:54 ..
drwx------  2 root root 4096 Apr 22 12:16 .aptitude
-rw-r--r--  1 root root   10 Apr 22 13:54 .bash_profile
-rw-r--r--  1 root root  630 Apr 22 13:54 .bashrc
drwx------  3 root root 4096 Apr 22 13:18 .cache
drwx------  3 root root 4096 Apr 22 13:18 .config
drwx------  2 root root 4096 Apr 22 12:38 .gconf
-rw-r--r--  1 root root 5275 Apr 22 13:53 install
-rw-r--r--  1 root root   51 Apr 22 13:54 .l3rc
drwxr-xr-x  2 root root 4096 Apr 22 13:59 .lilalo
drwx------  3 root root 4096 Apr 22 13:18 .local
-rw-r--r--  1 root root  140 Nov 19  2007 .profile
drwx------  2 root root 4096 Apr 22 13:32 .ssh
13:00:16
#nano install
13:07:12
#!/bin/sh
112       3381  0.0  0.0 245432  9488 ?        Sl   12:54   0:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
root     10292  0.1  0.0  47036  9960 ?        Ss   13:58   0:01 l3-agent
root     10465  0.0  0.0   7832   872 pts/2    S+   14:12   0:00 grep agent
13:12:10
#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:20:05
#apt-get install asterisk
Selecting previously unselected package libsybdb5:amd64.
Unpacking libsybdb5:amd64 (from .../libsybdb5_0.91-2+deb7u1_amd64.deb) ...
Selecting previously unselected package asterisk-config.
Unpacking asterisk-config (from .../asterisk-config_1%3a1.8.13.1~dfsg1-3+deb7u3_all.deb) ...
Selecting previously unselected package libiksemel3.
Unpacking libiksemel3 (from .../libiksemel3_1.2-4_amd64.deb) ...
Selecting previously unselected package libpq5.
Unpacking libpq5 (from .../libpq5_9.1.11-0wheezy1_amd64.deb) ...
Selecting previously unselected package libradiusclient-ng2.
Unpacking libradiusclient-ng2 (from .../libradiusclient-ng2_0.5.6-1.1_amd64.deb) ...
...
Setting up libmail-sendmail-perl (0.79.16-1) ...
Setting up libsox2 (14.4.0-3) ...
Setting up libsox-fmt-alsa (14.4.0-3) ...
Setting up libsox-fmt-base (14.4.0-3) ...
Setting up module-assistant (0.11.4) ...
Setting up rsync (3.0.9-4) ...
update-rc.d: using dependency based boot sequencing
Setting up sox (14.4.0-3) ...
Setting up vpb-driver-source (4.2.55-1) ...
Setting up asterisk-moh-opsound-gsm (2.03-1) ...
13:27:18
#asterisk -rcvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15080)
Verbosity was 0 and is now 8
aster-3*CLI> q
No such command 'q' (type 'core show help q' for other possible commands)
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
13:28:12
#dpkg -l asterisk
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  asterisk       1:1.8.13.1~d amd64        Open Source Private Branch Exchan
13:28:52
#dpkg -l asterisk
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  asterisk       1:1.8.13.1~d amd64        Open Source Private Branch Exchan
13:29:11
#dpkg -L asterisk | less
13:33:14
#dpkg -L asterisk-module | less
13:35:53
#dpkg -L asterisk-modules | less
13:36:06
#mc
13:37:51
#mc
13:40:11
#mc
13:41:15
#mc
13:41:33
#cd /usr/sbin/

13:41:41
#ls -al?grep aster
ls: invalid option -- '?'
Try `ls --help' for more information.
13:41:49
#ls -al|grep aster
-rwxr-xr-x  1 root root 1844320 Jan  4 03:07 asterisk
lrwxrwxrwx  1 root root       8 Jan  4 03:07 rasterisk -> asterisk
-rwxr-xr-x  1 root root    5553 Jan  4 03:07 safe_asterisk
13:41:55
#ifconfig
eth0      Link encap:Ethernet  HWaddr 70:71:bc:cc:70:24
          inet addr:192.168.12.3  Bcast:192.168.12.255  Mask:255.255.255.0
          inet6 addr: fe80::7271:bcff:fecc:7024/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:59538 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25706 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:69140964 (65.9 MiB)  TX bytes:2680740 (2.5 MiB)
          Interrupt:20 Memory:fe200000-fe220000
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:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:319 (319.0 B)  TX bytes:319 (319.0 B)
прошло 15 минут
13:57:06
#asrterisk -rvvvvvvvvvv
l3script: asrterisk: command not found
14:02:04
#asterisk -rvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15080)
...
          voicemail show users List defined voicemail boxes
          voicemail show zones List zone message formats
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
aster-3*CLI> q
No such command 'q' (type 'core show help q' for other possible commands)
aster-3*CLI> exit
Executing last minute cleanups
прошло 33 минуты
14:36:02
#cd /etc/asterisk/

14:36:51
#ls
adsi.conf                cli_permissions.conf    modules.conf
agents.conf              codecs.conf             musiconhold.conf
ais.conf                 console.conf            muted.conf
alarmreceiver.conf       dbsep.conf              osp.conf
alsa.conf                dnsmgr.conf             oss.conf
amd.conf                 dsp.conf                phone.conf
app_mysql.conf           dundi.conf              phoneprov.conf
asterisk.adsi            enum.conf               queuerules.conf
asterisk.conf            extconfig.conf          queues.conf
calendar.conf            extensions.ael          res_config_mysql.conf
...
cel_custom.conf          indications.conf        sip_notify.conf
cel_odbc.conf            jabber.conf             skinny.conf
cel_pgsql.conf           jingle.conf             sla.conf
cel_sqlite3_custom.conf  logger.conf             smdi.conf
cel_tds.conf             manager.conf            telcordia-1.adsi
chan_dahdi.conf          manager.d               udptl.conf
chan_mobile.conf         meetme.conf             unistim.conf
chan_ooh323.conf         mgcp.conf               users.conf
cli_aliases.conf         minivm.conf             voicemail.conf
cli.conf                 misdn.conf              vpb.conf
14:36:52
#mv sip.conf sip.conf.old

14:37:14
#nano sip.conf
--- /dev/null	2014-04-22 12:54:05.875188577 +0300
+++ sip.conf	2014-04-22 15:37:31.070500758 +0300
@@ -0,0 +1 @@
+#sip
14:37:31
#sip

14:39:37
#sip

14:41:16
#sip

14:42:09
#sip

14:44:02
#sip

14:51:05
#nano sip.conf
14:52:21
#nano sip.conf
--- /tmp/l3-saved-10329.15061.4412	2014-04-22 15:54:53.126534095 +0300
+++ sip.conf	2014-04-22 15:55:04.886534472 +0300
@@ -1,4 +1,4 @@
-
+[general]
 #sip
 
 context=default
14:55:04
#[general]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15676)
Verbosity was 0 and is now 15
aster-3*CLI> sip reload
No such command 'sip reload' (type 'core show help sip reload' for other possible commands)
aster-3*CLI> sip reload
No such command 'sip reload' (type 'core show help sip reload' for other possible commands)
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
14:58:01
#nano sip.conf
14:58:25
#[general]
Reloading Asterisk PBX configuration files.
14:58:36
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15676)
...
              voicemail reload Reload voicemail configuration
          voicemail show users List defined voicemail boxes
          voicemail show zones List zone message formats
aster-3*CLI> sip show peers
No such command 'sip show peers' (type 'core show help sip show' for other possible commands)
aster-3*CLI> sip reload
No such command 'sip reload' (type 'core show help sip reload' for other possible commands)
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
15:00:38
#service asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:00:45
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15846)
Verbosity was 0 and is now 15
aster-3*CLI> sip show peeers
No such command 'sip show peeers' (type 'core show help sip show peeers' for other possible commands)
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
15:01:38
#ls -al
total 804
drwxr-xr-x   3 asterisk asterisk  4096 Apr 22 15:37 .
drwxr-xr-x 131 root     root     12288 Apr 22 14:27 ..
-rw-r-----   1 asterisk asterisk   140 Jan  4 03:07 adsi.conf
-rw-r-----   1 asterisk asterisk  2760 Jan  4 03:07 agents.conf
-rw-r-----   1 asterisk asterisk  2904 Jan  4 03:07 ais.conf
-rw-r-----   1 asterisk asterisk  2084 Jan  4 03:07 alarmreceiver.conf
-rw-r-----   1 asterisk asterisk  3498 Jan  4 03:07 alsa.conf
-rw-r-----   1 asterisk asterisk   767 Jan  4 03:07 amd.conf
-rw-r-----   1 asterisk asterisk  1044 Jan  4 03:07 app_mysql.conf
...
-rw-r-----   1 asterisk asterisk   742 Jan  4 03:07 sip_notify.conf
-rw-r-----   1 asterisk asterisk  9185 Jan  4 03:07 skinny.conf
-rw-r-----   1 asterisk asterisk  6774 Jan  4 03:07 sla.conf
-rw-r-----   1 asterisk asterisk  2669 Jan  4 03:07 smdi.conf
-rw-r-----   1 asterisk asterisk  1384 Jan  4 03:07 telcordia-1.adsi
-rw-r-----   1 asterisk asterisk   656 Jan  4 03:07 udptl.conf
-rw-r-----   1 asterisk asterisk  5096 Jan  4 03:07 unistim.conf
-rw-r-----   1 asterisk asterisk  2423 Jan  4 03:07 users.conf
-rw-r-----   1 asterisk asterisk 21238 Jan  4 03:07 voicemail.conf
-rw-r-----   1 asterisk asterisk  5939 Jan  4 03:07 vpb.conf
15:01:42
#mv sip.conf.old sip.conf.OLDFILE

15:02:17
#chown asterisk:asterisk sip.conf

15:02:44
#ls -al
total 804
drwxr-xr-x   3 asterisk asterisk  4096 Apr 22 16:02 .
drwxr-xr-x 131 root     root     12288 Apr 22 14:27 ..
-rw-r-----   1 asterisk asterisk   140 Jan  4 03:07 adsi.conf
-rw-r-----   1 asterisk asterisk  2760 Jan  4 03:07 agents.conf
-rw-r-----   1 asterisk asterisk  2904 Jan  4 03:07 ais.conf
-rw-r-----   1 asterisk asterisk  2084 Jan  4 03:07 alarmreceiver.conf
-rw-r-----   1 asterisk asterisk  3498 Jan  4 03:07 alsa.conf
-rw-r-----   1 asterisk asterisk   767 Jan  4 03:07 amd.conf
-rw-r-----   1 asterisk asterisk  1044 Jan  4 03:07 app_mysql.conf
...
-rw-r-----   1 asterisk asterisk   742 Jan  4 03:07 sip_notify.conf
-rw-r-----   1 asterisk asterisk  9185 Jan  4 03:07 skinny.conf
-rw-r-----   1 asterisk asterisk  6774 Jan  4 03:07 sla.conf
-rw-r-----   1 asterisk asterisk  2669 Jan  4 03:07 smdi.conf
-rw-r-----   1 asterisk asterisk  1384 Jan  4 03:07 telcordia-1.adsi
-rw-r-----   1 asterisk asterisk   656 Jan  4 03:07 udptl.conf
-rw-r-----   1 asterisk asterisk  5096 Jan  4 03:07 unistim.conf
-rw-r-----   1 asterisk asterisk  2423 Jan  4 03:07 users.conf
-rw-r-----   1 asterisk asterisk 21238 Jan  4 03:07 voicemail.conf
-rw-r-----   1 asterisk asterisk  5939 Jan  4 03:07 vpb.conf
15:02:46
#service asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:03:01
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15970)
...
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
aster-3*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
1301/1301                  192.168.12.103                           D   N             5060     Unmonitored
1302/1302                  192.168.12.33                            D   N             5060     Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
aster-3*CLI> exitip addr show
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk cleanly ending (0).
прошло 22 минуты
15:25:44
#ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 70:71:bc:cc:70:24 brd ff:ff:ff:ff:ff:ff
    inet 192.168.12.3/24 brd 192.168.12.255 scope global eth0
    inet6 fe80::7271:bcff:fecc:7024/64 scope link
       valid_lft forever preferred_lft forever
15:25:46
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15970)
...
aster-3*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
1301/1301                  192.168.12.103                           D   N             5060     Unmonitored
1302/1302                  192.168.12.206                           D   N             5060     Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
прошло 43 минуты
16:08:54
#pwd
/etc/asterisk
16:09:07
#mv extensions.conf extensions.conf.OLDFILE

16:12:56
#touch extensions.conf

16:13:11
#nano extensions.conf
--- /tmp/l3-saved-10329.7849.3044	2014-04-22 17:13:47.670685604 +0300
+++ extensions.conf	2014-04-22 17:15:00.566687857 +0300
@@ -0,0 +1,7 @@
+[default]
+
+
+
+
+
+
16:15:00
#[default]

16:15:22
#mv extensions.ael extensions.ael.OLDFILE

16:15:35
#mc
16:18:18
#[default]

16:24:00
#service asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
16:24:15
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 16344)
...
  '700' =>          1. Park()                                     [features]
[ Context 'app_dial_gosub_virtual_context' created by 'app_dial' ]
  's' =>            1. NoOp()                                     [app_dial]
[ Context 'default' created by 'pbx_config' ]
  '_13XX' =>        1. Dial(SIP/${EXTEN})                         [pbx_config]
-= 4 extensions (4 priorities) in 4 contexts. =-
aster-3*CLI> '700' =>          1. Park()
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk cleanly ending (0).
16:28:10
#mc
16:29:33
#ls -al|grep sip
-rw-r--r--   1 asterisk asterisk   152 Apr 22 16:00 sip.conf
-rw-r-----   1 asterisk asterisk 79163 Jan  4 03:07 sip.conf.OLDFILE
-rw-r-----   1 asterisk asterisk   742 Jan  4 03:07 sip_notify.conf
16:29:48
#mc
16:30:23
#ls -al|grep ext
-rw-r-----   1 asterisk asterisk  3397 Jan  4 03:07 extconfig.conf
-rw-r--r--   1 root     root       132 Apr 22 17:21 extensions.conf
-rw-r-----   1 asterisk asterisk  7480 Jan  4 03:07 extensions_minivm.conf
16:30:29
#chown asterisk:asterisk extensions.conf

16:31:33
#nano extensions_minivm.conf
прошло 10 минут
16:42:04
#; MINI-VOICEMAIL dialplan example

Среда (04/23/14)

/dev/pts/2
08:45:47
#l3-agent
l3-agent is already running: pid=3488; pidfile=/root/.lilalo/l3-agent.pid
08:46:04
#сcat /etc/asterisk/sip.conf
[general]
context=default
; peer
; 1301 - 1399 всё моё
[1301]
type=friend
secret=1234
host=dynamic
[1302]
type=friend
secret=1234
host=dynamic
08:46:57
#cat /etc/asterisk/extensions.conf
[default]
;exten => 1301,1,Answer
;exten => 1301,n,Dial(SIP/1301)
;exten => 1301,n,Hangup
exten => _13XX,1,Dial(SIP/${EXTEN})
08:47:07
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-3577.11800.17060	2014-04-23 09:49:07.584571641 +0300
+++ /etc/asterisk/sip.conf	2014-04-23 09:49:42.384572416 +0300
@@ -13,3 +13,8 @@
 secret=1234
 host=dynamic
 
+[1303]
+type=friend
+secret=1234
+host=dynamic
+
08:52:46
#clear

08:52:51
#asterisk -rcvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
refcount: 3
name: 1301
type: peer
objflags: 0
refcount: 3
-= Registry objects: 0 =-
-= Dialog objects:
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
прошло 20 минут
09:13:32
#asterisk -rcvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
                unistim reload Reload UNISTIM configuration
           unistim send packet Send packet (for reverse engineering)
    unistim set debug {on|off} Toggle UNITSTIM debugging
             unistim show info Show UNISTIM info
              voicemail reload Reload voicemail configuration
          voicemail show users List defined voicemail boxes
          voicemail show zones List zone message formats
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
прошло 52 минуты
10:05:50
#cd /etc/asterisk/

прошло 25 минут
10:31:22
#ls\
> ^C
10:31:25
#nano extensions.conf
--- /tmp/l3-saved-3577.8542.15143	2014-04-23 11:31:33.836707062 +0300
+++ extensions.conf	2014-04-23 11:31:51.784707454 +0300
@@ -9,3 +9,5 @@
 
 
 
+
+
10:31:51
#[default]
  GNU nano 2.2.6                       File: sip.conf                                          Modified
secret=1234
host=dynamic
[1303]
type=friend
secret=1234
host=dynamic
[frankfurt]
type=friend
secret=1234
host=dynamic
^G Get Help      ^O WriteOut      ^R Read File     ^Y Prev Page     ^K Cut Text      ^C Cur Pos
^X Exit          ^J Justify       ^W Where Is      ^V Next Page     ^U UnCut Text    ^T To Spell
прошло 14 минут
10:46:00
#[general]

10:48:38
#[general]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
  == Parsing '/etc/asterisk/cel_odbc.conf':   == Found
    -- Reloading module 'func_odbc.so' (ODBC lookups)
aster-3*CLI> [Apr 23 11:52:12] WARNING[2717]: chan_sip.c:20720 handle_response_register: Forb
aster-3*CLI> idden - wrong password on authentication for REGISTER for 'berlin' to '192.168.1
No such command '[Apr 23 11:52:12] WARNING[2717]: chan_sip.c:20720 handle_response_register: Forb' (type 'core show help [Apr 23' for other possible commands)
No such command 'idden - wrong password on authentication for REGISTER for 'berlin' to '192.168.1' (type 'core show help idden -' for other possible commands)
aster-3*CLI> 2.6'
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk cleanly ending (0).
10:55:29
#asterisk -rcvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
[ Context 'default' created by 'pbx_config' ]
  '_13XX' =>        1. Dial(SIP/${EXTEN})                         [pbx_config]
-= 4 extensions (4 priorities) in 4 contexts. =-
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
aster-3*CLI> sip reload
 Reloading SIP
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
11:05:29
#nano extensions.conf
--- /tmp/l3-saved-3577.9348.27416	2014-04-23 12:05:42.752752204 +0300
+++ extensions.conf	2014-04-23 12:08:40.976756132 +0300
@@ -6,6 +6,7 @@
 
 exten => _13XX,1,Dial(SIP/${EXTEN})
 
+exten => _23XX,1,Dial(SIP/frankfurt/${EXTEN}) 
 
 
 
11:08:40
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
    -- SIP/1302-0000000d is ringing
    -- SIP/1302-0000000d answered SIP/frankfurt-0000000c
    -- Locally bridging SIP/frankfurt-0000000c and SIP/1302-0000000d
  == Spawn extension (default, 1302, 1) exited non-zero on 'SIP/frankfurt-0000000c'
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
aster-3*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk cleanly ending (0).
11:15:07
#nano extensions.conf
11:15:22
#[default]

11:16:39
#[general]

11:17:18
#[general]

11:18:11
#[general]

11:18:29
#host=dynamic
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
[Apr 23 12:19:14] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password
[Apr 23 12:19:14] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password
[Apr 23 12:19:15] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password
[Apr 23 12:19:17] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password
[Apr 23 12:19:18] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password
[Apr 23 12:19:19] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password
[Apr 23 12:19:20] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
11:19:28
#nano extensions.conf
--- /tmp/l3-saved-3577.196.26233	2014-04-23 12:19:34.104770522 +0300
+++ extensions.conf	2014-04-23 12:20:41.272772000 +0300
@@ -8,7 +8,9 @@
 
 exten => _23XX,1,Dial(SIP/frankfurt/${EXTEN}) 
 
+exten => _12XX,1,Dial(SIP/kiev/${EXTEN})
 
+exten => _22XX,1,Dial(SIP/viena/${EXTEN})
 
 
 
11:20:41
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
    -- Executing [1302@default:1] Dial("SIP/192.168.12.5-00000010", "SIP/1302") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/1302
    -- SIP/1302-00000011 is ringing
    -- SIP/1302-00000011 answered SIP/192.168.12.5-00000010
    -- Locally bridging SIP/192.168.12.5-00000010 and SIP/1302-00000011
  == Spawn extension (default, 1302, 1) exited non-zero on 'SIP/192.168.12.5-00000010'
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
11:23:20
#nano sip.conf
11:23:43
#host=dynamic
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
frankfurt/berlin           192.168.12.6                             D   N             5060     Unmonitored
4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 1 offline]
[Apr 23 12:24:31] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vaduz@192.168.12.3>' failed for '192.168.12.9:5060' - Wrong password
[Apr 23 12:24:42] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vaduz@192.168.12.3>' failed for '192.168.12.9:5060' - Wrong password
[Apr 23 12:24:55] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:kiev@192.168.12.3>' failed for '192.168.12.2:5060' - Wrong password
[Apr 23 12:24:57] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vaduz@192.168.12.3>' failed for '192.168.12.9:5060' - Wrong password
[Apr 23 12:25:04] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
11:25:25
#nano sip.conf
11:26:47
#asterisk -rcvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
Verbosity is at least 16
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
11:26:58
#nano sip.conf
--- /tmp/l3-saved-3577.4744.11681	2014-04-23 12:27:02.532780403 +0300
+++ sip.conf	2014-04-23 12:28:38.948782529 +0300
@@ -31,13 +31,14 @@
 host=dynamic
 username=berlin
 
-[kiev]                                                                     |
-type=friend                                                                     |
-secret=1234                                                                     |
+[kiev]
+                                                                    
+type=friend
+secret=1234                                                                                                                  |
 host=dynamic                                                                    |
 username=berlin 
 
-[viena]                                                                     |    |
+[viena]                                                                        |
 type=friend                                                                    $|
 secret=1234                                                                    $|
 host=dynamic                                                                   $|
11:28:47
#nano sip.conf
--- /tmp/l3-saved-3577.15561.15101	2014-04-23 12:28:54.408782864 +0300
+++ sip.conf	2014-04-23 12:30:08.380784498 +0300
@@ -31,18 +31,14 @@
 host=dynamic
 username=berlin
 
-[kiev]
-                                                                    
+[kiev]                                                                
 type=friend
-secret=1234                                                                                                                  |
-host=dynamic                                                                    |
+secret=1234                                                         
+host=dynamic                                        
 username=berlin 
 
-[viena]                                                                        |
-type=friend                                                                    $|
-secret=1234                                                                    $|
-host=dynamic                                                                   $|
-username=berlin 
-
-
-
+[viena]                                                              
+type=friend                                                          
+secret=1234                                              
+host=dynamic          
+username=berlin
11:30:39
#nano sip.conf
11:30:53
#host=dynamic
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
1303                       (Unspecified)                            D   N             0        Unmonitored
frankfurt/berlin           192.168.12.6                             D   N             5060     Unmonitored
kiev/berlin                (Unspecified)                            D   N             0        Unmonitored
viena/berlin               (Unspecified)                            D   N             0        Unmonitored
6 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 3 offline]
  == Using SIP RTP CoS mark 5
[Apr 23 12:31:20] NOTICE[2717]: chan_sip.c:22753 handle_request_invite: Call from '' (192.168.12.2:5060) to extension '4101' rejected because extension not found in context 'default'.
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).
11:31:22
#nano sip.conf
11:31:35
#host=dynamic
sip.conf         sip_notify.conf
11:31:35
#cat sip.conf
[general]
context=default
directmedia=no
register => berlin:1234@192.168.12.6/frankfurt
register => berlin:1234@192.168.12.2/kiev
register => berlin:1234@192.168.12.5/viena
; peer
; 1301 - 1399 всё моё
[1301]
type=friend
...
[kiev]
type=friend
secret=1234
host=dynamic
username=berlin
[viena]
type=friend
secret=1234
host=dynamic
username=berlin
11:31:53
#asterisk -rcvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, 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~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628)
...
1301/1301                  192.168.12.103                           D   N             5060     Unmonitored
1302/1302                  192.168.12.206                           D   N             5060     Unmonitored
1303                       (Unspecified)                            D   N             0        Unmonitored
frankfurt/berlin           192.168.12.6                             D   N             5060     Unmonitored
kiev/berlin                (Unspecified)                            D   N             0        Unmonitored
viena/berlin               (Unspecified)                            D   N             0        Unmonitored
6 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 3 offline]
aster-3*CLI> exit
Executing last minute cleanups
Asterisk cleanly ending (0).

Файлы

  • /etc/asterisk/extensions.conf
  • sip.conf
  • /etc/asterisk/extensions.conf
    >
    [default]
    ;exten => 1301,1,Answer
    ;exten => 1301,n,Dial(SIP/1301)
    ;exten => 1301,n,Hangup
    exten => _13XX,1,Dial(SIP/${EXTEN})
    
    sip.conf
    >
    [general]
    context=default
    directmedia=no
    register => berlin:1234@192.168.12.6/frankfurt
    register => berlin:1234@192.168.12.2/kiev
    register => berlin:1234@192.168.12.5/viena
    ; peer
    ; 1301 - 1399 всё моё
    [1301]
    type=friend
    secret=1234
    host=dynamic
    [1302]
    type=friend
    secret=1234
    host=dynamic
    [1303]
    type=friend
    secret=1234
    host=dynamic
    [frankfurt]
    type=friend
    secret=1234
    host=dynamic
    username=berlin
    [kiev]
    type=friend
    secret=1234
    host=dynamic
    username=berlin
    [viena]
    type=friend
    secret=1234
    host=dynamic
    username=berlin
    

    Статистика

    Время первой команды журнала12:59:38 2014- 4-22
    Время последней команды журнала11:31:53 2014- 4-23
    Количество командных строк в журнале100
    Процент команд с ненулевым кодом завершения, % 2.00
    Процент синтаксически неверно набранных команд, % 2.00
    Суммарное время работы с терминалом *, час 4.32
    Количество командных строк в единицу времени, команда/мин 0.39
    Частота использования команд
    nano18|================| 16.98%
    asterisk12|===========| 11.32%
    ls8|=======| 7.55%
    [general]7|======| 6.60%
    mc7|======| 6.60%
    [default]6|=====| 5.66%
    dpkg5|====| 4.72%
    sip5|====| 4.72%
    host=dynamic4|===| 3.77%
    mv4|===| 3.77%
    service3|==| 2.83%
    cd3|==| 2.83%
    less3|==| 2.83%
    grep3|==| 2.83%
    chown2|=| 1.89%
    cat2|=| 1.89%
    ifconfig1|| 0.94%
    ls\1|| 0.94%
    touch1|| 0.94%
    l3-agent1|| 0.94%
    pwd1|| 0.94%
    asrterisk1|| 0.94%
    sh1|| 0.94%
    la1|| 0.94%
    apt-get1|| 0.94%
    MINI-VOICEMAIL1|| 0.94%
    clear1|| 0.94%
    ip1|| 0.94%
    apt-cache1|| 0.94%
    сcat1|| 0.94%
    ____
    *) Интервалы неактивности длительностью 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$