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

Содержание

Журнал

Понедельник (11/24/14)

/dev/pts/1
09:06:04
#sc reen
bash: sc: command not found
/dev/pts/2
09:06:04
#sc reen
bash: sc: command not found
09:08:55
#screen
/dev/pts/1
09:08:55
#screen
/dev/pts/4
09:09:39
## :)

/dev/pts/6
09:13:19
#screen -x
09:16:33
#screen -x
09:16:36
#screen -x
/dev/pts/8
09:17:05
#шifconfig
eth0      Link encap:Ethernet  HWaddr 6c:3b:e5:39:36:5c
          inet addr:192.168.12.3  Bcast:192.168.12.255  Mask:255.255.255.0
          inet6 addr: fe80::6e3b:e5ff:fe39:365c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16866 errors:0 dropped:4 overruns:0 frame:0
          TX packets:7459 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:12542442 (11.9 MiB)  TX bytes:755212 (737.5 KiB)
          Interrupt:18
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:138 errors:0 dropped:0 overruns:0 frame:0
          TX packets:138 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8328 (8.1 KiB)  TX bytes:8328 (8.1 KiB)
прошло >2 часов
11:24:17
#screen
11:25:04
## vse ok

11:26:47
#alias exit='echo no exit'

11:27:04
#ssh manager@192.168.15.253
^C
11:29:01
#ping 192.168.12.253
PING 192.168.12.253 (192.168.12.253) 56(84) bytes of data.
64 bytes from 192.168.12.253: icmp_req=1 ttl=64 time=1.45 ms
64 bytes from 192.168.12.253: icmp_req=2 ttl=64 time=0.630 ms
64 bytes from 192.168.12.253: icmp_req=3 ttl=64 time=0.695 ms
64 bytes from 192.168.12.253: icmp_req=4 ttl=64 time=0.704 ms
64 bytes from 192.168.12.253: icmp_req=5 ttl=64 time=0.699 ms
64 bytes from 192.168.12.253: icmp_req=6 ttl=64 time=0.932 ms
64 bytes from 192.168.12.253: icmp_req=7 ttl=64 time=0.771 ms
64 bytes from 192.168.12.253: icmp_req=8 ttl=64 time=0.702 ms
64 bytes from 192.168.12.253: icmp_req=9 ttl=64 time=0.707 ms
...
64 bytes from 192.168.12.253: icmp_req=165 ttl=64 time=0.698 ms
64 bytes from 192.168.12.253: icmp_req=166 ttl=64 time=0.699 ms
64 bytes from 192.168.12.253: icmp_req=167 ttl=64 time=0.694 ms
64 bytes from 192.168.12.253: icmp_req=168 ttl=64 time=0.707 ms
64 bytes from 192.168.12.253: icmp_req=169 ttl=64 time=0.638 ms
64 bytes from 192.168.12.253: icmp_req=170 ttl=64 time=0.714 ms
^C
--- 192.168.12.253 ping statistics ---
170 packets transmitted, 170 received, 0% packet loss, time 168999ms
rtt min/avg/max/mdev = 0.613/1.339/42.623/4.051 ms
11:32:00
#sed -i s/192.168.12.1/192.168.10.1/ /etc/network/
sed: couldn't edit /etc/network/: not a regular file
прошло 86 минут
12:58:14
#sed -i s/192.168.12.1/192.168.10.1/ /etc/network/interfaces |
> ^C
13:03:16
#ifdown eth0
RTNETLINK answers: No such process
прошло 24 минуты
13:27:40
#ifup eth0

13:28:17
#ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 6c:3b:e5:39:36:5c
          inet addr:192.168.30.1  Bcast:192.168.30.255  Mask:255.255.255.0
          inet6 addr: fe80::6e3b:e5ff:fe39:365c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:107 errors:0 dropped:4 overruns:0 frame:0
          TX packets:137 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15765 (15.3 KiB)  TX bytes:15397 (15.0 KiB)
          Interrupt:18
13:29:50
#vim /etc/network/interfaces
прошло 15 минут
/dev/pts/6
13:45:06
#screen -x
/dev/pts/8
13:46:10
## install два l

13:46:21
## iapt-get install isc-dhcp-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libgadu3
Use 'apt-get autoremove' to remove it.
Suggested packages:
  isc-dhcp-server-ldap
The following NEW packages will be installed:
  isc-dhcp-server
...
Preconfiguring packages ...
Selecting previously unselected package isc-dhcp-server.
(Reading database ... 128676 files and directories currently installed.)
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.2.2.dfsg.1-5+deb70u6_amd64.deb) ...
Processing triggers for man-db ...
Setting up isc-dhcp-server (4.2.2.dfsg.1-5+deb70u6) ...
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.
13:46:47
#sed -i s/eth1/eth0/ /etc/default/isc-dhcp-server

13:51:14
#vi .
13:51:14
#vi .
13:51:14
#vi .
13:51:14
#vi .
13:51:14
#vi .
13:51:14
#vi .
13:51:14
#vi .
13:51:14
#vi .
13:51:14
#vi ./etc/default/isc-dhcp-server
13:52:35
#vim /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-4181.21943.6800	2014-11-24 14:57:06.296903453 +0200
+++ /etc/dhcp/dhcpd.conf	2014-11-24 15:06:13.116917656 +0200
@@ -1,107 +1,25 @@
-#
-# Sample configuration file for ISC dhcpd for Debian
-#
-#
-
-# The ddns-updates-style parameter controls whether or not the server will
-# attempt to do a DNS update when a lease is confirmed. We default to the
-# behavior of the version 2 packages ('none', since DHCP v2 didn't
-# have support for DDNS.)
+# вы можете комменты не удалять
+# это просто для вас
+
 ddns-update-style none;
 
-# option definitions common to all supported networks...
-option domain-name "example.org";
-option domain-name-servers ns1.example.org, ns2.example.org;
+# доменное имя unix.nt
+option domain-name "unix.nt";
+
+# IP-адрес DNS-сервера
+option domain-name-servers 192.168.30.254;
 
 default-lease-time 600;
 max-lease-time 7200;
-
-# If this DHCP server is the official DHCP server for the local
-# network, the authoritative directive should be uncommented.
-#authoritative;
-
-# Use this to send dhcp log messages to a different log file (you also
-# have to hack syslog.conf to complete the redirection).
 log-facility local7;
 
-# No service will be given on this subnet, but declaring it helps the 
-# DHCP server to understand the network topology.
 
-#subnet 10.152.187.0 netmask 255.255.255.0 {
-#}
+# надо раскомментировать subnet и прописать там свою сеть
+subnet 192.168.30.0 netmask 255.255.255.0 {
+  range 192.168.30.100 192.168.30.200;
+  option routers 192.168.30.254;
+}
+
+# это весь файл
 
-# This is a very basic subnet declaration.
 
-#subnet 10.254.239.0 netmask 255.255.255.224 {
-#  range 10.254.239.10 10.254.239.20;
-#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
-#}
-
-# This declaration allows BOOTP clients to get dynamic addresses,
-# which we don't really recommend.
-
-#subnet 10.254.239.32 netmask 255.255.255.224 {
-#  range dynamic-bootp 10.254.239.40 10.254.239.60;
-#  option broadcast-address 10.254.239.31;
-#  option routers rtr-239-32-1.example.org;
-#}
-
-# A slightly different configuration for an internal subnet.
-#subnet 10.5.5.0 netmask 255.255.255.224 {
-#  range 10.5.5.26 10.5.5.30;
-#  option domain-name-servers ns1.internal.example.org;
-#  option domain-name "internal.example.org";
-#  option routers 10.5.5.1;
-#  option broadcast-address 10.5.5.31;
-#  default-lease-time 600;
-#  max-lease-time 7200;
-#}
-
-# Hosts which require special configuration options can be listed in
-# host statements.   If no address is specified, the address will be
-# allocated dynamically (if possible), but the host-specific information
-# will still come from the host declaration.
-
-#host passacaglia {
-#  hardware ethernet 0:0:c0:5d:bd:95;
-#  filename "vmunix.passacaglia";
-#  server-name "toccata.fugue.com";
-#}
-
-# Fixed IP addresses can also be specified for hosts.   These addresses
-# should not also be listed as being available for dynamic assignment.
-# Hosts for which fixed IP addresses have been specified can boot using
-# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
-# be booted with DHCP, unless there is an address range on the subnet
-# to which a BOOTP client is connected which has the dynamic-bootp flag
-# set.
-#host fantasia {
-#  hardware ethernet 08:00:07:26:c0:a5;
-#  fixed-address fantasia.fugue.com;
-#}
-
-# You can declare a class of clients and then do address allocation
-# based on that.   The example below shows a case where all clients
-# in a certain class get addresses on the 10.17.224/24 subnet, and all
-# other clients get addresses on the 10.0.29/24 subnet.
-
-#class "foo" {
-#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
-#}
-
-#shared-network 224-29 {
-#  subnet 10.17.224.0 netmask 255.255.255.0 {
-#    option routers rtr-224.example.org;
-#  }
-#  subnet 10.0.29.0 netmask 255.255.255.0 {
-#    option routers rtr-29.example.org;
-#  }
-#  pool {
-#    allow members of "foo";
-#    range 10.17.224.10 10.17.224.250;
-#  }
-#  pool {
-#    deny members of "foo";
-#    range 10.0.29.10 10.0.29.230;
-#  }
-#}
прошло 18 минут
14:11:00
#oll 'ps aux |gripd
> ^C
14:13:52
#oll 'ps aux'
bash: oll: command not found
прошло 16 минут
14:30:41
#cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.2.2
server-duid "\000\001\000\001\034\005\352\342l;\34596\\";
lease 192.168.30.100 {
  starts 1 2014/11/24 13:11:05;
  ends 1 2014/11/24 13:21:05;
  cltt 1 2014/11/24 13:11:05;
  binding state active;
  next binding state free;
  rewind binding state free;
...
lease 192.168.30.101 {
  starts 1 2014/11/24 13:28:11;
  ends 1 2014/11/24 13:38:11;
  cltt 1 2014/11/24 13:28:11;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 00:1d:72:1d:f4:ab;
  uid "\001\000\035r\035\364\253";
}
14:30:44
#установка
bash: $'\321\203\321\201\321\202\320\260\320\275\320\276\320\262\320\272\320\260': command not found
прошло 25 минут
14:55:50
#apt-cache search asterisk | wc -l
67
15:03:16
#apt-get asterisk install
E: Invalid operation asterisk
15:03:33
#apt-get install asterisk
 ┌───────────────────────────────┤ 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:                                                                │
 │                                                                                      │
 │ 61__________________________________________________________________________________ │
 │                                                                                      │
 │                                        <Ok>                                          │
...
Setting up libmail-sendmail-perl (0.79.16-1) ...
Setting up libsox2 (14.4.0-3) ...
Setting up libsox-fmt-alsa (14.4.0-3) ...
Setting up libsox-fmt-base (14.4.0-3) ...
Setting up module-assistant (0.11.4) ...
Setting up rsync (3.0.9-4) ...
update-rc.d: using dependency based boot sequencing
Setting up sox (14.4.0-3) ...
Setting up vpb-driver-source (4.2.55-1) ...
Setting up asterisk-moh-opsound-gsm (2.03-1) ...
15:05:52
#dpkg-reconfigure asterisk
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:06:28
#dpkg-reconfigure asterisk
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:08:01
#dpkg-reconfigure asterisk-config

прошло 30 минут
15:38:14
#/etc/init.d/asterisk restsrt
Usage: /etc/init.d/asterisk {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload}
15:38:24
#/etc/init.d/asterisk restsrt
Usage: /etc/init.d/asterisk {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload}
15:39:40
#/etc/init.d/asterisk restasrt
Usage: /etc/init.d/asterisk {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload}
15:40:21
#/etc/init.d/ asterisk restasrt
bash: /etc/init.d/: Is a directory
15:40:59
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:41:35
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 11421)
debian3*CLI>
!            ael          agent        agi          aoc          calendar     cc
...
data         database     devstate     dialplan     dnsmgr       dundi        event
fax          features     file         group        gtalk        hangup       help
http         iax2         indication   jabber       jingle       keys         local
logger       manager      minivm       mixmonitor   module       moh          no
odbc         originate    parkedcalls  phoneprov    pri          queue        realtime
reload       rtcp         rtp          say          sip          skinny       sqlite
stun         timing       udptl        ulimit       unistim      voicemail
debian3*CLI> sip show pe
No such command 'sip show pe' (type 'core show help sip show pe' for other possible commands)
debian3*CLI> quit
15:48:06
#mv /etc/asterisk/extensions.conf{,.bak}

15:49:37
#mv /etc/asterisk/sip.conf{,.bak}

15:50:17
#vim /etc/asterisk/sip.conf.bak
прошло 18 минут
16:08:36
#vim /etc/asterisk/sip.conf
--- /dev/null	2014-11-24 09:43:31.066459590 +0200
+++ /etc/asterisk/sip.conf	2014-11-24 17:13:27.013078179 +0200
@@ -0,0 +1,15 @@
+[genetal]
+context=default
+
+[1301]
+type=friend
+secret=1234
+host=dynamic
+
+
+
+[1302]
+type=friend
+secret=1234
+host=dynamic
+
16:14:49
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
прошла 21 минута
16:35:57
#vim /etc/asterisk/sip.conf.bak
16:37:32
#xset s off

прошло 22 минуты
16:59:37
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 11683)
debian3*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
1301/1301                  192.168.30.100                           D   N             5060     Unmonitored
1302/1302                  192.168.30.101                           D   N             33728    Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
[Nov 24 18:01:42] NOTICE[11708]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1302
[Nov 24 18:04:43] NOTICE[11708]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1302
debian3*CLI>
Disconnected from Asterisk server
прошло 11 минут
17:11:27
#ls -la /etc/asterisk/ext
extconfig.conf          extensions.conf.bak     extensions_minivm.conf
extensions.ael          extensions.lua
17:11:27
#ls -la /etc/asterisk/ext
extconfig.conf          extensions.conf.bak     extensions_minivm.conf
extensions.ael          extensions.lua
17:11:27
#ls -la /etc/asterisk/extensions.conf.bak
-rw-r----- 1 asterisk asterisk 30823 Jan  4  2014 /etc/asterisk/extensions.conf.bak
17:16:35
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4181.15335.29691	2014-11-24 18:16:46.885158073 +0200
+++ /etc/asterisk/extensions.conf	2014-11-24 18:17:51.757159438 +0200
@@ -1 +1,4 @@
+[default]
+
+
 exten => _13XX,1,Dial(SIP/${EXTEN})
17:17:51
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 11683)
debian3*CLI> dialplan re
reload  remove
debian3*CLI> dialplan reload
Dialplan reloaded.
[Nov 24 18:19:22] WARNING[11708]: chan_sip.c:20457 handle_response_invite: just did sched_add waitid(37) for sip_reinvite_retry for dialog Nzc3Y2Y2OTc2MzZkNzkyOWYzNDdjYzg3ZmU3ZWNhMTY. in handle_response_invite
[Nov 24 18:19:29] NOTICE[11708]: chan_sip.c:23107 handle_request_invite: Unable to create/find SIP channel for this INVITE
[Nov 24 18:19:44] NOTICE[11708]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1302
debian3*CLI>
Disconnected from Asterisk server
17:19:56
#ршыÐhistory
    1  vim /etc/resolv.conf
    2  vi /etc/resolv.conf
    3  exit
    4  vim /etc/apt/sources.list
    5  vi /etc/apt/sources.list
    6  exit
    7  vim /etc/network/interfaces
    8  nano /etc/network/interfaces
    9  vim /etc/resolv.conf
   10  nano /etc/resolv.conf
...
  104  vim /etc/asteriks/extansions.conf
  105  vim /etc/asteriks/extansions.conf
  106  ls -la /etc/asteriks/extansions.conf
  107  ls -la /etc/asterisk/extensions.conf.bak
  108  ls -l /etc/asterisk/extensions.conf
  109  touch /etc/asterisk/extensions.conf
  110  vim /etc/asterisk/extensions.conf
  111*
  112  asterisk -r
  113  history

Вторник (11/25/14)

/dev/pts/0
08:29:10
#screen
/dev/pts/3
08:37:03
#cat /ets/asterisk/sip.conf
cat: /ets/asterisk/sip.conf: No such file or directory
/dev/pts/5
08:46:01
#screen -x
/dev/pts/3
08:50:07
#cat /etc/asterisk/sip.conf
[genetal]
context=default
[1301]
type=friend
secret=1234
host=dynamic
[1302]
type=friend
secret=1234
host=dynamic
08:50:22
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 2704)
debian3*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
1301/1301                  192.168.30.100                           D   N             5060     Unmonitored
1302/1302                  192.168.30.101                           D   N             57178    Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
debian3*CLI> sip show peers
Disconnected from Asterisk server
08:52:25
#cat /etc/asterisk/sip.conf
[genetal]
context=default
[1301]
type=friend
secret=1234
host=dynamic
[1302]
type=friend
secret=1234
host=dynamic
08:52:41
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 2704)
Verbosity was 0 and is now 1
debian3*CLI> sip reload
 Reloading SIP
debian3*CLI> sip show peers
Disconnected from Asterisk server
Executing last minute cleanups
09:01:57
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 2704)
Verbosity is at least 1
debian3*CLI> sip shov peers
No such command 'sip shov peers' (type 'core show help sip shov peers' for other possible commands)
[Nov 25 10:13:20] NOTICE[2765]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1302
debian3*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
1301/1301                  192.168.30.100                           D   N             5060     Unmonitored
1302/1302                  192.168.30.101                           D   N             57178    Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
[Nov 25 10:16:20] NOTICE[2765]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1302
debian3*CLI>
Disconnected from Asterisk server
прошло 14 минут
09:16:46
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4114.28997.10042	2014-11-25 10:16:52.840552306 +0200
+++ /etc/asterisk/sip.conf	2014-11-25 10:27:45.180560031 +0200
@@ -1,8 +1,27 @@
 
 
-quntext=yes
+
 [genetal]
 context=default
+qualify=yes
+
+[phone](!)
+type=friend
+host=dynamic
+qualify=yes
+
+[softphone](!)
+
+;...
+qualify=no
+
+[smartphon](~.,softphone)
+qualify=yes
+
+[uplink](!)
+;...
+
+
 
 [1301]
 type=friend
прошло 10 минут
09:27:45
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4114.21958.17287	2014-11-25 10:29:11.692561054 +0200
+++ /etc/asterisk/sip.conf	2014-11-25 10:36:11.296566025 +0200
@@ -5,6 +5,12 @@
 context=default
 qualify=yes
 
+#include "/etc/asterisk/sip.conf.kiev"
+#include "/etc/asterisk/sip.conf.kharkov"
+#include "/etc/asterisk/sip.conf.odessa"
+
+
+
 [phone](!)
 type=friend
 host=dynamic
09:36:11
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4114.1604.4449	2014-11-25 10:36:15.308566068 +0200
+++ /etc/asterisk/sip.conf	2014-11-25 10:37:46.212567141 +0200
@@ -1,13 +1,9 @@
-
-
-
 [genetal]
 context=default
 qualify=yes
 
 #include "/etc/asterisk/sip.conf.kiev"
-#include "/etc/asterisk/sip.conf.kharkov"
-#include "/etc/asterisk/sip.conf.odessa"
+
 
 
 
@@ -16,16 +12,7 @@
 host=dynamic
 qualify=yes
 
-[softphone](!)
-
-;...
-qualify=no
-
-[smartphon](~.,softphone)
-qualify=yes
 
-[uplink](!)
-;...
 
 
 
09:37:46
#ls -l /etc/asterisk/extensions
ls: cannot access /etc/asterisk/extensions: No such file or directory
09:41:02
#ls -l /etc/asterisk/extensions.*
-rw-r----- 1 asterisk asterisk 12776 Jan  4  2014 /etc/asterisk/extensions.ael
-rw-r--r-- 1 root     root        48 Nov 24 18:17 /etc/asterisk/extensions.conf
-rw-r----- 1 asterisk asterisk 30823 Jan  4  2014 /etc/asterisk/extensions.conf.bak
-rw-r----- 1 asterisk asterisk  5253 Jan  4  2014 /etc/asterisk/extensions.lua
прошла 41 минута
10:22:13
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4114.14283.8210	2014-11-25 11:47:38.908616773 +0200
+++ /etc/asterisk/extensions.conf	2014-11-25 11:53:47.980621211 +0200
@@ -2,7 +2,14 @@
 
 
 exten => _13XX,1,Dial(SIP/${EXTEN})
- 
+exten => _13XX,n,No0p(to extension ${EXTEN})
+exten => _11XX,n,Dial(SIP/${EXTEN})
+
+exten => 8100,1,Record(/var/tmp/asterisk/record00:gsm)
+
+
+
+
 
 
 
прошла 31 минута
10:53:48
#mkdir /var/tmp/asterisk

10:54:49
#chowd asterisk: /var/tmp/asterisk
bash: chowd: command not found
10:55:37
#chown asterisk: /var/tmp/asterisk

/dev/pts/9
11:05:33
#screen
/dev/pts/0
11:05:33
#screen
/dev/pts/10
11:05:41
#vim /etc/asterisk/extensionc.conf
11:07:22
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5140.31881.15037	2014-11-25 12:07:47.280631069 +0200
+++ /etc/asterisk/extensions.conf	2014-11-25 12:27:43.440645237 +0200
@@ -9,7 +9,8 @@
 
 
 
-
+exten => _81XX,1,Record(/var/tmp/asterisk/record ${EXTEN:2}:gsm)
+exten => _82XX,1,Playback(/var/tmp/asterisk/record ${EXTEN:2})
 
 
 
прошло 20 минут
11:27:43
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 2704)
Verbosity is at least 1
debian3*CLI> dialplan re
reload  remove
debian3*CLI> dialplan reload
Dialplan reloaded.
[Nov 25 12:28:30] NOTICE[2765]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1302
[Nov 25 12:28:46] NOTICE[2765]: chan_sip.c:22753 handle_request_invite: Call from '1301' (192.168.30.100:5060) to extension '81100' rejected because extension not found in context 'default'.
debian3*CLI>
Disconnected from Asterisk server
11:29:39
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5140.2732.24062	2014-11-25 12:29:43.580646650 +0200
+++ /etc/asterisk/extensions.conf	2014-11-25 12:30:28.232647179 +0200
@@ -9,8 +9,8 @@
 
 
 
-exten => _81XX,1,Record(/var/tmp/asterisk/record ${EXTEN:2}:gsm)
-exten => _82XX,1,Playback(/var/tmp/asterisk/record ${EXTEN:2})
+exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm)
+exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2})
 
 
 
11:31:30
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/etc/asterisk/extconfig.conf':   == Found
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 2704)
...
    -- Registered extension context 'demo'; registrar: pbx_lua
    -- merging incls/swits/igpats from old(demo) to new(demo) context, registrar = pbx_config
    -- Including switch 'Lua/' in context 'demo'
    -- Time to scan old dialplan and merge leftovers back into the new: 0.001994 sec
    -- Time to restore hints and swap in new dialplan: 0.000006 sec
    -- Time to delete the old dialplan: 0.000064 sec
    -- Total time merge_contexts_delete: 0.002064 sec
debian3*CLI> dialplan reload
Disconnected from Asterisk server
Executing last minute cleanups
11:32:17
#ls -ls /var/tmp/asterisk/
total 8
8 -rw-rw---- 1 asterisk asterisk 4620 Nov 25 12:31 record00.gsm
прошло 30 минут
12:02:27
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 2704)
Verbosity is at least 3
debian3*CLI>
Disconnected from Asterisk server
прошло 32 минуты
12:34:33
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5140.14042.23926	2014-11-25 13:34:40.576692773 +0200
+++ /etc/asterisk/sip.conf	2014-11-25 13:35:34.560693409 +0200
@@ -2,7 +2,7 @@
 context=default
 qualify=yes
 
-#include "/etc/asterisk/sip.conf.kiev"
+;include "/etc/asterisk/sip.conf.kiev"
 
 
 register => minsk:1234@192.168.60.1/brest
12:36:15
#vim /etc/asterisk/sip.conf
12:37:31
#vim /etc/asterisk/sip.conf
12:42:13
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5140.19583.23414	2014-11-25 13:42:16.248698167 +0200
+++ /etc/asterisk/sip.conf	2014-11-25 13:42:38.008698425 +0200
@@ -1,4 +1,4 @@
-[genetal]
+[general]
 context=default
 qualify=yes
 
12:43:36
#vim /etc/asterisk/sip.conf
12:48:17
#vim /etc/asterisk/extensions.conf
/dev/pts/12
12:48:37
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/etc/asterisk/extconfig.conf':   == Found
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 2704)
Verbosity is at least 3
debian3*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
1301/1301                  192.168.30.100                           D   N             5060     OK (20 ms)
1302/1302                  192.168.30.101                           D   N             55782    OK (105 ms)
brest/minsk                (Unspecified)                            D   N             0        UNKNOWN
3 sip peers [Monitored: 2 online, 1 offline Unmonitored: 0 online, 0 offline]
    -- Registered SIP 'brest' at 192.168.60.1:5060
[Nov 25 13:48:57] NOTICE[2765]: chan_sip.c:20886 handle_response_peerpoke: Peer 'brest' is now Reachable. (1ms / 2000ms)
debian3*CLI> quit
Executing last minute cleanups
/dev/pts/10
12:50:07
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5140.10103.13444	2014-11-25 13:51:01.552704385 +0200
+++ /etc/asterisk/extensions.conf	2014-11-25 13:51:35.680704787 +0200
@@ -12,7 +12,7 @@
 exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm)
 exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2})
 
-exten => 23,XX,1,Dial(SIP/${EXTEN})
+exten =>_23XX,1,Dial(SIP/${EXTEN})
 
 
 
12:51:48
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian3 (pid = 2704)
Verbosity is at least 3
  == Using SIP RTP CoS mark 5
[Nov 25 13:52:16] NOTICE[2765]: chan_sip.c:22753 handle_request_invite: Call from '1301' (192.168.30.100:5060) to extension '2301' rejected because extension not found in context 'default'.
[Nov 25 13:52:34] NOTICE[2765]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1302
debian3*CLI> sip reload
Disconnected from Asterisk server
12:52:39
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5140.10.24679	2014-11-25 13:52:43.772705595 +0200
+++ /etc/asterisk/extensions.conf	2014-11-25 13:54:01.844706517 +0200
@@ -12,7 +12,7 @@
 exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm)
 exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2})
 
-exten =>_23XX,1,Dial(SIP/${EXTEN})
+exten =>_23XX,1,Dial(SIP/brest/${EXTEN})
 
 
 

Файлы

  • /etc/asterisk/sip.conf
  • /var/lib/dhcp/dhcpd.leases
  • /etc/asterisk/sip.conf
    >
    [genetal]
    context=default
    [1301]
    type=friend
    secret=1234
    host=dynamic
    [1302]
    type=friend
    secret=1234
    host=dynamic
    
    /var/lib/dhcp/dhcpd.leases
    >
    # The format of this file is documented in the dhcpd.leases(5) manual page.
    # This lease file was written by isc-dhcp-4.2.2
    server-duid "\000\001\000\001\034\005\352\342l;\34596\\";
    lease 192.168.30.100 {
      starts 1 2014/11/24 13:11:05;
      ends 1 2014/11/24 13:21:05;
      cltt 1 2014/11/24 13:11:05;
      binding state active;
      next binding state free;
      rewind binding state free;
      hardware ethernet 00:19:56:fd:75:0a;
      uid "\001\000\031V\375u\012";
      client-hostname "SEP001956FD750A";
    }
    lease 192.168.30.100 {
      starts 1 2014/11/24 13:16:06;
      ends 1 2014/11/24 13:26:06;
      cltt 1 2014/11/24 13:16:06;
      binding state active;
      next binding state free;
      rewind binding state free;
      hardware ethernet 00:19:56:fd:75:0a;
      uid "\001\000\031V\375u\012";
      client-hostname "SEP001956FD750A";
    }
    lease 192.168.30.100 {
      starts 1 2014/11/24 13:21:06;
      ends 1 2014/11/24 13:31:06;
      cltt 1 2014/11/24 13:21:06;
      binding state active;
      next binding state free;
      rewind binding state free;
      hardware ethernet 00:19:56:fd:75:0a;
      uid "\001\000\031V\375u\012";
      client-hostname "SEP001956FD750A";
    }
    lease 192.168.30.100 {
      starts 1 2014/11/24 13:26:07;
      ends 1 2014/11/24 13:36:07;
      cltt 1 2014/11/24 13:26:07;
      binding state active;
      next binding state free;
      rewind binding state free;
      hardware ethernet 00:19:56:fd:75:0a;
      uid "\001\000\031V\375u\012";
      client-hostname "SEP001956FD750A";
    }
    lease 192.168.30.101 {
      starts 1 2014/11/24 13:28:11;
      ends 1 2014/11/24 13:38:11;
      cltt 1 2014/11/24 13:28:11;
      binding state active;
      next binding state free;
      rewind binding state free;
      hardware ethernet 00:1d:72:1d:f4:ab;
      uid "\001\000\035r\035\364\253";
    }
    

    Статистика

    Время первой команды журнала09:06:04 2014-11-24
    Время последней команды журнала12:52:39 2014-11-25
    Количество командных строк в журнале100
    Процент команд с ненулевым кодом завершения, %13.00
    Процент синтаксически неверно набранных команд, % 5.00
    Суммарное время работы с терминалом *, час 6.31
    Количество командных строк в единицу времени, команда/мин 0.26
    Частота использования команд
    vim18|=================| 17.65%
    vi12|===========| 11.76%
    asterisk11|==========| 10.78%
    screen11|==========| 10.78%
    ls6|=====| 5.88%
    /etc/init.d/asterisk5|====| 4.90%
    #4|===| 3.92%
    cat4|===| 3.92%
    dpkg-reconfigure3|==| 2.94%
    sed3|==| 2.94%
    oll2|=| 1.96%
    apt-get2|=| 1.96%
    mv2|=| 1.96%
    sc2|=| 1.96%
    ifconfig1|| 0.98%
    alias1|| 0.98%
    mkdir1|| 0.98%
    ping1|| 0.98%
    ршыÐhistory1|| 0.98%
    chown1|| 0.98%
    ifup1|| 0.98%
    установка1|| 0.98%
    шifconfig1|| 0.98%
    chowd1|| 0.98%
    /etc/init.d/1|| 0.98%
    wc1|| 0.98%
    ifdown1|| 0.98%
    xset1|| 0.98%
    gripd1|| 0.98%
    ssh1|| 0.98%
    apt-cache1|| 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$