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

Содержание

Журнал

Понедельник (10/17/11)

/dev/tty2
11:50:30
#pkill -1 l3-agent

11:50:34
#w
 12:50:35 up  2:01,  4 users,  load average: 0.00, 0.03, 0.10
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1                      10:49   18:23   1.68s  1.42s ssh user@192.168.15.252
root     tty2                      12:50    0.00s  0.15s  0.00s script -f -c bash -q /root/.lilalo//26101254562344623034-1318845030.script
user     tty8     :0               12:28    2:01m  8.24s  0.10s x-session-manager
user     pts/0    :0.0             12:29   19:10   0.08s  0.08s bash
11:50:35
#date
Mon Oct 17 12:53:45 FET 2011
11:53:45
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.15.253  0.0.0.0         UG    0      0        0 eth0
localnet        *               255.255.255.0   U     0      0        0 eth0
прошло 74 минуты
13:07:59
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         switch.unix.nt  0.0.0.0         UG    0      0        0 eth0
localnet        *               255.255.255.0   U     0      0        0 eth0
13:10:41
#ssh user@192.168.15.21
The authenticity of host '192.168.15.21 (192.168.15.21)' can't be established.
RSA key fingerprint is f6:96:65:bc:8e:c0:77:35:49:6e:ca:e4:f8:3f:59:7d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.15.21' (RSA) to the list of known hosts.
user@192.168.15.21's password:
Linux linux1 2.6.39-bpo.2-686-pae #1 SMP Thu Aug 4 11:02:22 UTC 2011 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Oct 17 14:11:20 2011 from 192.168.15.22
l3-agent is already running: pid=1952; pidfile=/home/user/.lilalo/l3-agent.pid
13:11:53
$exit
exit
Connection to 192.168.15.21 closed.
13:11:58
#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
13:17:29
#LANG=RU 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
13:19:09
#LANG=ru_UA.UTF-8 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
13:20:08
#apt-get install asterisk asterisk-config asterisk-sounds-make asterisk-sounds-extra
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package asterisk-sounds-make
13:24:11
#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:                                                                                                                                                                                                                    ³
  ³                                                                                                                                                                                                                                          ³
  ³ 380_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________ ³
  ³                                                                                                                                                                                                                                          ³
  ³                                                                                                                  <Ok>                                                                                                                    ³
  ³                                                                                                                                                                                                                                          ³
...
Setting up unixodbc (2.2.14p2-1) ...
Setting up asterisk (1:1.6.2.9-2+squeeze3) ...
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.
13:25:02
#dpkg -L asterisk | less
13:28:52
#less
13:28:52
#less /etc/lo
13:28:52
#less /etc/logrotate.d/asterisk
13:32:29
##

прошло 10 минут
13:43:18
#/etc/init.d/asterisk start
Asterisk PBX is already running. Use restart.
13:44:12
#ps aux | grep ast
asterisk  6260  0.0  0.2  47836 18252 ?        Ssl  14:25   0:00 /usr/sbin/asterisk -p -U asterisk
asterisk  6261  0.0  0.0   2936   564 ?        S    14:25   0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 6260
root      6438  0.0  0.0   1828   516 pts/1    S+   14:44   0:00 grep ast
13:44:49
#cat /etc/def
default/ defoma/
13:44:49
#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'
13:47:16
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
...
ss7          stun         timing       transcoder   udptl        ulimit       unistim      voicemail
linux8*CLI> sip show pe
peers  peer
linux8*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
linux8*CLI> sip reload
 Reloading SIP
linux8*CLI> quit
Executing last minute cleanups
13:51:58
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 192.168.15.28
        netmask 255.255.255.0
        network 192.168.15.0
        broadcast 192.168.15.255
        gateway 192.168.15.253
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.35.1
        dns-search unix.nt
прошло 15 минут
14:07:27
#vim /etc/network/interfaces
--- /tmp/l3-saved-3270.28823.1085	2011-10-17 15:08:00.000000000 +0300
+++ /etc/network/interfaces	2011-10-17 15:09:10.000000000 +0300
@@ -8,11 +8,11 @@
 # The primary network interface
 allow-hotplug eth0
 iface eth0 inet static
-	address 192.168.15.28
+	address 192.168.80.1
 	netmask 255.255.255.0
-	network 192.168.15.0
-	broadcast 192.168.15.255
-	gateway 192.168.15.253
+	network 192.168.80.0
+	broadcast 192.168.80.255
+	gateway 192.168.80.254
 	# dns-* options are implemented by the resolvconf package, if installed
 	dns-nameservers 10.0.35.1
 	dns-search unix.nt
14:09:10
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 192.168.80.1
        netmask 255.255.255.0
        network 192.168.80.0
        broadcast 192.168.80.255
        gateway 192.168.80.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.35.1
        dns-search unix.nt
14:09:13
##if eth0 down

14:11:09
##if eth0 up

14:11:16
#if eth0 down
>
> if eth0 up
>
>
>
> exit
>
>
> ifconfig -a
> ^C
14:13:04
#ifdown eth0
SIOCDELRT: No such process
14:13:23
#ifdown eth0
ifdown: interface eth0 not configured
14:13:38
#ifup eth0

14:13:56
#ifconfig -a
eth0      Link encap:Ethernet  HWaddr 2c:27:d7:30:42:78
          inet addr:192.168.80.1  Bcast:192.168.80.255  Mask:255.255.255.0
          inet6 addr: fe80::2e27:d7ff:fe30:4278/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:556267 errors:0 dropped:0 overruns:0 frame:0
          TX packets:271030 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:775666809 (739.7 MiB)  TX bytes:19343335 (18.4 MiB)
          Interrupt:20 Memory:fe400000-fe420000
lo        Link encap:Local Loopback
...
          RX packets:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2908 (2.8 KiB)  TX bytes:2908 (2.8 KiB)
pan0      Link encap:Ethernet  HWaddr 6a:11:af:40:03:a7
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
14:14:03
#ping www.ukr.net
^C
14:14:21
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.80.254  0.0.0.0         UG    0      0        0 eth0
192.168.80.0    *               255.255.255.0   U     0      0        0 eth0
14:14:40
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data.
^C
--- 10.0.35.1 ping statistics ---
21 packets transmitted, 0 received, 100% packet loss, time 20158ms
14:15:17
#ping 192.168.0.254
PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
^C
--- 192.168.0.254 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2015ms
14:15:35
#ping 192.168.80.254
PING 192.168.80.254 (192.168.80.254) 56(84) bytes of data.
64 bytes from 192.168.80.254: icmp_req=1 ttl=64 time=0.578 ms
64 bytes from 192.168.80.254: icmp_req=2 ttl=64 time=0.591 ms
^C
--- 192.168.80.254 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.578/0.584/0.591/0.025 ms
14:15:40
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data.
64 bytes from 10.0.35.1: icmp_req=25 ttl=63 time=2.70 ms
64 bytes from 10.0.35.1: icmp_req=26 ttl=63 time=0.235 ms
64 bytes from 10.0.35.1: icmp_req=27 ttl=63 time=0.262 ms
64 bytes from 10.0.35.1: icmp_req=28 ttl=63 time=0.268 ms
^C
--- 10.0.35.1 ping statistics ---
28 packets transmitted, 4 received, 85% packet loss, time 27193ms
rtt min/avg/max/mdev = 0.235/0.866/2.702/1.060 ms
14:16:09
#ping www.ukr.net
PING www.ukr.net (195.214.195.105) 56(84) bytes of data.
^C
--- www.ukr.net ping statistics ---
28 packets transmitted, 0 received, 100% packet loss, time 26999ms
14:16:46
#ping www.ukr.net
PING www.ukr.net (195.214.195.105) 56(84) bytes of data.
64 bytes from 195.214.195.105: icmp_req=1 ttl=58 time=0.854 ms
64 bytes from 195.214.195.105: icmp_req=2 ttl=58 time=0.914 ms
^C64 bytes from 195.214.195.105: icmp_req=3 ttl=58 time=0.913 ms
--- www.ukr.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 10409ms
rtt min/avg/max/mdev = 0.854/0.893/0.914/0.044 ms
14:16:58
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         gw8.unix.nt     0.0.0.0         UG    0      0        0 eth0
192.168.80.0    *               255.255.255.0   U     0      0        0 eth0
14:25:05
#apt-get install dhcp3-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  isc-dhcp-server
Suggested packages:
  isc-dhcp-server-ldap
The following NEW packages will be installed:
  dhcp3-server isc-dhcp-server
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
...
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-15+squeeze3_i386.deb) ...
Selecting previously deselected package dhcp3-server.
Unpacking dhcp3-server (from .../dhcp3-server_4.1.1-P1-15+squeeze3_all.deb) ...
Processing triggers for man-db ...
Setting up isc-dhcp-server (4.1.1-P1-15+squeeze3) ...
Generating /etc/default/isc-dhcp-server...
Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
 failed!
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Setting up dhcp3-server (4.1.1-P1-15+squeeze3) ...
прошло 34 минуты
14:59:07
#vim /etc/dhcp/dhcpd.conf
15:07:58
#/etc/init.d/isc-dhcp-server start
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhcpd.conf line 37: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
15:08:30
#/etc/init.d/isc-dhcp-server restart
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhcpd.conf line 37: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
15:08:40
#vim /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-3270.2692.27042	2011-10-17 16:08:58.000000000 +0300
+++ /etc/dhcp/dhcpd.conf	2011-10-17 16:09:59.000000000 +0300
@@ -35,7 +35,7 @@
 subnet 192.168.80.0 netmask 255.255.255.0 {
   range 192.168.80.200 192.168.80.220;
   option routers 192.168.80.254;
-#}
+}
 
 # This declaration allows BOOTP clients to get dynamic addresses,
 # which we don't really recommend.
15:09:59
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd failed!
Starting ISC DHCP server: dhcpd.
15:10:05
#tail -f /var/lib/d
dbus/                defoma/              dhcp/                dictionaries-common/ dpkg/
15:10:05
#tail -f /var/lib/dhcp/dhcpd.leases
lease 192.168.80.201 {
  starts 1 2011/10/17 13:12:14;
  ends 1 2011/10/17 13:22:14;
  cltt 1 2011/10/17 13:12:14;
  binding state active;
  next binding state free;
  hardware ethernet 00:1b:d4:0b:c4:92;
  uid "\001\000\033\324\013\304\222";
  client-hostname "SEP001BD40BC492";
}
^C
15:13:37
#tail -f /var/lib/dhcp/dhcpd.leases
lease 192.168.80.201 {
  starts 1 2011/10/17 13:12:14;
  ends 1 2011/10/17 13:22:14;
  cltt 1 2011/10/17 13:12:14;
  binding state active;
  next binding state free;
  hardware ethernet 00:1b:d4:0b:c4:92;
  uid "\001\000\033\324\013\304\222";
  client-hostname "SEP001BD40BC492";
}
^C
15:13:43
#tail /var/lib/dhcp/dhcpd.leases
lease 192.168.80.201 {
  starts 1 2011/10/17 13:12:14;
  ends 1 2011/10/17 13:22:14;
  cltt 1 2011/10/17 13:12:14;
  binding state active;
  next binding state free;
  hardware ethernet 00:1b:d4:0b:c4:92;
  uid "\001\000\033\324\013\304\222";
  client-hostname "SEP001BD40BC492";
}
15:13:47
#less /var/lib/dhcp/dhcpd.leases
прошла 21 минута
15:34:47
#less /var/lib/dhcp/dhcpd.leases
15:35:05
#cat /etc/r
radiusclient-ng/ rc0.d/           rc2.d/           rc4.d/           rc6.d/           reportbug.conf   resolvconf/      rpc              rsyslog.d/
rc.local         rc1.d/           rc3.d/           rc5.d/           rcS.d/           resolv.conf      rmt              rsyslog.conf
15:35:05
#cat /etc/asterisk/
adsi.conf                cdr.conf                 cli.conf                 enum.conf                func_odbc.conf           logger.conf              muted.conf               res_odbc.conf            sla.conf
adtranvofr.conf          cdr_adaptive_odbc.conf   cli_aliases.conf         extconfig.conf           gtalk.conf               manager.conf             osp.conf                 res_pgsql.conf           smdi.conf
agents.conf              cdr_custom.conf          cli_permissions.conf     extensions.ael           h323.conf                manager.d/               oss.conf                 res_snmp.conf            telcordia-1.adsi
ais.conf                 cdr_manager.conf         codecs.conf              extensions.conf          http.conf                meetme.conf              phone.conf               rpt.conf                 udptl.conf
alarmreceiver.conf       cdr_odbc.conf            console.conf             extensions.lua           iax.conf                 mgcp.conf                phoneprov.conf           rtp.conf                 unistim.conf
alsa.conf                cdr_pgsql.conf           dbsep.conf               extensions_minivm.conf   iaxprov.conf             minivm.conf              queuerules.conf          say.conf                 usbradio.conf
amd.conf                 cdr_sqlite3_custom.conf  dnsmgr.conf              features.conf            indications.conf         misdn.conf               queues.conf              sip.conf                 users.conf
asterisk.adsi            cdr_tds.conf             dsp.conf                 festival.conf            jabber.conf              modules.conf             res_config_sqlite.conf   sip_notify.conf          voicemail.conf
asterisk.conf            chan_dahdi.conf          dundi.conf               followme.conf            jingle.conf              musiconhold.conf         res_ldap.conf            skinny.conf              vpb.conf
15:35:05
#cat /etc/asterisk/asterisk.conf
[directories](!) ; remove the (!) to enable this
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /usr/share/asterisk
astagidir => /usr/share/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
...
; Changing the following lines may compromise your security.
;[files]
;astctlpermissions = 0660
;astctlowner = root
;astctlgroup = apache
;astctl = asterisk.ctl
[compat]
pbx_realtime=1.6
res_agi=1.6
app_set=1.6
прошла 31 минута
16:06:13
#vim /etc/asterisk/sip.conf
16:11:49
#;[
^C
16:12:54
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3270.8189.15092	2011-10-17 17:13:01.000000000 +0300
+++ /etc/asterisk/sip.conf	2011-10-17 17:21:22.000000000 +0300
@@ -1 +1,19 @@
+[general]
+context=default
+allowoverlap=no
+udpbindaddr=0.0.0.0
+tcpenable=no
+tcpbindaddr=0.0.0.0
+srvlookup=yes
 
+[2401]
+type=friend     ;frend, user, peer
+secret=1234
+host=dynamic
+
+
+[2402]
+type=friend
+secret=1234
+host=dynamic
+ 
16:21:22
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
Verbosity is at least 2
linux8*CLI>
linux8*CLI>
linux8*CLI>
linux8*CLI> exit
Executing last minute cleanups
прошло 14 минут
16:35:47
#/etc/init.d/isc-dhcp-server start
Starting ISC DHCP server: dhcpd.
16:36:11
#vim /etc/dhcp/dhcpd.conf
16:45:14
#ping www.ukr.net
PING www.ukr.net (195.214.195.105) 56(84) bytes of data.
64 bytes from 195.214.195.105: icmp_req=1 ttl=58 time=0.924 ms
64 bytes from 195.214.195.105: icmp_req=2 ttl=58 time=0.912 ms
^C64 bytes from 195.214.195.105: icmp_req=3 ttl=58 time=1.05 ms
--- www.ukr.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 10050ms
rtt min/avg/max/mdev = 0.912/0.963/1.054/0.069 ms
16:45:33
#si
simple-scan  sirtopnm     size
16:45:33
#asterisk -rvvvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
Verbosity was 2 and is now 4
linux8*CLI>
linux8*CLI>
linux8*CLI> sip asho
No such command 'sip asho' (type 'core show help sip asho' for other possible commands)
[Oct 17 18:09:55] NOTICE[6274]: chan_sip.c:21763 handle_request_register: Registration from 'sip:2401@192.168.80.1' failed for '192.168.80.201' - No matching peer found
linux8*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
linux8*CLI> quit
Executing last minute cleanups
/dev/pts/3
16:49:42
#vim /etc/asterisk/extensions.conf
16:49:49
#; With 50 extensions, the speedup is 1.32x

16:49:52
#vim /etc/asterisk/extensions.conf
--- /dev/null	2011-10-17 10:49:24.960871851 +0300
+++ /etc/asterisk/extensions.conf	2011-10-17 17:51:01.000000000 +0300
@@ -0,0 +1,4 @@
+[default]
+
+exten => 2499,1,Playback(hello-world)
+
16:55:12
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7776.23066.27166	2011-10-17 17:55:19.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-17 18:12:19.000000000 +0300
@@ -1,4 +1,5 @@
 [default]
 
 exten => 2499,1,Playback(hello-world)
+exten => _240X,1,Dial(SIP/${EXTEN})
 
прошло 15 минут
/dev/tty2
17:10:12
#vim /etc/asterisk/sip.conf
17:10:22
#[2401]
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
...
    -- merging incls/swits/igpats from old(ael-dundi-e164-canonical) to new(ael-dundi-e164-canonical) context, registrar = pbx_config
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000596 sec
    -- Time to restore hints and swap in new dialplan: 0.000000 sec
    -- Time to delete the old dialplan: 0.000033 sec
    -- Total time merge_contexts_delete: 0.000629 sec
linux8*CLI>
  == Using SIP RTP CoS mark 5
[Oct 17 18:11:47] NOTICE[6274]: chan_sip.c:20276 handle_request_invite: Call from '2401' to extension '2402' rejected because extension not found in context 'default'.
linux8*CLI> quit
Executing last minute cleanups
17:11:55
#vim /etc/asterisk/extensions.conf
17:12:04
#asterisk -rvvvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
...
  == Using SIP RTP CoS mark 5
    -- Executing [2402@default:1] Dial("SIP/2401-0000000e", "SIP/2402") in new stack
  == Using SIP RTP CoS mark 5
    -- Called 2402
    -- SIP/2402-0000000f is ringing
    -- SIP/2402-0000000f answered SIP/2401-0000000e
    -- Native bridging SIP/2401-0000000e and SIP/2402-0000000f
  == Spawn extension (default, 2402, 1) exited non-zero on 'SIP/2401-0000000e'
linux8*CLI> quit
Executing last minute cleanups
прошло 19 минут
17:31:12
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
Verbosity is at least 4
linux8*CLI> exit
Executing last minute cleanups
17:31:25
#vim /etc/asterisk/extensions.conf
17:31:37
#~
[general]
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
srvlookup=yes
[2401]
type=friend     ;frend, user, peer
secret=1234
host=dynamic
[2402]
type=friend
secret=1234
host=dynamic
"/etc/asterisk/sip.conf" 19L, 225C
17:32:02
#~
[directories](!) ; remove the (!) to enable this
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /usr/share/asterisk
astagidir => /usr/share/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
...
; Changing the following lines may compromise your security.
;[files]
;astctlpermissions = 0660
;astctlowner = root
;astctlgroup = apache
;astctl = asterisk.ctl
[compat]
pbx_realtime=1.6
res_agi=1.6
app_set=1.6
17:33:46
#asterisk
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.

Вторник (10/18/11)

08:39:35
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
...
  Useragent    : X-Lite 4 release 4.1 stamp 63214
  Reg. Contact : sip:2402@192.168.80.205:5618;rinstance=d8f217608b7fa924
  Qualify Freq : 60000 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  Parkinglot   :
linux8*CLI> exit
Executing last minute cleanups
прошло 20 минут
09:00:05
#asterisk -rvvvvvvvvvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
...
  Qualify:                0
  Use ClientCode:         No
  Progress inband:        Never
  Language:
  MOH Interpret:          default
  MOH Suggest:
  Voice Mail Extension:   asterisk
----
linux8*CLI> quit
Executing last minute cleanups
09:09:20
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.14905.11242	2011-10-18 10:13:05.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-18 10:14:38.000000000 +0300
@@ -3,3 +3,5 @@
 exten => 2499,1,Playback(hello-world)
 exten => _240X,1,Dial(SIP/${EXTEN})
 
+exten => 2498,1,Playback(demo-tranks)
+
/dev/tty1
09:11:51
#ssh user@192.168.15.252
~
~
~
~
~
~
~
~
~
~
...
~
~
~
~
~
~
~
"/etc/asterisk/extensions.conf" 11L, 250C записано
[root@linux9:~]# asterisk -rx '
---------------------------------------------------------------------------------------------------------------------------------------------------------------
/dev/tty2
09:14:38
#asterisk -rx
asterisk: option requires an argument -- 'x'
09:14:59
#asterisk -rx 'dialplan reload'
Dialplan reloaded.
09:15:25
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.20157.24416	2011-10-18 10:16:58.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-18 10:17:31.000000000 +0300
@@ -3,5 +3,5 @@
 exten => 2499,1,Playback(hello-world)
 exten => _240X,1,Dial(SIP/${EXTEN})
 
-exten => 2498,1,Playback(demo-tranks)
+exten => 2498,1,Playback(recorded-voice)
 
09:17:31
#asterisk -rx 'dialplan reload'
Dialplan reloaded.
09:17:33
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.21521.12195	2011-10-18 10:18:57.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-18 10:21:39.000000000 +0300
@@ -3,5 +3,7 @@
 exten => 2499,1,Playback(hello-world)
 exten => _240X,1,Dial(SIP/${EXTEN})
 
-exten => 2498,1,Playback(recorded-voice)
+exten => 2498,1,Record(/var/lib/asterisk/sounds/recorded-voice:gsm,2)
+exten => 2498,n,Playback(/var/lib/asterisk/sounds/recorded-voice)
+
 
09:21:39
#asterisk -rx 'dialplan reload'
Dialplan reloaded.
/dev/tty3
09:21:55
#asterisk -rvvvvvvf
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
...
    -- Recording the message
    -- x=0, open writing:  /var/spool/asterisk/voicemail/default/2401/tmp/a7oDwh format: wav49, 0x8ac9738
    -- x=1, open writing:  /var/spool/asterisk/voicemail/default/2401/tmp/a7oDwh format: gsm, 0x8ac9870
    -- x=2, open writing:  /var/spool/asterisk/voicemail/default/2401/tmp/a7oDwh format: wav, 0x896c8a8
    -- User ended message by pressing #
    -- <SIP/2402-0000022d> Playing 'auth-thankyou.gsm' (language 'ru')
  == Parsing '/var/spool/asterisk/voicemail/default/2401/INBOX/msg0000.txt':   == Found
    -- Auto fallthrough, channel 'SIP/2402-0000022d' status is 'NOANSWER'
linux8*CLI> quit
Executing last minute cleanups
прошло 67 минут
/dev/tty2
10:29:16
#vim /etc/asterisk/asterisk.conf \
10:30:14
#~
[           ]
[options]
;verbose = 3
;debug = 3
;alwaysfork = yes ; same as -F at startup
;nofork = yes ; same as -f at startup
;quiet = yes ; same as -q at startup
[       ]
[timestamp = yes ; same as -T at startup
;execincludes = yes ; support #exec in config files
...
;transmit_silence = yes ; Transmit silence while a channel is in a waiting state, a recording only state, or when DTMF is
;astctlgroup = apache
;astctl = asterisk.ctl
[compat]
pbx_realtime=1.6
~
~
~
~
~                                                                                                                                                                                                                             57,0-1        All
10:31:00
#[compat] ]
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
register => spb:1234@192.168.90.1/kln
[2401]ble=no
[2401]
tcpbindaddr=0.0.0.0
srvlookup=yes
[2402]
[2402]
...
~
~
~
~
~
~
~
~
~
"/etc/asterisk/sip.conf" 33L, 364C written
10:39:50
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
...
peers  peer
linux8*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
2401/2401                  192.168.80.201   D          5060     Unmonitored
2402/2402                  192.168.80.205   D          5618     Unmonitored
kln/kln                    (Unspecified)    D          5060     Unmonitored
3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline]
linux8*CLI>
linux8*CLI> exit
Executing last minute cleanups
10:41:45
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3270.11414.27251	2011-10-18 11:41:48.000000000 +0300
+++ /etc/asterisk/sip.conf	2011-10-18 11:44:41.000000000 +0300
@@ -7,7 +7,7 @@
 srvlookup=yes
 
 register => spb:1234@192.168.90.1/kln
-
+register => spb:1234@192.168.70.1/msk
 
 
 [2401]
@@ -28,6 +28,11 @@
 secret=1234
 host=dynamic
 username=kln
-register => kln:1234@192.168.80.1/spb
 
- 
+
+
+[msk]
+type=friend
+secret=1234
+host=192.168.70.1
+username=msk
10:44:41
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
...
  == Parsing '/etc/asterisk/sip_notify.conf':   == Found
linux8*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
2401/2401                  192.168.80.201   D          5060     Unmonitored
2402/2402                  192.168.80.205   D          5618     Unmonitored
kln/kln                    (Unspecified)    D          5060     Unmonitored
msk/msk                    192.168.70.1                5060     Unmonitored
4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 4 online, 0 offline]
linux8*CLI> exit
Executing last minute cleanups
10:45:51
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3270.24835.6205	2011-10-18 11:45:53.000000000 +0300
+++ /etc/asterisk/sip.conf	2011-10-18 11:49:29.000000000 +0300
@@ -34,5 +34,5 @@
 [msk]
 type=friend
 secret=1234
-host=192.168.70.1
+host=dynamic
 username=msk
10:49:29
#vim /etc/asterisk/sip.conf
10:52:54
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.31788.15711	2011-10-18 11:53:46.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-18 11:55:49.000000000 +0300
@@ -6,4 +6,5 @@
 exten => 2498,1,Record(/var/lib/asterisk/sounds/recorded-voice:gsm,2)
 exten => 2498,n,Playback(/var/lib/asterisk/sounds/recorded-voice)
 
+exten => _23XX,1,Dial(SIP/msk/${EXTEN})
 
10:55:49
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, 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+squeeze3 currently running on linux8 (pid = 6260)
...
  == Using SIP RTP CoS mark 5
    -- Executing [2301@default:1] Dial("SIP/2401-00000022", "SIP/msk/2301") in new stack
  == Using SIP RTP CoS mark 5
    -- Called msk/2301
[Oct 18 11:58:07] WARNING[6274]: chan_sip.c:17987 handle_response_invite: Received response: "Forbidden" from '"2401" <sip:2401@192.168.80.1>;tag=as1711fbc5'
    -- SIP/msk-00000023 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/2401-00000022' status is 'CONGESTION'
linux8*CLI> exit
Executing last minute cleanups
10:58:37
#vim /etc/asterisk/sip.conf

Файлы

  • /etc/asterisk/
  • /etc/asterisk/asterisk.conf
  • /etc/def
  • /etc/default/asterisk
  • /etc/network/interfaces
  • /etc/r
  • /etc/asterisk/
    >
    adsi.conf                cdr.conf                 cli.conf                 enum.conf                func_odbc.conf           logger.conf              muted.conf               res_odbc.conf            sla.conf
    adtranvofr.conf          cdr_adaptive_odbc.conf   cli_aliases.conf         extconfig.conf           gtalk.conf               manager.conf             osp.conf                 res_pgsql.conf           smdi.conf
    agents.conf              cdr_custom.conf          cli_permissions.conf     extensions.ael           h323.conf                manager.d/               oss.conf                 res_snmp.conf            telcordia-1.adsi
    ais.conf                 cdr_manager.conf         codecs.conf              extensions.conf          http.conf                meetme.conf              phone.conf               rpt.conf                 udptl.conf
    alarmreceiver.conf       cdr_odbc.conf            console.conf             extensions.lua           iax.conf                 mgcp.conf                phoneprov.conf           rtp.conf                 unistim.conf
    alsa.conf                cdr_pgsql.conf           dbsep.conf               extensions_minivm.conf   iaxprov.conf             minivm.conf              queuerules.conf          say.conf                 usbradio.conf
    amd.conf                 cdr_sqlite3_custom.conf  dnsmgr.conf              features.conf            indications.conf         misdn.conf               queues.conf              sip.conf                 users.conf
    asterisk.adsi            cdr_tds.conf             dsp.conf                 festival.conf            jabber.conf              modules.conf             res_config_sqlite.conf   sip_notify.conf          voicemail.conf
    asterisk.conf            chan_dahdi.conf          dundi.conf               followme.conf            jingle.conf              musiconhold.conf         res_ldap.conf            skinny.conf              vpb.conf
    
    /etc/asterisk/asterisk.conf
    >
    [directories](!) ; remove the (!) to enable this
    astetcdir => /etc/asterisk
    astmoddir => /usr/lib/asterisk/modules
    astvarlibdir => /var/lib/asterisk
    astdbdir => /var/lib/asterisk
    astkeydir => /var/lib/asterisk
    astdatadir => /usr/share/asterisk
    astagidir => /usr/share/asterisk/agi-bin
    astspooldir => /var/spool/asterisk
    astrundir => /var/run/asterisk
    astlogdir => /var/log/asterisk
    [options]
    ;verbose = 3
    ;debug = 3
    ;alwaysfork = yes ; same as -F at startup
    ;nofork = yes ; same as -f at startup
    ;quiet = yes ; same as -q at startup
    ;timestamp = yes ; same as -T at startup
    ;execincludes = yes ; support #exec in config files
    ;console = yes ; Run as console (same as -c at startup)
    ;highpriority = yes ; Run realtime priority (same as -p at startup)
    ;initcrypto = yes ; Initialize crypto keys (same as -i at startup)
    ;nocolor = yes ; Disable console colors
    ;dontwarn = yes ; Disable some warnings
    ;dumpcore = yes ; Dump core on crash (same as -g at startup)
    ;languageprefix = yes ; Use the new sound prefix path syntax
    ;internal_timing = yes
    ;systemname = my_system_name ; prefix uniqueid with a system name for global uniqueness issues
    ;autosystemname = yes ; automatically set systemname to hostname - uses 'localhost' on failure, or systemname if set
    ;maxcalls = 10 ; Maximum amount of calls allowed
    ;maxload = 0.9 ; Asterisk stops accepting new calls if the load average exceed this limit
    ;maxfiles = 1000 ; Maximum amount of openfiles
    ;minmemfree = 1 ; in MBs, Asterisk stops accepting new calls if the amount of free memory falls below this watermark
    ;cache_record_files = yes ; Cache recorded sound files to another directory during recording
    ;record_cache_dir = /tmp ; Specify cache directory (used in conjunction with cache_record_files)
    ;transmit_silence_during_record = yes ; Transmit SLINEAR silence while a channel is being recorded
    ;transmit_silence = yes ; Transmit silence while a channel is in a waiting state, a recording only state, or when DTMF is
                            ; being generated.  Note that the silence internally is generated in raw signed linear format.
                            ; This means that it must be transcoded into the native format of the channel before it can be sent
                            ; to the device.  It is for this reason that this is optional, as it may result in requiring a
                            ; temporary codec translation path for a channel that may not otherwise require one.
    ;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of directly
    ;sendfullybooted = yes  ; Send the FullyBooted AMI event on AMI login and when all modules are finished loading
    ;runuser = asterisk ; The user to run as
    ;rungroup = asterisk ; The group to run as
    ;lightbackground = yes ; If your terminal is set for a light-colored background
    documentation_language = en_US ; Set the Language you want Documentation displayed in. Value is in the same format as locale names
    ;hideconnect = yes ; Hide messages displayed when a remote console connects and disconnects
    ; Changing the following lines may compromise your security.
    ;[files]
    ;astctlpermissions = 0660
    ;astctlowner = root
    ;astctlgroup = apache
    ;astctl = asterisk.ctl
    [compat]
    pbx_realtime=1.6
    res_agi=1.6
    app_set=1.6
    
    /etc/def
    >
    default/ defoma/
    
    /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/network/interfaces
    >
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    # The loopback network interface
    auto lo
    iface lo inet loopback
    # The primary network interface
    allow-hotplug eth0
    iface eth0 inet static
            address 192.168.80.1
            netmask 255.255.255.0
            network 192.168.80.0
            broadcast 192.168.80.255
            gateway 192.168.80.254
            # dns-* options are implemented by the resolvconf package, if installed
            dns-nameservers 10.0.35.1
            dns-search unix.nt
    
    /etc/r
    >
    radiusclient-ng/ rc0.d/           rc2.d/           rc4.d/           rc6.d/           reportbug.conf   resolvconf/      rpc              rsyslog.d/
    rc.local         rc1.d/           rc3.d/           rc5.d/           rcS.d/           resolv.conf      rmt              rsyslog.conf
    

    Статистика

    Время первой команды журнала11:50:30 2011-10-17
    Время последней команды журнала10:58:37 2011-10-18
    Количество командных строк в журнале100
    Процент команд с ненулевым кодом завершения, %22.00
    Процент синтаксически неверно набранных команд, % 0.00
    Суммарное время работы с терминалом *, час 4.59
    Количество командных строк в единицу времени, команда/мин 0.36
    Частота использования команд
    vim21|====================| 20.59%
    asterisk16|===============| 15.69%
    ping8|=======| 7.84%
    cat7|======| 6.86%
    less6|=====| 5.88%
    route4|===| 3.92%
    tail4|===| 3.92%
    /etc/init.d/isc-dhcp-server4|===| 3.92%
    apt-get3|==| 2.94%
    ~3|==| 2.94%
    ifdown2|=| 1.96%
    #if2|=| 1.96%
    ssh2|=| 1.96%
    ifconfig1|| 0.98%
    dpkg1|| 0.98%
    With1|| 0.98%
    /etc/init.d/asterisk1|| 0.98%
    #1|| 0.98%
    pkill1|| 0.98%
    [1|| 0.98%
    w1|| 0.98%
    ps1|| 0.98%
    ifup1|| 0.98%
    [compat]1|| 0.98%
    LANG=ru_UA.UTF-81|| 0.98%
    si1|| 0.98%
    grep1|| 0.98%
    if1|| 0.98%
    LANG=RU1|| 0.98%
    exit1|| 0.98%
    apt-cache1|| 0.98%
    date1|| 0.98%
    [2401]1|| 0.98%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ find / -name abc
      find: /home/devi-orig/.gnome2: Keine Berechtigung
      find: /home/devi-orig/.gnome2_private: Keine Berechtigung
      find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung
      find: /home/devi-orig/.metacity: Keine Berechtigung
      find: /home/devi-orig/.inkscape: Keine Berechtigung
      ^C
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$