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

Содержание

Журнал

Среда (12/09/09)

/dev/pts/5
10:37:58
#pkill l3-agent

10:38:04
#top
top - 23:38:08 up 19:34,  6 users,  load average: 1.32, 0.87, 0.52
Tasks:  95 total,   2 running,  93 sleeping,   0 stopped,   0 zombie
Cpu(s): 99.7%us,  0.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2059368k total,   519772k used,  1539596k free,   104048k buffers
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
Swap:  1646620k total,        0k used,  1646620k free,   203708k cached
 2605 root      20   0 16344  12m 1508 R 91.8  0.6 655:11.51 l3-agent
 2752 root      19  -1  228m  10m 6596 S  6.6  0.5   3:29.97 Xorg
 5667 asterisk -11   0 31352  11m 6884 S  1.0  0.6   0:18.14 asterisk
 2832 root      20   0 23440  12m 7616 S  0.7  0.6   0:23.50 xfce4-terminal
...
    4 root      15  -5     0    0    0 S  0.0  0.0   0:01.02 ksoftirqd/0
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.80 watchdog/0
    6 root      15  -5     0    0    0 S  0.0  0.0   0:03.14 events/0
    7 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
   39 root      15  -5     0    0    0 S  0.0  0.0   0:00.26 kblockd/0
   41 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
   42 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify
  117 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
  150 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pdflush
  151 root      20   0     0    0    0 S  0.0  0.0   0:00.76 pdflush
10:38:09
#ps aux | grep l3
root      2605 55.8  0.6  16344 13036 ?        Rs   04:04 655:15 l3-agent
root      5932  0.0  0.0   3120   736 pts/6    S+   23:38   0:00 grep l3
10:38:13
#kill 2605

10:38:17
#top
top - 23:38:19 up 19:35,  6 users,  load average: 1.49, 0.93, 0.54
Tasks:  95 total,   2 running,  93 sleeping,   0 stopped,   0 zombie
Cpu(s): 52.6%us,  0.2%sy,  0.0%ni, 43.5%id,  0.0%wa,  3.6%hi,  0.0%si,  0.0%st
Mem:   2059368k total,   519780k used,  1539588k free,   104052k buffers
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
Swap:  1646620k total,        0k used,  1646620k free,   203712k cached
 2605 root      20   0 16344  12m 1508 R 89.3  0.6 655:21.82 l3-agent
 2752 root      19  -1  228m  10m 6596 S  7.8  0.5   3:30.21 Xorg
 5667 asterisk -11   0 31352  11m 6884 S  3.9  0.6   0:18.30 asterisk
 5947 root      20   0  2388 1036  804 R  3.9  0.1   0:00.02 top
...
    6 root      15  -5     0    0    0 S  0.0  0.0   0:03.14 events/0
    7 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
   39 root      15  -5     0    0    0 S  0.0  0.0   0:00.26 kblockd/0
   41 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
   42 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify
  117 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
  150 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pdflush
  151 root      20   0     0    0    0 S  0.0  0.0   0:00.76 pdflush
  152 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kswapd0
  153 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
10:38:25
#top
top - 23:38:31 up 19:35,  6 users,  load average: 1.26, 0.90, 0.53
Tasks:  94 total,   1 running,  93 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.7%us,  0.0%sy,  0.0%ni, 98.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2059368k total,   508720k used,  1550648k free,   104056k buffers
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
Swap:  1646620k total,        0k used,  1646620k free,   203724k cached
 4012 root      20   0  119m  48m  17m S  4.0  2.4   2:06.43 xulrunner-stub
 2752 root      19  -1  228m  10m 6596 S  1.3  0.5   3:30.57 Xorg
    1 root      20   0  2100  720  624 S  0.0  0.0   0:01.84 init
    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd
...
    4 root      15  -5     0    0    0 S  0.0  0.0   0:01.10 ksoftirqd/0
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.80 watchdog/0
    6 root      15  -5     0    0    0 S  0.0  0.0   0:03.26 events/0
    7 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
   39 root      15  -5     0    0    0 S  0.0  0.0   0:00.28 kblockd/0
   41 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
   42 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify
  117 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
  150 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pdflush
  151 root      20   0     0    0    0 S  0.0  0.0   0:00.80 pdflush
прошло 44 минуты
11:23:10
#cd /etc/

/dev/pts/11
11:23:44
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk.
/dev/pts/3
11:23:57
#ssh root@192.168.102.2
The authenticity of host '192.168.102.2 (192.168.102.2)' can't be established.
RSA key fingerprint is 0b:40:eb:0f:f1:0c:12:1d:16:16:68:c6:5f:3b:49:73.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.102.2' (RSA) to the list of known hosts.
root@192.168.102.2's password:
Linux debian2 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 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: Wed Dec  9 11:07:22 2009
l3-agent is already running: pid=2539; pidfile=/root/.lilalo/l3-agent.pid
11:24:00
#exit
Connection to 192.168.102.1 closed.
/dev/pts/11
11:24:02
#/etc/init.d/zaptel stop

/dev/pts/3
11:24:22
#screen -x
/dev/pts/5
11:33:40
#vi zaptel.conf
11:34:11
#cd /etc/asterisk/

прошло 10 минут
11:44:22
#vim extensions.conf
--- /tmp/l3-saved-2943.18310.2140	2009-12-09 00:44:28.000000000 -1000
+++ extensions.conf	2009-12-09 00:45:31.000000000 -1000
@@ -8,6 +8,8 @@
 exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
 exten => _1XX,n,Dial(SIP/${EXTEN})
 
+exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
+
 exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
 
 exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
11:45:31
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity was 0 and is now 1
debian3*CLI> extensions reload
Dialplan reloaded.
The 'extensions reload' command is deprecated and will be removed in a future release. Please use 'dialplan reload' instead.
debian3*CLI> dial
dialplan  dial
debian3*CLI> dialplan reload
Dialplan reloaded.
[Dec  9 00:46:26] NOTICE[6078]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
debian3*CLI>
11:48:05
#vim extensions.conf
прошло 114 минут
13:42:58
#vim iax.conf
--- /tmp/l3-saved-2943.792.29362	2009-12-09 02:43:06.000000000 -1000
+++ iax.conf	2009-12-09 02:52:32.000000000 -1000
@@ -1,6 +1,15 @@
 [general]
 context=default
-register => poltava:1234@192.168.102.1/kiev 
+;register => poltava:1234@192.168.102.1/kiev 
+register => frompoltava:1234@192.168.102.2/obukhov
+
+[obukhov]
+type=friend
+host=dynamic
+secret=1234
+deny=0.0.0.0/0.0.0.0
+permit=192.168.102.2/255.255.255.0
+trunk=yes
 
 [kiev]
 type=friend
13:52:42
#context=default
asterisk   astgenkey  astman
13:52:42
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
debian3*CLI> iax2 show
cache         channels      firmware      netstats      peer
peers         provisioning  registry      stats         threads
users
debian3*CLI> iax2 show peers
Name/Username    Host                 Mask             Port          Status
kiev             192.168.102.1   (D)  255.255.255.255  4569 (T)      Unmonitored
obukhov          (Unspecified)   (D)  255.255.255.255  0    (T)      Unmonitored
2 iax2 peers [0 online, 0 offline, 2 unmonitored]
debian3*CLI>
13:54:29
#vim iax.conf
13:54:39
#[ ]
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 1
debian3*CLI>
13:55:31
#vim iax.conf
13:55:43
#[ limito]peers=yes
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 1
debian3*CLI> iax2 reload
debian3*CLI> iax2 show registry
Host                  dnsmgr  Username    Perceived             Refresh  State
0.0.0.0:4569          N       frompoltav  <Unregistered>             60  Unregistered
debian3*CLI> iax2 reload
debian3*CLI> iax2 show registry
Host                  dnsmgr  Username    Perceived             Refresh  State
0.0.0.0:4569          N       frompoltav  <Unregistered>             60  Unregistered
debian3*CLI>
13:56:38
#vim iax.conf
--- /tmp/l3-saved-2943.4826.13731	2009-12-09 02:56:39.000000000 -1000
+++ iax.conf	2009-12-09 02:56:57.000000000 -1000
@@ -1,7 +1,7 @@
 [general]
 context=default
 ;register => poltava:1234@192.168.102.1/kiev 
-register => frompoltava:1234@192.168.102.2/obukhov
+register => frompoltava:1234@192.168.102.2
 
 [obukhov]
 type=friend
13:56:57
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
peers         provisioning  registry      stats         threads
users
debian3*CLI> iax2 show
cache         channels      firmware      netstats      peer
peers         provisioning  registry      stats         threads
users
debian3*CLI> iax2 show registry
Host                  dnsmgr  Username    Perceived             Refresh  State
192.168.102.2:4569    N       frompoltav  192.168.101.3:4569         60  Registered
debian3*CLI>
13:57:42
#vim ext
13:57:42
#vim extensions.
--- /tmp/l3-saved-2943.17273.12289	2009-12-09 02:58:15.000000000 -1000
+++ extensions.conf	2009-12-09 02:59:30.000000000 -1000
@@ -19,7 +19,7 @@
 exten => 191,1,Dial(SIP/101,5)
 exten => 191,n,Dial(SIP/kiev/380503049607,10})
 
-;exten => _2XX,n,Dial(IAX2/kiev/${EXTEN})
+;exten => _2XX,n,Dial(IAX2/obukhov/${EXTEN})
 
 exten => 999,1,Answer
 exten => 999,n,Echo()
13:58:13
#~
exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
"extensions.conf" 2l(, 540C   ${EXTEN})
exten => 191,1,Dial(SIP/101,5)
exten => 191,n,Dial(SIP/kiev/380503049607,10})
                     (                  )
exten => 999,1,Answer
                    l(     obukhov/${EXTEN})
                   ()
                   ()
exten => 911,1,Dial(ZAP/G1/911,5)
"extensions.conf" 27L, 543C written
13:59:30
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 1
debian3*CLI> extensions reload
Dialplan reloaded.
debian3*CLI>
14:00:32
#vim extensions.conf
--- /tmp/l3-saved-2943.25030.4767	2009-12-09 03:00:34.000000000 -1000
+++ extensions.conf	2009-12-09 03:00:52.000000000 -1000
@@ -14,12 +14,12 @@
 
 exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
 
-exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
+;exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
 
 exten => 191,1,Dial(SIP/101,5)
 exten => 191,n,Dial(SIP/kiev/380503049607,10})
 
-;exten => _2XX,n,Dial(IAX2/obukhov/${EXTEN})
+exten => _2XX,n,Dial(IAX2/obukhov/${EXTEN})
 
 exten => 999,1,Answer
 exten => 999,n,Echo()
14:00:52
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 1
debian3*CLI> extensions reload
Dialplan reloaded.
debian3*CLI> exit
Executing last minute cleanups
14:00:59
#vim extensions.conf
14:02:39
#{EXTEN})
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 1
[Dec  9 03:02:49] NOTICE[6080]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist
[Dec  9 03:02:49] NOTICE[6078]: chan_sip.c:14035 handle_request_invite: Call from '101' to extension '202' rejected because extension not found.
debian3*CLI>
14:03:43
#vim extensions.conf
--- /tmp/l3-saved-2943.7089.12785	2009-12-09 03:03:45.000000000 -1000
+++ extensions.conf	2009-12-09 03:04:08.000000000 -1000
@@ -10,16 +10,16 @@
 
 
 
-exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
+;exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
 
 exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
 
-;exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
 
 exten => 191,1,Dial(SIP/101,5)
 exten => 191,n,Dial(SIP/kiev/380503049607,10})
 
-exten => _2XX,n,Dial(IAX2/obukhov/${EXTEN})
+exten => _3XX,n,Dial(IAX2/obukhov/${EXTEN})
 
 exten => 999,1,Answer
 exten => 999,n,Echo()
14:04:08
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 1
debian3*CLI> extensions reload
Dialplan reloaded.
[Dec  9 03:04:17] NOTICE[6078]: chan_sip.c:14035 handle_request_invite: Call from '101' to extension '301' rejected because extension not found.
[Dec  9 03:04:32] NOTICE[6078]: chan_sip.c:14035 handle_request_invite: Call from '101' to extension '302' rejected because extension not found.
[Dec  9 03:04:33] NOTICE[6086]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist
[Dec  9 03:04:33] NOTICE[6078]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
debian3*CLI>
14:04:36
#vim extensions.conf
--- /tmp/l3-saved-2943.2881.2341	2009-12-09 03:04:37.000000000 -1000
+++ extensions.conf	2009-12-09 03:04:45.000000000 -1000
@@ -19,7 +19,7 @@
 exten => 191,1,Dial(SIP/101,5)
 exten => 191,n,Dial(SIP/kiev/380503049607,10})
 
-exten => _3XX,n,Dial(IAX2/obukhov/${EXTEN})
+exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN})
 
 exten => 999,1,Answer
 exten => 999,n,Echo()
14:04:45
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 1
debian3*CLI> extensions reload
Dialplan reloaded.
debian3*CLI> quit
Executing last minute cleanups
14:05:04
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
    -- Called obukhov/302
    -- Call accepted by 192.168.102.2 (format gsm)
    -- Format for call is gsm
    -- IAX2/obukhov-16385 is ringing
[Dec  9 03:05:28] NOTICE[6080]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist
    -- Hungup 'IAX2/obukhov-16385'
  == Spawn extension (default, 302, 1) exited non-zero on 'SIP/101-09a594c8'
[Dec  9 03:05:38] NOTICE[6084]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist
[Dec  9 03:06:09] NOTICE[6085]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist
debian3*CLI>
14:06:36
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 3
debian3*CLI>
14:06:38
#vim extensions.conf
14:07:18
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf': Found
  == Parsing '/etc/asterisk/extconfig.conf': Found
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 3
    -- B-channel 0/1 successfully restarted on span 1
[Dec  9 03:07:25] NOTICE[6085]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist
[Dec  9 03:07:34] NOTICE[6078]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
    -- B-channel 0/1 restarted on span 1
debian3*CLI>
14:07:47
#vim iax.conf
--- /tmp/l3-saved-2943.19715.1432	2009-12-09 03:07:54.000000000 -1000
+++ iax.conf	2009-12-09 03:08:08.000000000 -1000
@@ -8,7 +8,7 @@
 host=dynamic
 secret=1234
 deny=0.0.0.0/0.0.0.0
-permit=192.168.102.2/255.255.255.0
+permit=192.168.102.2/255.255.255.255
 trunk=yes
 
 [kiev]
14:08:08
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
debian3*CLI> iax2 reload
  == Parsing '/etc/asterisk/iax.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
    -- Seeding 'obukhov' at 192.168.102.2:4569 for 60
    -- Seeding 'kiev' at 192.168.102.1:4569 for 60
  == Parsing '/etc/asterisk/iaxprov.conf': Found
    -- Loaded provisioning template 'default'
    -- Registered IAX2 to '192.168.102.2', who sees us as 192.168.101.3:4569 with no messages waiting
[Dec  9 03:08:20] NOTICE[6081]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist
debian3*CLI>
14:08:33
#vim iax.conf
14:08:52
#[ ]
exten => 102,n,Playback(rondo)
exten => 102,n,Hangup
;exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
;exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
"extensions.conf" 27L, 543C
exten => 191,1,Dial(SIP/101,5)
exten => 191,n,Dial(SIP/kiev/380503049607,10})
14:09:13
#{EXTEN})
[general]
context=default
;register => poltava:1234@192.168.102.1/kiev
register => frompoltava:1234@192.168.102.2
[obukhov]
type=friend
host=dynamic
"iax.conf" 23L, 379C
secret=1234
deny=0.0.0.0/0.0.0.0
permit=192.168.102.2/255.255.255.255
trunk=yes
[kiev]
type=friend
host=dynamic
secret=1234
deny=0.0.0.0/0.0.0.0
permit=192.168.102.1/255.255.255.255
trunk=yes
; call-limit=1
14:10:47
#; limitonpeers=yes
exten => 102,1,Answer
exten => 102,n,Wait(1)
exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
exten => _1XX,n,Dial(SIP/${EXTEN})
exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
"extensions.conf" 27L, 543C
exten => 191,1,Dial(SIP/101,5)
exten => 191,n,Dial(SIP/kiev/380503049607,10})
exten => 999,1,Answer
exten => 999,n,Echo()
"extensions.conf" 27L, 541C written
14:11:05
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
       > host prefs = (),
       > priority = mine
    -- Executing [101@default:1] Set("IAX2/obukhov-7259", "CALLERID(number)=4") in new stack
    -- Executing [101@default:2] Dial("IAX2/obukhov-7259", "SIP/101") in new stack
    -- Called 101
    -- SIP/101-09a57f38 is ringing
    -- SIP/101-09a57f38 is ringing
    -- SIP/101-09a57f38 answered IAX2/obukhov-7259
  == Spawn extension (default, 101, 2) exited non-zero on 'IAX2/obukhov-7259'
    -- Hungup 'IAX2/obukhov-7259'
14:12:09
#vim extensions.conf
14:12:15
#{EXTEN})
[       ]
trunk=yes
"iax.conf" 23L, 379C
[kiev]  ]
[       ]
type=friend
host=dynamic
secret=1234
deny=0.0.0.0/0.0.0.0
permit=192.168.102.1/255.255.255.255
trunk=yes
; call-limit=1
; limitonpeers=yes                                            13,0-1        All
14:12:40
#[kiev] ]
unix  2      [ ACC ]     STREAM     LISTENING     19274    /var/run/asterisk/asterisk.ctl
14:12:57
#netstat tapnul | grep aster

14:13:18
#netstat tapnul
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 192.168.101.3:ssh       192.168.102.1:52036     ESTABLISHED
tcp        0      0 192.168.101.3:ssh       192.168.102.1:41718     ESTABLISHED
tcp        0      0 192.168.101.3:37285     192.168.102.2:ssh       ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  5      [ ]         DGRAM                    13630    /dev/log
unix  2      [ ]         DGRAM                    3233     @/org/kernel/udev/udevd
unix  2      [ ]         DGRAM                    7619     @/org/freedesktop/hal/udev_event
...
unix  3      [ ]         STREAM     CONNECTED     7725     @/var/run/hald/dbus-eiMdLFvj7Q
unix  3      [ ]         STREAM     CONNECTED     7712
unix  3      [ ]         STREAM     CONNECTED     7614     @/var/run/hald/dbus-C2MgYKLltB
unix  3      [ ]         STREAM     CONNECTED     7613
unix  3      [ ]         STREAM     CONNECTED     7594     /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     7593
unix  2      [ ]         DGRAM                    7476
unix  3      [ ]         STREAM     CONNECTED     7205
unix  3      [ ]         STREAM     CONNECTED     7204
unix  2      [ ]         DGRAM                    7184
14:13:21
#netstatv lup
bash: netstatv: command not found
14:13:52
#netstat lup
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 192.168.101.3:ssh       192.168.102.1:52036     ESTABLISHED
tcp        0      0 192.168.101.3:ssh       192.168.102.1:41718     ESTABLISHED
tcp        0      0 192.168.101.3:37285     192.168.102.2:ssh       ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  5      [ ]         DGRAM                    13630    /dev/log
unix  2      [ ]         DGRAM                    3233     @/org/kernel/udev/udevd
unix  2      [ ]         DGRAM                    7619     @/org/freedesktop/hal/udev_event
...
unix  3      [ ]         STREAM     CONNECTED     7725     @/var/run/hald/dbus-eiMdLFvj7Q
unix  3      [ ]         STREAM     CONNECTED     7712
unix  3      [ ]         STREAM     CONNECTED     7614     @/var/run/hald/dbus-C2MgYKLltB
unix  3      [ ]         STREAM     CONNECTED     7613
unix  3      [ ]         STREAM     CONNECTED     7594     /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     7593
unix  2      [ ]         DGRAM                    7476
unix  3      [ ]         STREAM     CONNECTED     7205
unix  3      [ ]         STREAM     CONNECTED     7204
unix  2      [ ]         DGRAM                    7184
14:13:55
#netstat lup
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 192.168.101.3:ssh       192.168.102.1:52036     ESTABLISHED
tcp        0      0 192.168.101.3:ssh       192.168.102.1:41718     ESTABLISHED
tcp        0      0 192.168.101.3:37285     192.168.102.2:ssh       ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  5      [ ]         DGRAM                    13630    /dev/log
unix  2      [ ]         DGRAM                    3233     @/org/kernel/udev/udevd
unix  2      [ ]         DGRAM                    7619     @/org/freedesktop/hal/udev_event
...
unix  3      [ ]         STREAM     CONNECTED     7725     @/var/run/hald/dbus-eiMdLFvj7Q
unix  3      [ ]         STREAM     CONNECTED     7712
unix  3      [ ]         STREAM     CONNECTED     7614     @/var/run/hald/dbus-C2MgYKLltB
unix  3      [ ]         STREAM     CONNECTED     7613
unix  3      [ ]         STREAM     CONNECTED     7594     /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     7593
unix  2      [ ]         DGRAM                    7476
unix  3      [ ]         STREAM     CONNECTED     7205
unix  3      [ ]         STREAM     CONNECTED     7204
unix  2      [ ]         DGRAM                    7184
14:13:57
#vim extensions.conf
прошло 14 минут
14:28:34
#{EXTEN})
; switch should provide dialtone, read digits, etc.
; Note: If immediate=yes the dialplan execution will always start at extension
; 's' priority 1 regardless of the dialed number!
;
immediate=no
;
; Specify whether flash-hook transfers to 'busy' channels should complete or
          yes
; return to the caller performing the transfer (default is yes).
;
;transfertobusy=no
"zapata.conf" 683L, 24201C written
14:28:58
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059)
Verbosity is at least 3
debian3*CLI> zap
destroy  restart  show
debian3*CLI>
14:29:21
#cd ..

14:29:28
#cd init.d/

14:29:31
#./asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
14:29:40
#cd ..

14:29:52
#cd asterisk/

14:29:56
#vim extensions.conf
--- /tmp/l3-saved-2943.28328.4207	2009-12-09 03:30:23.000000000 -1000
+++ extensions.conf	2009-12-09 03:31:58.000000000 -1000
@@ -1,5 +1,7 @@
 [default]
 
+exten => s,1,Answer
+exten => s,n,Background(rondo)
 exten => 102,1,Answer
 exten => 102,n,Wait(1)
 exten => 102,n,Playback(rondo)
14:31:58
#cp extensions.conf extensions.conf.2

14:37:46
#echo 1 > extensions.conf

14:37:56
#vi extensions.conf
--- /tmp/l3-saved-2943.21100.20498	2009-12-09 03:38:05.000000000 -1000
+++ extensions.conf	2009-12-09 03:48:09.000000000 -1000
@@ -1 +1,24 @@
-1
+[default]
+
+[internal]
+exten => s,1,Answer
+exten => s,n,Background(rondo)
+exten => 102,1,Answer
+exten => 102,n,Wait(1)
+exten => 102,n,Playback(rondo)
+exten => 102,n,Hangup
+exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
+exten => _1XX,n,Dial(SIP/${EXTEN})
+exten => 999,1,Answer
+exten => 999,n,Echo()
+
+[outbound]
+exten => s,1,Answer
+exten => s,n,Background(rondo)
+exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN})
+exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
+exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
+exten => 191,1,Dial(SIP/101,5)
+exten => 191,n,Dial(SIP/kiev/380503049607,10})
+
/dev/pts/0
14:41:09
#cd /etc/asterisk/

14:41:20
#vi extensions.conf.2
14:48:06
#cd ..

/dev/pts/5
14:48:09
#vi sip.conf
--- /tmp/l3-saved-2943.22626.20391	2009-12-09 03:48:15.000000000 -1000
+++ sip.conf	2009-12-09 03:49:55.000000000 -1000
@@ -5,6 +5,7 @@
 
 
 [101]
+context=
 username=phone
 type=friend
 host=dynamic
14:49:55
#vi extensions.conf
--- /tmp/l3-saved-2943.11680.21714	2009-12-09 03:49:57.000000000 -1000
+++ extensions.conf	2009-12-09 03:51:48.000000000 -1000
@@ -22,3 +22,12 @@
 exten => 191,1,Dial(SIP/101,5)
 exten => 191,n,Dial(SIP/kiev/380503049607,10})
 
+[white]
+include => internal
+include => outbound
+
+[black]
+include => internal
+
+[inbound]
+include => internal
14:51:48
#vi sip.conf
--- /tmp/l3-saved-2943.19427.991	2009-12-09 03:51:51.000000000 -1000
+++ sip.conf	2009-12-09 03:53:06.000000000 -1000
@@ -5,7 +5,7 @@
 
 
 [101]
-context=
+context=white
 username=phone
 type=friend
 host=dynamic
@@ -13,12 +13,14 @@
 callerid="gib-snom"
 
 [103]
+context=black
 type=friend
 host=dynamic
 secret=123
 callerid="GIB-win"
 
 [kiev]
+context=inbound
 type=friend
 host=dynamic
 secret=1234
/dev/pts/0
14:53:50
#cd init.d

14:53:53
#asterisk restart
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.
14:53:58
#./asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
14:54:09
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
  == Primary D-Channel on span 1 up
    -- Registered IAX2 to '192.168.102.2', who sees us as 192.168.101.3:4569 with no messages waiting
[Dec  9 04:00:12] NOTICE[7230]: chan_zap.c:6872 handle_init_event: Alarm cleared on channel 1
[Dec  9 04:00:12] NOTICE[7230]: chan_zap.c:6872 handle_init_event: Alarm cleared on channel 2
[Dec  9 04:00:12] NOTICE[7229]: chan_zap.c:9024 pri_dchannel: PRI got event: No more alarm (5) on Primary D-channel of span 1
    -- B-channel 0/1 restarted on span 1
    -- B-channel 0/1 successfully restarted on span 1
    -- B-channel 0/2 successfully restarted on span 1
[Dec  9 04:01:36] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
debian3*CLI>
15:01:41
#cd ..

15:01:46
#cd asterisk/

15:01:49
#vi sip.conf
прошло 10 минут
15:12:03
#vi sip.conf
15:13:28
#context=inbound
exten => s,1,Answer
exten => s,n,Background(rondo)
exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
[        ]
[xten => ]3XX,1,Dial(IAX2/obukhov/${EXTEN})
;exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
exten => 191,1,Dial(SIP/101,5)
[white]
[white]
include => internal                                           26,1          30%
15:15:04
#vi extensions.conf
--- /tmp/l3-saved-7044.26726.26076	2009-12-09 04:15:05.000000000 -1000
+++ extensions.conf	2009-12-09 04:15:59.000000000 -1000
@@ -19,8 +19,8 @@
 exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN})
 ;exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
 exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
-exten => 191,1,Dial(SIP/101,5)
-exten => 191,n,Dial(SIP/kiev/380503049607,10})
+;exten => 191,1,Dial(SIP/101,5)
+exten => 191,1,Dial(SIP/kiev/380503049607,10})
 
 [white]
 include => internal
15:15:59
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
    -- SIP/kiev-085fbb50 answered SIP/101-085f7bd8
    -- Native bridging SIP/101-085f7bd8 and SIP/kiev-085fbb50
[Dec  9 04:16:37] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
  == Spawn extension (white, 202, 1) exited non-zero on 'SIP/101-085f7bd8'
    -- Executing [191@white:1] Set("SIP/101-085f5000", "CALLERID(number)=4101") in new stack
    -- Executing [191@white:2] Dial("SIP/101-085f5000", "SIP/191") in new stack
[Dec  9 04:16:50] WARNING[7579]: chan_sip.c:2921 create_addr: No such host: 191
[Dec  9 04:16:50] WARNING[7579]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination)
  == Everyone is busy/congested at this time (1:0/0/1)
  == Auto fallthrough, channel 'SIP/101-085f5000' status is 'CHANUNAVAIL'
/dev/pts/5
15:17:04
#screen -x
15:17:05
#screen
/dev/pts/7
15:17:10
#cd /etc/asterisk/

15:17:14
#vim extensions.conf
/dev/pts/0
15:17:23
#vi extensions.conf
15:17:27
#vi extensions.conf
--- /tmp/l3-saved-7044.9949.25695	2009-12-09 04:17:29.000000000 -1000
+++ extensions.conf	2009-12-09 04:18:03.000000000 -1000
@@ -20,7 +20,7 @@
 ;exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
 exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
 ;exten => 191,1,Dial(SIP/101,5)
-exten => 191,1,Dial(SIP/kiev/380503049607,10})
+exten => 191,1,Dial(SIP/kiev/380503049607,10)
 
 [white]
 include => internal
/dev/pts/7
15:17:27
#[ ]
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
  == Parsing '/etc/asterisk/festival.conf': Found
  == Auto fallthrough, channel 'SIP/101-085f7bd8' status is 'UNKNOWN'
[Dec  9 23:02:23] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  9 23:05:23] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  9 23:08:23] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  9 23:11:24] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
debian3*CLI>
debian3*CLI>
debian3*CLI> quit
Executing last minute cleanups
/dev/pts/0
15:18:03
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
    -- Including context 'internal' in context 'black'
    -- Registered extension context 'inbound'
    -- Including context 'internal' in context 'inbound'
  == Parsing '/etc/asterisk/users.conf': Found
    -- Executing [191@white:1] Set("SIP/101-085f7bd8", "CALLERID(number)=4101") in new stack
    -- Executing [191@white:2] Dial("SIP/101-085f7bd8", "SIP/191") in new stack
[Dec  9 04:18:12] WARNING[7779]: chan_sip.c:2921 create_addr: No such host: 191
[Dec  9 04:18:12] WARNING[7779]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination)
  == Everyone is busy/congested at this time (1:0/0/1)
  == Auto fallthrough, channel 'SIP/101-085f7bd8' status is 'CHANUNAVAIL'
15:18:29
#vi extensions.conf
--- /tmp/l3-saved-7044.12903.3243	2009-12-09 04:18:31.000000000 -1000
+++ extensions.conf	2009-12-09 04:19:33.000000000 -1000
@@ -19,8 +19,7 @@
 exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN})
 ;exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
 exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
-;exten => 191,1,Dial(SIP/101,5)
-exten => 191,1,Dial(SIP/kiev/380503049607,10)
+exten => 891,1,Dial(SIP/kiev/380503049607,10)
 
 [white]
 include => internal
15:19:33
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
    -- Executing [891@white:1] Dial("SIP/101-085f7bd8", "SIP/kiev/380503049607|10") in new stack
    -- Called kiev/380503049607
    -- SIP/kiev-085fbb50 is making progress passing it to SIP/101-085f7bd8
    -- SIP/kiev-085fbb50 is ringing
  == Spawn extension (white, 891, 1) exited non-zero on 'SIP/101-085f7bd8'
    -- Executing [202@white:1] Dial("SIP/101-085f0bd0", "SIP/kiev/202") in new stack
    -- Called kiev/202
    -- SIP/kiev-085fa5c0 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
  == Auto fallthrough, channel 'SIP/101-085f0bd0' status is 'CONGESTION'
15:22:26
#vi sip.conf
прошло 43 минуты
16:06:08
#~
[xten =>]102,n,Hangup
exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
exten => _1XX,n,Dial(SIP/${EXTEN})
exten => 999,1,Answer
exten => 999,n,Echo()
[outbound]
exten => s,1,Answer
exten => s,n,Background(rondo)
exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN})
...
~
~
~
~
~
~
~
~
~
~                                                                                                                         2,0-1         All
16:07:56
#[ ]
exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
exten => _1XX,n,Dial(SIP/${EXTEN})
exten => 888,n,Wait(1)
exten => 999,1,Answed(/tmp/hello:gsm|1)
exten => 888,n,Playback(/tmp/hello)
exten => 999,n,Echo()
[outbound]88,1,Aswer
exten => s,1,Answerrd(hello)
exten => s,n,Background(rondo)
exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN})
;exten => _3XX,1,Dial(ZAP/G1/${EXTEN})
"extensions.conf" 38L, 821C written
exten => 891,1,Dial(SIP/kiev/380503049607,10)
[white]
include => internal
include => outbound
-- INSERT --                                                  16,1          61%
16:12:02
#vi extensions.conf
16:12:11
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
    -- Including context 'internal' in context 'white'
    -- Including context 'outbound' in context 'white'
    -- Registered extension context 'black'
    -- Including context 'internal' in context 'black'
    -- Registered extension context 'inbound'
    -- Including context 'internal' in context 'inbound'
  == Parsing '/etc/asterisk/users.conf': Found
[Dec  9 05:12:27] WARNING[7921]: pbx.c:1832 pbx_extension_helper: No application 'Aswer' for extension (white, 888, 1)
  == Spawn extension (white, 888, 1) exited non-zero on 'SIP/101-085f5000'
debian3*CLI>

Статистика

Время первой команды журнала10:37:58 2009-12- 9
Время последней команды журнала16:12:11 2009-12- 9
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, %11.88
Процент синтаксически неверно набранных команд, % 0.99
Суммарное время работы с терминалом *, час 2.18
Количество командных строк в единицу времени, команда/мин 0.77
Частота использования команд
asterisk21|====================| 20.19%
vim19|==================| 18.27%
vi14|=============| 13.46%
cd12|===========| 11.54%
[5|====| 4.81%
{EXTEN})4|===| 3.85%
netstat4|===| 3.85%
screen3|==| 2.88%
top3|==| 2.88%
grep2|=| 1.92%
~2|=| 1.92%
netstatv1|| 0.96%
ps1|| 0.96%
/etc/init.d/zaptel1|| 0.96%
/etc/init.d/asterisk1|| 0.96%
context=inbound1|| 0.96%
cp1|| 0.96%
context=default1|| 0.96%
pkill1|| 0.96%
echo1|| 0.96%
extensions.conf1|| 0.96%
[kiev]1|| 0.96%
kill1|| 0.96%
ssh1|| 0.96%
exit1|| 0.96%
limitonpeers=yes1|| 0.96%
____
*) Интервалы неактивности длительностью 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$