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

Содержание

Журнал

Понедельник (04/08/13)

/dev/pts/7
14:26:55
#ps -A | grep isc-dhcp

/dev/pts/8
14:26:55
#ps -A | grep isc-dhcp

/dev/pts/7
14:27:10
#ps -A | grep dhcp
 1578 ?        00:00:00 dhcpd
/dev/pts/8
14:27:10
#ps -A | grep dhcp
 1578 ?        00:00:00 dhcpd
/dev/pts/7
14:27:13
#w
 15:29:31 up  2:00,  4 users,  load average: 0.03, 0.14, 0.12
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1                      16:29    1:28m  0.24s  0.20s -bash
user     tty7     :0               14:01     ?    11.87s  0.07s x-session-manag
user     pts/7    :0.0             14:46    0.00s  0.43s  4.88s gnome-terminal
user     pts/10   :0.0             14:59    3:48   0.24s  4.88s gnome-terminal
/dev/pts/8
14:27:13
#w
 15:29:31 up  2:00,  4 users,  load average: 0.03, 0.14, 0.12
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1                      16:29    1:28m  0.24s  0.20s -bash
user     tty7     :0               14:01     ?    11.87s  0.07s x-session-manag
user     pts/7    :0.0             14:46    0.00s  0.43s  4.88s gnome-terminal
user     pts/10   :0.0             14:59    3:48   0.24s  4.88s gnome-terminal
/dev/pts/7
14:29:31
#l3shot
Choose window to be shoot ...Screenshot is written to /root/.lilalo//2614960581845131996-1365421619_1365424285.xwd
bash: curl: command not found
/dev/pts/8
14:29:31
#l3shot
Choose window to be shoot ...Screenshot is written to /root/.lilalo//2614960581845131996-1365421619_1365424285.xwd
bash: curl: command not found
/dev/pts/0
14:32:09
#w
 15:32:12 up  2:02,  4 users,  load average: 0.01, 0.09, 0.11
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1                      16:29    1:31m  0.24s  0.20s -bash
user     tty7     :0               14:01     ?    12.64s  0.08s x-session-manag
user     pts/0    :0.0             15:32    0.00s  0.36s  5.04s gnome-terminal
user     pts/10   :0.0             14:59    6:29   0.24s  5.04s gnome-terminal
/dev/pts/1
14:32:09
#w
 15:32:12 up  2:02,  4 users,  load average: 0.01, 0.09, 0.11
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1                      16:29    1:31m  0.24s  0.20s -bash
user     tty7     :0               14:01     ?    12.64s  0.08s x-session-manag
user     pts/0    :0.0             15:32    0.00s  0.36s  5.04s gnome-terminal
user     pts/10   :0.0             14:59    6:29   0.24s  5.04s gnome-terminal
/dev/pts/0
14:32:12
#ls -l
total 8
-rw-r--r-- 1 root root 5264 Apr  8  2013 install
/dev/pts/1
14:32:12
#ls -l
total 8
-rw-r--r-- 1 root root 5264 Apr  8  2013 install
/dev/pts/0
14:32:28
#cat /etc/default/isc-dhcp-server
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/isc-dhcp-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES=""
/dev/pts/1
14:32:28
#cat /etc/default/isc-dhcp-server
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/isc-dhcp-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES=""
/dev/pts/0
14:35:33
#~

/dev/pts/1
14:35:33
#~

/dev/pts/0
14:36:05
#echo colorscheme elfrord >> ~/.vimrc

/dev/pts/1
14:36:05
#echo colorscheme elfrord >> ~/.vimrc

/dev/pts/0
14:36:32
#vim ~/.vimrc
/dev/pts/1
14:36:32
#vim ~/.vimrc
--- /tmp/l3-saved-1789.9303.21545	2013-04-08 15:36:42.000000000 +0300
+++ /root/.vimrc	2013-04-08 15:37:00.000000000 +0300
@@ -1,3 +1,2 @@
 syn on
-colorscheme elfrord
 colorscheme elflord
/dev/pts/0
14:37:16
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd.
Starting ISC DHCP server: dhcpd.
/dev/pts/1
14:37:16
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd.
Starting ISC DHCP server: dhcpd.
/dev/pts/0
14:37:30
#whoami
root
/dev/pts/1
14:37:30
#whoami
root
/dev/pts/0
14:42:32
#pkill -1 l3-agent

/dev/pts/1
14:42:32
#pkill -1 l3-agent

/dev/pts/0
14:43:29
#pa aux | grep dhcp
bash: pa: command not found
/dev/pts/1
14:43:29
#pa aux | grep dhcp
bash: pa: command not found
/dev/pts/0
14:44:01
#ps aux | grep dhcp
root      1936  0.0  0.0   4220  2476 ?        Ss   15:37   0:00 /usr/sbin/dhcpd -q eth0
root      1984  0.0  0.0   3352   744 pts/2    S+   15:44   0:00 grep dhcp
/dev/pts/1
14:44:01
#ps aux | grep dhcp
root      1936  0.0  0.0   4220  2476 ?        Ss   15:37   0:00 /usr/sbin/dhcpd -q eth0
root      1984  0.0  0.0   3352   744 pts/2    S+   15:44   0:00 grep dhcp
/dev/pts/0
14:44:04
#ps aux | grep dhcp
root      1936  0.0  0.0   4220  2476 ?        Ss   15:37   0:00 /usr/sbin/dhcpd -q eth0
root      1993  0.0  0.0   3352   748 pts/2    S+   15:44   0:00 grep dhcp
/dev/pts/1
14:44:04
#ps aux | grep dhcp
root      1936  0.0  0.0   4220  2476 ?        Ss   15:37   0:00 /usr/sbin/dhcpd -q eth0
root      1993  0.0  0.0   3352   748 pts/2    S+   15:44   0:00 grep dhcp
/dev/pts/0
14:44:12
#apt-search cache asterisk
bash: apt-search: command not found
/dev/pts/1
14:44:12
#apt-search cache asterisk
bash: apt-search: command not found
прошло 24 минуты
/dev/pts/0
15:08:24
#apt-cache search asterisk
asterisk-mobile - bluetooth mobile devices support for Asterisk
asterisk-mp3 - MP3 format support (format_mp3) for the Asterisk PBX
asterisk-mysql - MySQL support for the Asterisk PBX (cdr mainly)
asterisk-ooh323c - H.323 protocol support for Asterisk (ooh323c stack)
asterisk-chan-capi - Common ISDN API 2.0 implementation for Asterisk
asterisk-core-sounds-en-g722 - asterisk PBX sound files - English/g722
asterisk-core-sounds-en-gsm - asterisk PBX sound files - English/gsm
asterisk-core-sounds-en-wav - asterisk PBX sound files - English/wav
asterisk-core-sounds-es-g722 - asterisk PBX sound files - Spanish/g722
asterisk-core-sounds-es-gsm - asterisk PBX sound files - Spanish/gsm
...
asterisk - Open Source Private Branch Exchange (PBX)
dahdi-linux - DAHDI telephony interface - Linux userspace parts
dahdi-source - DAHDI telephony interface - source code for kernel driver
dahdi - utilities for using the DAHDI kernel modules
iaxmodem - software modem with IAX2 connectivity
libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI
libnetsds-perl - Service Delivery Suite framework
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
/dev/pts/1
15:08:24
#apt-cache search asterisk
asterisk-mobile - bluetooth mobile devices support for Asterisk
asterisk-mp3 - MP3 format support (format_mp3) for the Asterisk PBX
asterisk-mysql - MySQL support for the Asterisk PBX (cdr mainly)
asterisk-ooh323c - H.323 protocol support for Asterisk (ooh323c stack)
asterisk-chan-capi - Common ISDN API 2.0 implementation for Asterisk
asterisk-core-sounds-en-g722 - asterisk PBX sound files - English/g722
asterisk-core-sounds-en-gsm - asterisk PBX sound files - English/gsm
asterisk-core-sounds-en-wav - asterisk PBX sound files - English/wav
asterisk-core-sounds-es-g722 - asterisk PBX sound files - Spanish/g722
asterisk-core-sounds-es-gsm - asterisk PBX sound files - Spanish/gsm
...
asterisk - Open Source Private Branch Exchange (PBX)
dahdi-linux - DAHDI telephony interface - Linux userspace parts
dahdi-source - DAHDI telephony interface - source code for kernel driver
dahdi - utilities for using the DAHDI kernel modules
iaxmodem - software modem with IAX2 connectivity
libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI
libnetsds-perl - Service Delivery Suite framework
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
/dev/pts/0
15:08:35
#apt-get install asterisk asterisk-config asterisk-sounds-main asterisk-sounds-extra
Package configuration
 ┌────────────────────────────────────────────────────┤ Configuring libvpb0 ├────────────────────────────────────────────────────┐
 │ This is the numeric code for the region your phone system will be operating in (eg. 61 for Australia or 33 for France).  It   │
 │ is used to configure the default regional standards that Voicetronix telephony hardware should comply with.                   │
 │                                                                                                                               │
 │ ITU-T telephone code:                                                                                                         │
 │                                                                                                                               │
 â”3801___________________________________________________________________________________________________________________________ │
 │                                                                                                                               │
 │                                                            <Ok>                                                               │
...
Setting up unixodbc (2.2.14p2-1) ...
Setting up asterisk (1:1.6.2.9-2+squeeze10) ...
Adding system user for Asterisk
Adding user `asterisk' to group `dialout' ...
Adding user asterisk to group dialout
Done.
Adding user `asterisk' to group `audio' ...
Adding user asterisk to group audio
Done.
Starting Asterisk PBX: asterisk.
/dev/pts/1
15:08:35
#apt-get install asterisk asterisk-config asterisk-sounds-main asterisk-sounds-extra
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  autopoint dahdi dahdi-linux debhelper fancontrol freetds-common fxload gettext git html2text intltool-debian libc-client2007e
Package configuration
 ┌────────────────────────────────────────────────────┤ Configuring libvpb0 ├────────────────────────────────────────────────────┐
 │ This is the numeric code for the region your phone system will be operating in (eg. 61 for Australia or 33 for France).  It   │
 │ is used to configure the default regional standards that Voicetronix telephony hardware should comply with.                   │
 │                                                                                                                               │
...
Setting up unixodbc (2.2.14p2-1) ...
Setting up asterisk (1:1.6.2.9-2+squeeze10) ...
Adding system user for Asterisk
Adding user `asterisk' to group `dialout' ...
Adding user asterisk to group dialout
Done.
Adding user `asterisk' to group `audio' ...
Adding user asterisk to group audio
Done.
Starting Asterisk PBX: asterisk.
/dev/pts/0
15:18:09
#dpkg -L asterisk
/.
/etc
/etc/asterisk
/etc/init.d
/etc/init.d/asterisk
/etc/default
/etc/default/asterisk
/etc/logrotate.d
/etc/logrotate.d/asterisk
/var
...
/usr/share/asterisk/conf/udptl.conf.sample
/usr/share/asterisk/conf/logger.conf.sample
/usr/share/asterisk/sounds
/usr/share/asterisk/firmware
/usr/share/asterisk/firmware/iax
/usr/share/asterisk/agi-bin
/usr/sbin/rasterisk
/usr/share/man/man8/rasterisk.8.gz
/usr/share/asterisk/sounds/recordings
/usr/share/asterisk/sounds/custom
/dev/pts/1
15:18:09
#dpkg -L asterisk
/.
/etc
/etc/asterisk
/etc/init.d
/etc/init.d/asterisk
/etc/default
/etc/default/asterisk
/etc/logrotate.d
/etc/logrotate.d/asterisk
/var
...
/usr/share/asterisk/conf/udptl.conf.sample
/usr/share/asterisk/conf/logger.conf.sample
/usr/share/asterisk/sounds
/usr/share/asterisk/firmware
/usr/share/asterisk/firmware/iax
/usr/share/asterisk/agi-bin
/usr/sbin/rasterisk
/usr/share/man/man8/rasterisk.8.gz
/usr/share/asterisk/sounds/recordings
/usr/share/asterisk/sounds/custom
/dev/pts/0
15:24:28
#cd /etc/asterisk/

/dev/pts/1
15:24:28
#cd /etc/asterisk/

/dev/pts/0
15:31:32
#cat /etc/default/asterisk
# This file allows you to alter the configuration of the Asterisk
# init.d script. Normally you should leave the file as-is.
#
# RUNASTERISK: If set to anything other that 'yes', the asterisk init.d script
#              will not run. The default is 'yes'.
#RUNASTERISK=no
#
#
# AST_REALTIME: if set to anything other than "no", asterisk will run in
#               real-time priority (pass '-p' to asterisk). un-rem the
...
#               However if you just enable generation of core files and run
#               asterisk as a daemon it will fail to write core files.
#
#               Alternatively you can set this independently elsewhere.
#               See http://lxr.linux.no/source/Documentation/sysctl/kernel.txt
#               Here is what Asterisk's ast_grab_core
#               script would expect:
#CORE_PATTERN='core.%p'
#               But you might prefer something like:
#CORE_PATTERN='core.%e.%t'
/dev/pts/1
15:31:32
#cat /etc/default/asterisk
# This file allows you to alter the configuration of the Asterisk
# init.d script. Normally you should leave the file as-is.
#
# RUNASTERISK: If set to anything other that 'yes', the asterisk init.d script
#              will not run. The default is 'yes'.
#RUNASTERISK=no
#
#
# AST_REALTIME: if set to anything other than "no", asterisk will run in
#               real-time priority (pass '-p' to asterisk). un-rem the
...
#               However if you just enable generation of core files and run
#               asterisk as a daemon it will fail to write core files.
#
#               Alternatively you can set this independently elsewhere.
#               See http://lxr.linux.no/source/Documentation/sysctl/kernel.txt
#               Here is what Asterisk's ast_grab_core
#               script would expect:
#CORE_PATTERN='core.%p'
#               But you might prefer something like:
#CORE_PATTERN='core.%e.%t'
/dev/pts/0
15:32:21
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/1
15:32:21
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/0
15:32:26
#ps aux | grep asterisk
asterisk  4524  1.2  0.2  48032 18152 ?        Ssl  16:32   0:00 /usr/sbin/asterisk -p -U asterisk
asterisk  4525  0.0  0.0   2940   568 ?        S    16:32   0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 4524
root      4570  0.0  0.0   3352   748 pts/2    S+   16:32   0:00 grep asterisk
/dev/pts/1
15:32:26
#ps aux | grep asterisk
asterisk  4524  1.2  0.2  48032 18152 ?        Ssl  16:32   0:00 /usr/sbin/asterisk -p -U asterisk
asterisk  4525  0.0  0.0   2940   568 ?        S    16:32   0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 4524
root      4570  0.0  0.0   3352   748 pts/2    S+   16:32   0:00 grep asterisk
/dev/pts/0
15:32:57
#vim sip.conf
/dev/pts/1
15:32:57
#vim sip.conf
/dev/pts/0
15:35:07
#; without altering any authentication data in config.

/dev/pts/1
15:35:07
#; without altering any authentication data in config.

15:35:20
#mv extensions.conf extensions.conf.ORIG

/dev/pts/0
15:35:20
#mv extensions.conf extensions.conf.ORIG

15:35:30
#touch extensions.conf

/dev/pts/1
15:35:30
#touch extensions.conf

/dev/pts/0
15:35:49
#touch sip.conf

/dev/pts/1
15:35:49
#touch sip.conf

/dev/pts/0
15:35:55
#chown asterisk:asterisk extensions.conf

/dev/pts/1
15:35:55
#chown asterisk:asterisk extensions.conf

/dev/pts/0
15:36:10
#chown asterisk:asterisk sip.conf

/dev/pts/1
15:36:10
#chown asterisk:asterisk sip.conf

/dev/pts/0
15:36:14
#ls -l /etc/asterisk/extensions.conf
-rw-r--r-- 1 asterisk asterisk 0 Apr  8 16:35 /etc/asterisk/extensions.conf
/dev/pts/1
15:36:14
#ls -l /etc/asterisk/extensions.conf
-rw-r--r-- 1 asterisk asterisk 0 Apr  8 16:35 /etc/asterisk/extensions.conf
/dev/pts/0
15:36:27
#vim /etc/asterisk/sip.conf
/dev/pts/1
15:36:27
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-1789.31406.24411	2013-04-08 16:37:19.000000000 +0300
+++ /etc/asterisk/sip.conf	2013-04-08 16:41:06.000000000 +0300
@@ -0,0 +1,9 @@
+; "sip.conf" file
+
+context=default
+
+; SIP-peer
+[2101]
+type=friend
+secret=4321
+host=dynamic
15:43:21
#ls -l /etc/asterisk/sip.conf
-rw------- 1 asterisk asterisk 91 Apr  8 16:41 /etc/asterisk/sip.conf
/dev/pts/0
15:43:21
#ls -l /etc/asterisk/sip.conf
-rw------- 1 asterisk asterisk 91 Apr  8 16:41 /etc/asterisk/sip.conf
15:43:26
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux5 (pid = 4524)
linux5*CLI> quit
/dev/pts/1
15:43:26
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux5 (pid = 4524)
linux5*CLI> quit
/dev/pts/0
15:46:47
#vim /etc/asterisk/sip.conf
/dev/pts/1
15:46:47
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-1789.26615.5696	2013-04-08 16:46:56.000000000 +0300
+++ /etc/asterisk/sip.conf	2013-04-08 16:47:32.000000000 +0300
@@ -7,3 +7,8 @@
 type=friend
 secret=4321
 host=dynamic
+
+[2110]
+type=friend
+secret=4321
+host=dynamic
/dev/pts/0
15:47:32
#vim /etc/asterisk/sip.conf
/dev/pts/1
15:47:32
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-1789.21527.22655	2013-04-08 16:47:40.000000000 +0300
+++ /etc/asterisk/sip.conf	2013-04-08 16:47:56.000000000 +0300
@@ -1,5 +1,6 @@
 ; "sip.conf" file
 
+[general]
 context=default
 
 ; SIP-peer
прошло 10 минут
/dev/pts/0
15:57:56
#vim /etc/asterisk/sip.conf
/dev/pts/1
15:57:56
#vim /etc/asterisk/sip.conf
/dev/pts/7
15:58:04
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/etc/asterisk/extconfig.conf':   == Found
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux5 (pid = 4524)
...
[Apr  8 16:58:51] NOTICE[4546]: chan_sip.c:21643 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2110
    -- Unregistered SIP '2110'
    -- Registered SIP '2110' at 192.168.50.100 port 57454
[Apr  8 16:59:19] NOTICE[4546]: chan_sip.c:21643 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2110
  == Using SIP RTP CoS mark 5
[Apr  8 16:59:37] NOTICE[4546]: chan_sip.c:20325 handle_request_invite: Call from '2101' to extension '2110' rejected because extension not found in context 'default'.
  == Using SIP RTP CoS mark 5
[Apr  8 16:59:54] NOTICE[4546]: chan_sip.c:20325 handle_request_invite: Call from '2101' to extension '192*168*50*100' rejected because extension not found in context 'default'.
linux5*CLI> quit
Executing last minute cleanups
прошло 12 минут
/dev/pts/0
16:10:40
#vim extensions.conf
/dev/pts/1
16:10:40
#vim extensions.conf
--- /tmp/l3-saved-1789.7281.22442	2013-04-08 17:10:45.000000000 +0300
+++ extensions.conf	2013-04-08 17:14:09.000000000 +0300
@@ -0,0 +1,4 @@
+; extension.conf
+
+[default]
+exten => 8000,1,Playback(welcome)
/dev/pts/0
16:14:24
#[default]
        broadcast 192.168.15.255
        gateway 192.168.15.253
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.15.253
        dns-search unix.nt
                                                            [ Read 18 lines ]
[root@linux5:~]#
/dev/pts/1
16:14:24
#[default]
        broadcast 192.168.15.255
        gateway 192.168.15.253
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.15.253
        dns-search unix.nt
                                                            [ Read 18 lines ]
[root@linux5:~]#
/dev/pts/0
16:15:06
#cd /etc/asterisk/

/dev/pts/1
16:15:06
#cd /etc/asterisk/

/dev/pts/0
16:15:12
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux5 (pid = 4524)
Verbosity is at least 3
linux5*CLI> dialplan reload
...
    -- merging incls/swits/igpats from old(app_dial_gosub_virtual_context) to new(app_dial_gosub_virtual_context) context, registrar = pbx_config
    -- Added extension 's' priority 1 to app_dial_gosub_virtual_context (0xb52a71f0)
    -- Registered extension context 'parkedcalls' (0x8c6d2b0) in local table 0x8c69420; registrar: features
    -- merging incls/swits/igpats from old(parkedcalls) to new(parkedcalls) context, registrar = pbx_config
    -- Added extension '700' priority 1 to parkedcalls (0x8c6d2b0)
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000628 sec
    -- Time to restore hints and swap in new dialplan: 0.000001 sec
    -- Time to delete the old dialplan: 0.000089 sec
    -- Total time merge_contexts_delete: 0.000718 sec
linux5*CLI> exit
/dev/pts/1
16:15:12
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux5 (pid = 4524)
Verbosity is at least 3
linux5*CLI> dialplan reload
...
    -- merging incls/swits/igpats from old(app_dial_gosub_virtual_context) to new(app_dial_gosub_virtual_context) context, registrar = pbx_config
    -- Added extension 's' priority 1 to app_dial_gosub_virtual_context (0xb52a71f0)
    -- Registered extension context 'parkedcalls' (0x8c6d2b0) in local table 0x8c69420; registrar: features
    -- merging incls/swits/igpats from old(parkedcalls) to new(parkedcalls) context, registrar = pbx_config
    -- Added extension '700' priority 1 to parkedcalls (0x8c6d2b0)
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000628 sec
    -- Time to restore hints and swap in new dialplan: 0.000001 sec
    -- Time to delete the old dialplan: 0.000089 sec
    -- Total time merge_contexts_delete: 0.000718 sec
linux5*CLI> exit
/dev/pts/0
16:15:43
#vim extensions.conf
/dev/pts/1
16:15:43
#vim extensions.conf
/dev/pts/0
16:15:59
#[default]
PING 192.168.15.253 (192.168.15.253) 56(84) bytes of data.
64 bytes from 192.168.15.253: icmp_req=1 ttl=63 time=0.233 ms
^C
--- 192.168.15.253 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.233/0.233/0.233/0.000 ms
/dev/pts/1
16:15:59
#[default]
PING 192.168.15.253 (192.168.15.253) 56(84) bytes of data.
64 bytes from 192.168.15.253: icmp_req=1 ttl=63 time=0.233 ms
^C
--- 192.168.15.253 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.233/0.233/0.233/0.000 ms
/dev/pts/0
16:16:17
#vim extensions.conf
/dev/pts/1
16:16:17
#vim extensions.conf
--- /tmp/l3-saved-5151.24129.7802	2013-04-08 17:16:45.000000000 +0300
+++ extensions.conf	2013-04-08 17:17:26.000000000 +0300
@@ -2,3 +2,4 @@
 
 [default]
 exten => 8000,1,Playback(welcome)
+exten => 21XX,1,Dial(SIP\${EXTEN},30)
/dev/pts/0
16:17:26
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux5 (pid = 4524)
Verbosity is at least 3
linux5*CLI> dialplan reload
...
    -- Executing [8000@default:1] Playback("SIP/2110-00000001", "welcome") in new stack
    -- <SIP/2110-00000001> Playing 'welcome.gsm' (language 'en')
[Apr  8 17:17:52] NOTICE[5235]: channel.c:3068 __ast_read: Dropping incompatible voice frame on SIP/2110-00000001 of format ulaw since our native format has changed to 0x80002 (gsm|h263)
    -- Auto fallthrough, channel 'SIP/2110-00000001' status is 'UNKNOWN'
  == Using SIP RTP CoS mark 5
    -- Executing [8000@default:1] Playback("SIP/2110-00000002", "welcome") in new stack
    -- <SIP/2110-00000002> Playing 'welcome.gsm' (language 'en')
[Apr  8 17:18:00] NOTICE[5236]: channel.c:3068 __ast_read: Dropping incompatible voice frame on SIP/2110-00000002 of format ulaw since our native format has changed to 0x80002 (gsm|h263)
    -- Auto fallthrough, channel 'SIP/2110-00000002' status is 'UNKNOWN'
linux5*CLI> exit
/dev/pts/1
16:17:26
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux5 (pid = 4524)
Verbosity is at least 3
linux5*CLI> dialplan reload
...
    -- Executing [8000@default:1] Playback("SIP/2110-00000001", "welcome") in new stack
    -- <SIP/2110-00000001> Playing 'welcome.gsm' (language 'en')
[Apr  8 17:17:52] NOTICE[5235]: channel.c:3068 __ast_read: Dropping incompatible voice frame on SIP/2110-00000001 of format ulaw since our native format has changed to 0x80002 (gsm|h263)
    -- Auto fallthrough, channel 'SIP/2110-00000001' status is 'UNKNOWN'
  == Using SIP RTP CoS mark 5
    -- Executing [8000@default:1] Playback("SIP/2110-00000002", "welcome") in new stack
    -- <SIP/2110-00000002> Playing 'welcome.gsm' (language 'en')
[Apr  8 17:18:00] NOTICE[5236]: channel.c:3068 __ast_read: Dropping incompatible voice frame on SIP/2110-00000002 of format ulaw since our native format has changed to 0x80002 (gsm|h263)
    -- Auto fallthrough, channel 'SIP/2110-00000002' status is 'UNKNOWN'
linux5*CLI> exit
/dev/pts/0
16:18:06
#vim extensions.conf
/dev/pts/1
16:18:06
#vim extensions.conf
--- /tmp/l3-saved-5151.32622.16741	2013-04-08 17:18:07.000000000 +0300
+++ extensions.conf	2013-04-08 17:18:18.000000000 +0300
@@ -2,4 +2,4 @@
 
 [default]
 exten => 8000,1,Playback(welcome)
-exten => 21XX,1,Dial(SIP\${EXTEN},30)
+exten => _21XX,1,Dial(SIP\${EXTEN},30)
/dev/pts/0
16:18:18
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux5 (pid = 4524)
Verbosity is at least 3
linux5*CLI> dialplan reload
...
   -- Added extension '700' priority 1 to parkedcalls (0x8c6a1e8)
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000588 sec
    -- Time to restore hints and swap in new dialplan: 0.000001 sec
    -- Time to delete the old dialplan: 0.000038 sec
    -- Total time merge_contexts_delete: 0.000627 sec
  == Using SIP RTP CoS mark 5
    -- Executing [2110@default:1] Dial("SIP/2101-00000003", "SIP\2110,30") in new stack
[Apr  8 17:18:32] WARNING[5262]: app_dial.c:1663 dial_exec_full: Dial argument takes format (technology/[device:]number1)
  == Spawn extension (default, 2110, 1) exited non-zero on 'SIP/2101-00000003'
linux5*CLI> exit
/dev/pts/1
16:18:18
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux5 (pid = 4524)
Verbosity is at least 3
linux5*CLI> dialplan reload
...
   -- Added extension '700' priority 1 to parkedcalls (0x8c6a1e8)
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000588 sec
    -- Time to restore hints and swap in new dialplan: 0.000001 sec
    -- Time to delete the old dialplan: 0.000038 sec
    -- Total time merge_contexts_delete: 0.000627 sec
  == Using SIP RTP CoS mark 5
    -- Executing [2110@default:1] Dial("SIP/2101-00000003", "SIP\2110,30") in new stack
[Apr  8 17:18:32] WARNING[5262]: app_dial.c:1663 dial_exec_full: Dial argument takes format (technology/[device:]number1)
  == Spawn extension (default, 2110, 1) exited non-zero on 'SIP/2101-00000003'
linux5*CLI> exit
/dev/pts/0
16:18:43
#vim extensions.conf
/dev/pts/1
16:18:43
#vim extensions.conf
--- /tmp/l3-saved-5151.19986.13909	2013-04-08 17:18:45.000000000 +0300
+++ extensions.conf	2013-04-08 17:19:01.000000000 +0300
@@ -2,4 +2,4 @@
 
 [default]
 exten => 8000,1,Playback(welcome)
-exten => _21XX,1,Dial(SIP\${EXTEN},30)
+exten => _21XX,1,Dial(SIP/${EXTEN},30)
/dev/pts/0
16:19:01
#vim extensions.conf
/dev/pts/1
16:19:01
#vim extensions.conf
--- /tmp/l3-saved-5151.16762.15387	2013-04-08 17:19:05.000000000 +0300
+++ extensions.conf	2013-04-08 17:20:50.000000000 +0300
@@ -1,5 +1,9 @@
 ; extension.conf
 
 [default]
-exten => 8000,1,Playback(welcome)
+exten => 8000,1,Answer
+exten => 8000,n,Wait(2)
+exten => 8000,n,Playback(welcome)
+exten => 8000,n,Playback(congrats)
+
 exten => _21XX,1,Dial(SIP/${EXTEN},30)

Файлы

  • /etc/default/asterisk
  • /etc/default/isc-dhcp-server
  • /etc/default/asterisk
    >
    # This file allows you to alter the configuration of the Asterisk
    # init.d script. Normally you should leave the file as-is.
    #
    # RUNASTERISK: If set to anything other that 'yes', the asterisk init.d script
    #              will not run. The default is 'yes'.
    #RUNASTERISK=no
    #
    #
    # AST_REALTIME: if set to anything other than "no", asterisk will run in
    #               real-time priority (pass '-p' to asterisk). un-rem the
    #               following line to disable asterisk from running in real-time
    #               priority. The default is 'yes'.
    #AST_REALTIME=no
    #
    # PARAMS: extra parameters to pass to asterisk: generate cores in
    #         case of crash, and be more verbose. -F guarantees that Asterisk
    #         will still run daemonized.
    #
    #         Instead of adding switches here, consider editing
    #         /etc/asterisk/asterisk.conf
    #PARAMS="-F -g -vvv"
    #
    #
    # RUNASTSAFE: run safe_asterisk rather than asterisk (will auto-restart upon
    #             crash). This is generally less tested and has some known issues
    #             with properly starting and stopping Asterisk.
    #RUNASTSAFE=yes
    #
    # ASTSAFE_CONSOLE: whether you want safe_asterisk to spawn a console for Asterisk.
    #ASTSAFE_CONSOLE=yes
    #
    # ASTSAFE_TTY: tty for Asterisk to run on (only for safe_asterisk)
    #ASTSAFE_TTY=9
    #
    # MAXFILES: Set this to the number of open file handles the Asterisk
    #           process can have. Useful if you get "Too many open files" error.
    #MAXFILES=8192
    #
    # AST_DUMPCORE: if set to anything other than "no", asterisk will be run with
    #               the option -g (to tell it to dump core on crash) and its
    #               working directory will be set to /var/spool/asterisk, as that
    #               directory is writable and hence core files can be written there.
    #               See /etc/init.d/asterisk for some other relevant variables.
    #
    #               It is recommended that you install asterisk-dbg to be able
    #               to produce meaningful backtraces from the core file.
    #
    #               By default core files will be written to /tmp (can be
    #               changed by setting AST_DUMPCORE_DIR). Alternatively, see
    #               CORE_PATTERN below.
    #AST_DUMPCORE=yes
    #
    # AST_DUMPCORE_DIR: By default asterisk runs in the directory '/' like any
    #               daemon. Setting this allows you to tell it to tell the
    #               Asterisk daemon to run in a different directory if
    #               AST_DUMPCORE is enabled. The default is
    #               /var/spool/asterisk. That is a good choice because it
    #               is writable (thus enabling the actual writing of the
    #               core file) but relatively immune to symlink attacks
    #               (because not world-writable like /tmp/).
    #               Note, however, that if CORE_PATTERN is an absolute
    #               path, it will override AST_DUMPCORE_DIR.
    #
    # CORE_PATTERN: If you use AST_DUMPCORE above, this is optionally set to a
    #               pattern of the core file. The default is not to touch the
    #               core_pattern settings, which is generally a good idea as
    #               it affects every core file generated on your system.
    #
    #               However if you just enable generation of core files and run
    #               asterisk as a daemon it will fail to write core files.
    #
    #               Alternatively you can set this independently elsewhere.
    #               See http://lxr.linux.no/source/Documentation/sysctl/kernel.txt
    #               Here is what Asterisk's ast_grab_core
    #               script would expect:
    #CORE_PATTERN='core.%p'
    #               But you might prefer something like:
    #CORE_PATTERN='core.%e.%t'
    
    /etc/default/isc-dhcp-server
    >
    # Defaults for dhcp initscript
    # sourced by /etc/init.d/dhcp
    # installed at /etc/default/isc-dhcp-server by the maintainer scripts
    #
    # This is a POSIX shell fragment
    #
    # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
    #       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
    INTERFACES=""
    

    Статистика

    Время первой команды журнала14:26:55 2013- 4- 8
    Время последней команды журнала16:19:01 2013- 4- 8
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 3.96
    Процент синтаксически неверно набранных команд, % 3.96
    Суммарное время работы с терминалом *, час 1.87
    Количество командных строк в единицу времени, команда/мин 0.90
    Частота использования команд
    vim24|====================| 20.51%
    grep12|==========| 10.26%
    ps10|========| 8.55%
    asterisk9|=======| 7.69%
    ls6|=====| 5.13%
    touch4|===| 3.42%
    chown4|===| 3.42%
    cd4|===| 3.42%
    cat4|===| 3.42%
    [default]4|===| 3.42%
    w4|===| 3.42%
    dpkg2|=| 1.71%
    l3shot2|=| 1.71%
    /etc/init.d/asterisk2|=| 1.71%
    without2|=| 1.71%
    >2|=| 1.71%
    pkill2|=| 1.71%
    whoami2|=| 1.71%
    echo2|=| 1.71%
    apt-search2|=| 1.71%
    apt-get2|=| 1.71%
    pa2|=| 1.71%
    ~2|=| 1.71%
    /etc/init.d/isc-dhcp-server2|=| 1.71%
    mv2|=| 1.71%
    apt-cache2|=| 1.71%
    .vimrc2|=| 1.71%
    ____
    *) Интервалы неактивности длительностью 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$