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

Содержание

Журнал

Вторник (12/08/09)

/dev/pts/4
09:41:00
#vim extensions.conf
09:44:03
#[ ]
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 = 23680)
Verbosity is at least 1
debian3*CLI>
09:45:47
#vim extensions.conf
--- /tmp/l3-saved-24178.20469.26049	2009-12-07 22:45:48.000000000 -1000
+++ extensions.conf	2009-12-07 22:49:26.000000000 -1000
@@ -4,7 +4,8 @@
 exten => 102,n,Wait(1)
 exten => 102,n,Playback(rondo)
 exten => 102,n,Hangup
-exten => _1XX,1,Dial(SIP/${EXTEN})
+exten => _1xx,1,SetCallerId(SIP/${EXTEN})
+exten => _1XX,n,Dial(SIP/${EXTEN})
 exten => 999,1,Answer
 exten => 999,n,Echo()
 exten => i,1,Answer
/dev/pts/0
09:47:09
#screen -x 192.168.102.1
09:47:33
#screen -x 192.168.202.1
09:47:38
#screen -x 192.168.102.1
09:47:41
#ssh root@192.168.102.1
The authenticity of host '192.168.102.1 (192.168.102.1)' can't be established.
RSA key fingerprint is e0:02:43:8e:17:2b:14:dd:6c:e6:36:8c:3b:c8:04:74.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.102.1' (RSA) to the list of known hosts.
root@192.168.102.1's password:
Linux debian4 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52 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: Mon Dec  7 22:47:03 2009 from 192.168.7.101
l3-agent is already running: pid=3597; pidfile=/root/.lilalo/l3-agent.pid
09:48:30
#screen -x
/dev/pts/4
09:49:26
#vim extensions.conf
--- /tmp/l3-saved-24178.18591.17472	2009-12-07 22:51:58.000000000 -1000
+++ extensions.conf	2009-12-07 22:53:35.000000000 -1000
@@ -4,7 +4,7 @@
 exten => 102,n,Wait(1)
 exten => 102,n,Playback(rondo)
 exten => 102,n,Hangup
-exten => _1xx,1,SetCallerId(SIP/${EXTEN})
+exten => _1XX,1,Set(CALLERID(number)=5${CALLERID(number)})
 exten => _1XX,n,Dial(SIP/${EXTEN})
 exten => 999,1,Answer
 exten => 999,n,Echo()
09:53:35
#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 = 23680)
Verbosity is at least 1
debian3*CLI>
09:53:43
#vim extensions.conf
--- /tmp/l3-saved-24178.20106.28264	2009-12-07 22:53:44.000000000 -1000
+++ extensions.conf	2009-12-07 22:53:54.000000000 -1000
@@ -4,7 +4,7 @@
 exten => 102,n,Wait(1)
 exten => 102,n,Playback(rondo)
 exten => 102,n,Hangup
-exten => _1XX,1,Set(CALLERID(number)=5${CALLERID(number)})
+exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
 exten => _1XX,n,Dial(SIP/${EXTEN})
 exten => 999,1,Answer
 exten => 999,n,Echo()
09:53:54
#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 = 23680)
Verbosity is at least 1
debian3*CLI> extensions reload
Dialplan reloaded.
debian3*CLI> exit
Executing last minute cleanups
09:54:03
#vim extensions.conf
--- /tmp/l3-saved-24178.11846.28104	2009-12-07 22:56:06.000000000 -1000
+++ extensions.conf	2009-12-07 22:56:42.000000000 -1000
@@ -4,9 +4,9 @@
 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()
-exten => i,1,Answer
-exten => i,n,Playback(rondo)
09:56:42
#vim extensions.conf
прошло 17 минут
10:14:40
#~
[101]friend
[101]
host=dynamic
secret=123
callerid="gib"
[103]
[103]
[103]
[kiev]
type=friend
host=192.168.102.1
secret=123
~
~
~
"sip.conf" 20L, 207C written
10:15:43
#vim sip.conf
--- /tmp/l3-saved-24178.11484.721	2009-12-07 23:15:48.000000000 -1000
+++ sip.conf	2009-12-07 23:16:49.000000000 -1000
@@ -6,15 +6,16 @@
 type=friend
 host=dynamic
 secret=123
-callerid="gib"
+callerid="gib-snom"
 
 [103]
 type=friend
 host=dynamic
 secret=123
-callerid="GIB"
+callerid="GIB-win"
 
 [kiev]
 type=friend
 host=192.168.102.1
-secret=123
+secret=1234
+
10:16:49
#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 = 23680)
Verbosity is at least 1
debian3*CLI> sip reload
 Reloading SIP
[Dec  7 23:17:22] NOTICE[23691]: chan_sip.c:14035 handle_request_invite: Call from '103' to extension '202' rejected because extension not found.
debian3*CLI>
10:17:25
#vim extensions.conf
--- /tmp/l3-saved-24178.15444.11113	2009-12-07 23:17:28.000000000 -1000
+++ extensions.conf	2009-12-07 23:18:43.000000000 -1000
@@ -8,5 +8,7 @@
 exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
 exten => _1XX,n,Dial(SIP/${EXTEN})
 
+exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
+
 exten => 999,1,Answer
 exten => 999,n,Echo()
10:18:43
#vim sip.conf
10:18:49
#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 = 23680)
Verbosity is at least 1
debian3*CLI> extensions reload
Dialplan reloaded.
[Dec  7 23:19:00] NOTICE[23691]: chan_sip.c:12322 handle_response_invite: Failed to authenticate on INVITE to '"GIB-win" <sip:103@192.168.101.3>;tag=as277a4f71'
debian3*CLI>
/dev/pts/6
10:19:24
#cd /etc/asterisk/

10:19:27
#vim sip.conf
/dev/pts/4
10:19:40
#vim sip.conf
--- /tmp/l3-saved-24178.10141.28069	2009-12-07 23:19:43.000000000 -1000
+++ sip.conf	2009-12-07 23:19:51.000000000 -1000
@@ -17,5 +17,5 @@
 [kiev]
 type=friend
 host=192.168.102.1
-secret=1234
+; secret=1234
 
/dev/pts/6
10:19:41
#[kiev]
[general]
context=default
[101]
username=phone
type=friend
host=dynamic
secret=123
callerid="gib-snom"
[103]
type=friend
host=dynamic
secret=123
callerid="GIB-win"
[kiev]
type=friend
host=192.168.102.1
; secret=1234
/dev/pts/4
10:19:51
#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 = 23680)
Verbosity is at least 1
debian3*CLI> extensions reload
Dialplan reloaded.
debian3*CLI> ping 192.168.102.1
No such command 'ping 192.168.102.1' (type 'help ping 192.168.102.1' for other possible commands)
debian3*CLI>
/dev/pts/6
10:20:58
#cat extensions.conf
[default]
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 => _2XX,1,Dial(SIP/kiev/${EXTEN})
exten => 999,1,Answer
exten => 999,n,Echo()
/dev/pts/8
10:20:59
#vi /etc/asterisk/sip.conf
/dev/pts/4
10:21:08
#ping 192.168.102.1
PING 192.168.102.1 (192.168.102.1) 56(84) bytes of data.
64 bytes from 192.168.102.1: icmp_seq=1 ttl=63 time=0.283 ms
64 bytes from 192.168.102.1: icmp_seq=2 ttl=63 time=0.341 ms
^C
--- 192.168.102.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.283/0.312/0.341/0.029 ms
/dev/pts/6
10:21:11
#cat extensions.conf

/dev/pts/4
10:21:14
#ping 192.168.102.3
PING 192.168.102.3 (192.168.102.3) 56(84) bytes of data.
^C
--- 192.168.102.3 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1014ms
10:21:17
#vim sip.conf
/dev/pts/8
10:21:34
#asterisk -rxx
No such command 'x' (type 'help x' for other possible commands)
10:21: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
=========================================================================
...
kiev                       192.168.102.1               5060     Unmonitored
103/103                    192.168.101.102  D          31080    Unmonitored
101/phone                  192.168.101.101  D          2048     Unmonitored
3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline]
debian3*CLI> sip show registry
Host                            Username       Refresh State                Reg.Time
 Reloading SIP
[Dec  7 23:25:39] WARNING[23691]: chan_sip.c:12530 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'poltava' to '192.168.102.1'
debian3*CLI> quit
Executing last minute cleanups
/dev/pts/4
10:21:51
#ping 192.168.102.1
PING 192.168.102.1 (192.168.102.1) 56(84) bytes of data.
64 bytes from 192.168.102.1: icmp_seq=1 ttl=63 time=0.348 ms
^C
--- 192.168.102.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.348/0.348/0.348/0.000 ms
10:22:00
#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
=========================================================================
...
dialplan  dial
debian3*CLI> dialplan re
reload  remove
debian3*CLI> dialplan reload
Dialplan reloaded.
debian3*CLI> sip reload
 Reloading SIP
[Dec  7 23:22:59] NOTICE[23691]: chan_sip.c:14262 handle_request_invite: Unable to create/find SIP channel for this INVITE
[Dec  7 23:23:19] WARNING[23691]: chan_sip.c:1950 retrans_pkt: Maximum retries exceeded on transmission 2502a75d2d201eec4433d0e462e203d9@192.168.102.1 for seqno 104 (Critical Response)
debian3*CLI>
10:23:20
#vim sip.conf
--- /tmp/l3-saved-24178.1720.21961	2009-12-07 23:23:22.000000000 -1000
+++ sip.conf	2009-12-07 23:25:33.000000000 -1000
@@ -1,5 +1,6 @@
 [general]
 context=default
+register => poltava:1234@192.168.102.1/kiev 
 
 [101]
 username=phone
@@ -16,6 +17,6 @@
 
 [kiev]
 type=friend
-host=192.168.102.1
+host=dynamic
 ; secret=1234
 
/dev/pts/6
10:23:32
#cat extensions.conf
[default]
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 => _2XX,1,Dial(SIP/kiev/${EXTEN})
exten => 999,1,Answer
exten => 999,n,Echo()
/dev/pts/4
10:25:33
#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 = 23680)
Verbosity is at least 1
debian3*CLI> sip reload
 Reloading SIP
[Dec  7 23:25:39] WARNING[23691]: chan_sip.c:12530 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'poltava' to '192.168.102.1'
debian3*CLI> exit
Executing last minute cleanups
10:26:04
#vim sip.conf
10:26:59
#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> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
kiev/poltava               192.168.102.1    D          5060     Unmonitored
103/103                    192.168.101.102  D          31080    Unmonitored
101/phone                  192.168.101.101  D          2048     Unmonitored
3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline]
debian3*CLI> sip show registry
Host                            Username       Refresh State                Reg.Time
192.168.102.1:5060              poltava            105 Registered           Mon, 07 Dec 2009 23:27:57
debian3*CLI>
/dev/pts/8
10:27:03
#less /etc/asterisk/sip.conf
10:28:51
#asterisk -rvv
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 = 23680)
Verbosity was 1 and is now 2
debian3*CLI>
debian3*CLI>
debian3*CLI> sip show registry
Host                            Username       Refresh State                Reg.Time
192.168.102.1:5060              poltava            105 Registered           Mon, 07 Dec 2009 23:27:57
debian3*CLI> quit
Executing last minute cleanups
/dev/pts/6
10:29:09
#cat sip.conf
[general]
context=default
register => poltava:1234@192.168.102.1/kiev
[101]
username=phone
type=friend
host=dynamic
secret=123
callerid="gib-snom"
[103]
type=friend
host=dynamic
secret=123
callerid="GIB-win"
[kiev]
type=friend
host=dynamic
; secret=1234
/dev/pts/8
10:29:14
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-24852.31395.23562	2009-12-07 23:29:31.000000000 -1000
+++ /etc/asterisk/sip.conf	2009-12-07 23:29:47.000000000 -1000
@@ -18,5 +18,5 @@
 [kiev]
 type=friend
 host=dynamic
-; secret=1234
+secret=1234
 
/dev/pts/6
10:29:15
#cat sip.conf
[general]
context=default
register => poltava:1234@192.168.102.1/kiev
[101]
username=phone
type=friend
host=dynamic
secret=123
callerid="gib-snom"
[103]
type=friend
host=dynamic
secret=123
callerid="GIB-win"
[kiev]
type=friend
host=dynamic
secret=1234
call-limit=1
limitonpeers=yes
/dev/pts/4
10:29:48
#vim sip.conf
10:29:54
#[ ]
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 = 23680)
Verbosity is at least 2
debian3*CLI> sip reload
 Reloading SIP
  == Parsing '/etc/asterisk/sip.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
  == Parsing '/etc/asterisk/sip_notify.conf': Found
  == Spawn extension (default, 202, 1) exited non-zero on 'SIP/103-083dceb8'
  == Spawn extension (default, 102, 3) exited non-zero on 'SIP/poltava-083d7648'
debian3*CLI>
10:30:44
#vim sip.conf
--- /tmp/l3-saved-24178.8423.17332	2009-12-07 23:30:45.000000000 -1000
+++ sip.conf	2009-12-07 23:31:21.000000000 -1000
@@ -19,4 +19,5 @@
 type=friend
 host=dynamic
 secret=1234
-
+call-limit=1
+limitonpeers=yes
10:31:22
#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
=========================================================================
...
  == Spawn extension (default, 101, 2) exited non-zero on 'SIP/poltava-083ccef0'
  == Spawn extension (default, 101, 2) exited non-zero on 'SIP/poltava-083ccef0'
  == Spawn extension (default, 201, 1) exited non-zero on 'SIP/103-083ccef0'
[Dec  7 23:34:53] NOTICE[23691]: chan_sip.c:14262 handle_request_invite: Unable to create/find SIP channel for this INVITE
  == Spawn extension (default, 101, 2) exited non-zero on 'SIP/103-083d7648'
  == Spawn extension (default, 102, 3) exited non-zero on 'SIP/poltava-083ccef0'
  == Spawn extension (default, 102, 3) exited non-zero on 'SIP/poltava-083ccef0'
  == Spawn extension (default, 101, 2) exited non-zero on 'SIP/poltava-083ccef0'
  == Spawn extension (default, 102, 3) exited non-zero on 'SIP/poltava-083ccef0'
debian3*CLI>
10:36:29
#vim sip.conf
--- /tmp/l3-saved-24178.31449.27403	2009-12-07 23:37:28.000000000 -1000
+++ sip.conf	2009-12-07 23:37:45.000000000 -1000
@@ -19,5 +19,5 @@
 type=friend
 host=dynamic
 secret=1234
-call-limit=1
-limitonpeers=yes
+; call-limit=1
+; limitonpeers=yes
/dev/pts/6
10:37:05
#cat iax.conf
[general]
context=default
register => poltava:1234@192.168.102.1/kiev
[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
; tranking=yes
; call-limit=1
; limitonpeers=yes
/dev/pts/4
10:37:45
#vim sip.conf
10:39:06
#[103]

10:39:30
#echo 1 iax.conf
1 iax.conf
10:39:44
#echo 1 >iax.conf

10:39:49
#vim iax.conf
--- /tmp/l3-saved-24178.26300.20580	2009-12-07 23:39:56.000000000 -1000
+++ iax.conf	2009-12-07 23:40:23.000000000 -1000
@@ -1 +0,0 @@
-1
10:40:23
#cp sip.conf iax.conf

10:40:37
#vi iax.conf
10:40:57
#[101]
"iax.conf" 23L, 290C
type=friend
[kiev]
~
deny=0.0.0.0/0.0.0.0
allow=192.168.102.1/255.255.255.255
; tranking=yes
; call-limit=1
~
~
~
~
~
"iax.conf" 14L, 223C written
10:42: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
=========================================================================
...
[Dec  7 23:42:51] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
debian3*CLI> iax2 reload
  == Parsing '/etc/asterisk/iax.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
[Dec  7 23:43:04] WARNING[25332]: frame.c:1320 ast_parse_allow_disallow: Cannot allow unknown format '192.168.102.1/255.255.255.255'
[Dec  7 23:43:04] WARNING[25332]: frame.c:1320 ast_parse_allow_disallow: Cannot allow unknown format '192.168.102.1/255.255.255.255'
  == Parsing '/etc/asterisk/iaxprov.conf': Found
[Dec  7 23:43:26] NOTICE[23692]: chan_iax2.c:5511 register_verify: Host 192.168.102.1 denied access to register peer 'kiev'
debian3*CLI> quit
Executing last minute cleanups
10:43:30
#vi iax.conf
10:43:41
#[kiev]
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 = 23680)
Verbosity is at least 2
debian3*CLI> iax2 reload
  == Parsing '/etc/asterisk/iax.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
[Dec  7 23:43:44] WARNING[25359]: frame.c:1320 ast_parse_allow_disallow: Cannot allow unknown format '192.168.102.1/255.255.255.255'
[Dec  7 23:43:44] WARNING[25359]: frame.c:1320 ast_parse_allow_disallow: Cannot allow unknown format '192.168.102.1/255.255.255.255'
  == Parsing '/etc/asterisk/iaxprov.conf': Found
[Dec  7 23:43:51] NOTICE[23700]: chan_iax2.c:5511 register_verify: Host 192.168.102.1 denied access to register peer 'kiev'
debian3*CLI>
10:44:04
#vi iax.conf
--- /tmp/l3-saved-24178.13228.4918	2009-12-07 23:44:05.000000000 -1000
+++ iax.conf	2009-12-07 23:44:13.000000000 -1000
@@ -7,7 +7,7 @@
 host=dynamic
 secret=1234
 deny=0.0.0.0/0.0.0.0
-allow=192.168.102.1/255.255.255.255
+permit=192.168.102.1/255.255.255.255
 ; tranking=yes
 
 ; call-limit=1
10:44:13
#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
=========================================================================
...
users
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          Unmonitored
1 iax2 peers [0 online, 0 offline, 1 unmonitored]
debian3*CLI>
10:45:50
#vim extensions.conf
--- /tmp/l3-saved-24178.21704.15360	2009-12-07 23:46:03.000000000 -1000
+++ extensions.conf	2009-12-07 23:48:28.000000000 -1000
@@ -8,7 +8,8 @@
 exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
 exten => _1XX,n,Dial(SIP/${EXTEN})
 
-exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
+;exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _2XX,n,Dial(IAX2/kiev/${EXTEN})
 
 exten => 999,1,Answer
 exten => 999,n,Echo()
10:48:28
#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 = 23680)
Verbosity is at least 2
debian3*CLI> extensions reload\
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
[Dec  7 23:48:51] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  7 23:49:01] NOTICE[23691]: chan_sip.c:14035 handle_request_invite: Call from '103' to extension '202' rejected because extension not found.
debian3*CLI>
10:49:54
#vi iax.conf
--- /tmp/l3-saved-24178.31761.6129	2009-12-07 23:50:05.000000000 -1000
+++ iax.conf	2009-12-07 23:50:24.000000000 -1000
@@ -8,7 +8,7 @@
 secret=1234
 deny=0.0.0.0/0.0.0.0
 permit=192.168.102.1/255.255.255.255
-; tranking=yes
+trunk=yes
 
 ; call-limit=1
 ; limitonpeers=yes
10:50:24
#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 = 23680)
Verbosity is at least 2
debian3*CLI> iax2 reload
  == Parsing '/etc/asterisk/iax.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
[Dec  7 23:50:34] WARNING[25449]: chan_iax2.c:9628 build_user: Unable to support trunking on user 'kiev' without zaptel timing
[Dec  7 23:50:34] WARNING[25449]: chan_iax2.c:9370 build_peer: Unable to support trunking on peer 'kiev' without zaptel timing
  == Parsing '/etc/asterisk/iaxprov.conf': Found
10:50:36
#vim sip.conf
--- /tmp/l3-saved-24178.28752.4219	2009-12-07 23:52:59.000000000 -1000
+++ sip.conf	2009-12-07 23:57:29.000000000 -1000
@@ -1,6 +1,8 @@
 [general]
 context=default
 register => poltava:1234@192.168.102.1/kiev 
+register => nt:1234@xgu.ru/vpoltava
+
 
 [101]
 username=phone
@@ -21,3 +23,11 @@
 secret=1234
 ; call-limit=1
 ; limitonpeers=yes
+
+[vpoltava]
+username=nt
+nat=yes
+type=friend
+host=xgu.ru
+secret=1234
+
/dev/pts/10
10:50:54
#cd /var/log/asterisk/

/dev/pts/4
10:57:29
#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 = 23680)
Verbosity is at least 2
debian3*CLI> sip reload
 Reloading SIP
  == Parsing '/etc/asterisk/sip.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
  == Parsing '/etc/asterisk/sip_notify.conf': Found
[Dec  7 23:57:52] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
debian3*CLI>
10:57:55
#vim sip.conf
--- /tmp/l3-saved-24178.11897.13249	2009-12-07 23:57:56.000000000 -1000
+++ sip.conf	2009-12-07 23:58:02.000000000 -1000
@@ -1,7 +1,7 @@
 [general]
 context=default
 register => poltava:1234@192.168.102.1/kiev 
-register => nt:1234@xgu.ru/vpoltava
+; register => nt:1234@xgu.ru/vpoltava
 
 
 [101]
10:58:02
#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 = 23680)
Verbosity is at least 2
debian3*CLI> iax2 reload
  == Parsing '/etc/asterisk/iax.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
[Dec  7 23:58:05] WARNING[25565]: chan_iax2.c:9628 build_user: Unable to support trunking on user 'kiev' without zaptel timing
[Dec  7 23:58:05] WARNING[25565]: chan_iax2.c:9370 build_peer: Unable to support trunking on peer 'kiev' without zaptel timing
  == Parsing '/etc/asterisk/iaxprov.conf': Found
iax2 reload
10:58:07
#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
=========================================================================
...
Host                            Username       Refresh State                Reg.Time
xgu.ru:5060                     nt                 105 Registered           Mon, 07 Dec 2009 23:57:36
192.168.102.1:5060              poltava            105 Registered           Mon, 07 Dec 2009 23:57:36
debian3*CLI> sip reload
 Reloading SIP
  == Parsing '/etc/asterisk/sip.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
  == Parsing '/etc/asterisk/sip_notify.conf': Found
[Dec  8 00:00:52] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
debian3*CLI>
11:01: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 = 23680)
Verbosity is at least 2
debian3*CLI> sip reload
 Reloading SIP
  == Parsing '/etc/asterisk/sip.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
  == Parsing '/etc/asterisk/sip_notify.conf': Found
debian3*CLI>
11:01:57
#vim sip.conf
11:02:13
#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 = 23680)
Verbosity is at least 2
debian3*CLI>
11:02:16
#vim sip.conf
11:08:03
#[101]
exten => 102,n,Hangup
exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)})
exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
;exten => _2XX,n,Dial(IAX2/kiev/${EXTEN})
;exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
exten => _2XX,n,Dial(IAX2/kiev/${EXTEN})
~
~
~
~
~
"extensions.conf" 17L, 382C written
11:12:09
#vim sip.conf
11:12:24
#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
=========================================================================
...
[Dec  8 00:36:37] NOTICE[23691]: chan_sip.c:14262 handle_request_invite: Unable to create/find SIP channel for this INVITE
[Dec  8 00:36:54] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  8 00:39:54] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  8 00:42:54] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  8 00:45:54] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  8 00:48:54] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  8 00:51:54] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  8 00:54:54] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  8 00:57:55] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
debian3*CLI>
прошло 46 минут
11:58:36
#vim extensions.conf
--- /tmp/l3-saved-24178.18134.15168	2009-12-08 01:10:07.000000000 -1000
+++ extensions.conf	2009-12-08 01:17:31.000000000 -1000
@@ -11,6 +11,10 @@
 exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
 
 exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
+
+exten => 191,1,Dail(SIP/101,5)
+exten => 191,n,Dial(SIP/kiev/380503049607,3})
+
 ;exten => _2XX,n,Dial(IAX2/kiev/${EXTEN})
 
 exten => 999,1,Answer
прошло 18 минут
12:17:32
#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 = 23680)
Verbosity is at least 2
debian3*CLI> extensions reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
[Dec  8 01:17:49] WARNING[25752]: pbx.c:1832 pbx_extension_helper: No application 'Dail' for extension (default, 191, 1)
  == Spawn extension (default, 191, 1) exited non-zero on 'SIP/103-083da398'
debian3*CLI>
12:18:05
#vim extensions.conf
--- /tmp/l3-saved-24178.9686.26022	2009-12-08 01:18:07.000000000 -1000
+++ extensions.conf	2009-12-08 01:18:35.000000000 -1000
@@ -12,7 +12,7 @@
 
 exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
 
-exten => 191,1,Dail(SIP/101,5)
+exten => 191,1,Dial(SIP/101,5)
 exten => 191,n,Dial(SIP/kiev/380503049607,3})
 
 ;exten => _2XX,n,Dial(IAX2/kiev/${EXTEN})
12:18:35
#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 = 23680)
Verbosity is at least 2
debian3*CLI> extensions reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
[Dec  8 01:18:56] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
  == Spawn extension (default, 380503049607, 1) exited non-zero on 'SIP/103-083d7f98'
debian3*CLI> quit
Executing last minute cleanups
12:19:39
#vim extensions.conf
--- /tmp/l3-saved-24178.13284.29042	2009-12-08 01:19:40.000000000 -1000
+++ extensions.conf	2009-12-08 01:20:11.000000000 -1000
@@ -13,7 +13,7 @@
 exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
 
 exten => 191,1,Dial(SIP/101,5)
-exten => 191,n,Dial(SIP/kiev/380503049607,3})
+exten => 191,n,Dial(SIP/kiev/380503049607,10})
 
 ;exten => _2XX,n,Dial(IAX2/kiev/${EXTEN})
 
12:20:11
#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 = 23680)
Verbosity is at least 2
debian3*CLI> extensions reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
  == Spawn extension (default, 191, 2) exited non-zero on 'SIP/103-083da398'
[Dec  8 01:21:56] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
[Dec  8 01:24:56] NOTICE[23691]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103
debian3*CLI>
12:26:54
#vim extensions.conf
12:29:04
#[ ]
[101]friend
[101]dynamic
[101]
secret=123
[103]rid="GIB-win"
[103]
[103]
[103]]
[kiev]riend
[kiev]
...
                                                              24,1          10%
; call-limit=1
; limitonpeers=yes
[vpoltava]
[        ]
nat=yes
type=friend
host=xgu.ru
secret=1234
"sip.conf" 33L, 398C written
12:37:51
#apt-get install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libpcap0.8
The following NEW packages will be installed:
  libpcap0.8 nmap
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1143kB of archives.
After this operation, 3936kB of additional disk space will be used.
...
Get:2 http://10.0.35.1 lenny/main nmap 4.62-1 [1049kB]
Fetched 1143kB in 0s (5937kB/s)
Selecting previously deselected package libpcap0.8.
(Reading database ... 44541 files and directories currently installed.)
Unpacking libpcap0.8 (from .../libpcap0.8_0.9.8-5_i386.deb) ...
Selecting previously deselected package nmap.
Unpacking nmap (from .../archives/nmap_4.62-1_i386.deb) ...
Processing triggers for man-db ...
Setting up libpcap0.8 (0.9.8-5) ...
Setting up nmap (4.62-1) ...
прошло 30 минут
13:08:35
#nmap -P0 192.168.102.104
Starting Nmap 4.62 ( http://nmap.org ) at 2009-12-08 02:08 HST
All 1715 scanned ports on 192.168.102.104 are closed
Nmap done: 1 IP address (1 host up) scanned in 15.552 seconds
13:09:04
#ping 192.168.102.104
PING 192.168.102.104 (192.168.102.104) 56(84) bytes of data.
64 bytes from 192.168.102.104: icmp_seq=1 ttl=68 time=26.5 ms
64 bytes from 192.168.102.104: icmp_seq=2 ttl=68 time=44.8 ms
^C
--- 192.168.102.104 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1005ms
rtt min/avg/max/mdev = 26.563/35.715/44.868/9.154 ms
13:09:17
#nmap 192.168.102.104
Starting Nmap 4.62 ( http://nmap.org ) at 2009-12-08 02:09 HST
All 1715 scanned ports on 192.168.102.104 are closed
Nmap done: 1 IP address (1 host up) scanned in 15.166 seconds
13:09:53
#apt-get install zaptel zaptel-source
Reading package lists... Done
Building dependency tree
Reading state information... Done
zaptel is already the newest version.
zaptel-source is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
прошло 80 минут
/dev/pts/8
14:30:26
#lspci
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
00:03.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to CSA Bridge (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:01.0 Ethernet controller: Intel Corporation 82547EI Gigabit Ethernet Controller
02:02.0 Ethernet controller: Digium, Inc. Device 8001 (rev 11)
14:30:27
#apt-cache search zaptel
zaptel - zapata telephony utilities
zaptel-source - Zapata telephony interface (source code for kernel driver)
прошло 11 минут
14:41:47
#apt-get install zaptel
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  fxload
The following NEW packages will be installed:
  fxload zaptel
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 314kB of archives.
After this operation, 1159kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
14:41:58
#apt-get install zaptel zaptel-source
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  fxload
The following NEW packages will be installed:
  fxload zaptel zaptel-source
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1460kB of archives.
After this operation, 2519kB of additional disk space will be used.
...
Unpacking fxload (from .../fxload_0.0.20020411-1.1_i386.deb) ...
Selecting previously deselected package zaptel.
Unpacking zaptel (from .../zaptel_1%3a1.4.11~dfsg-3_i386.deb) ...
Selecting previously deselected package zaptel-source.
Unpacking zaptel-source (from .../zaptel-source_1%3a1.4.11~dfsg-3_all.deb) ...
Processing triggers for man-db ...
Setting up fxload (0.0.20020411-1.1) ...
Setting up zaptel (1:1.4.11~dfsg-3) ...
Zaptel telephony kernel driver: FATAL: Module ztdummy not found.
Setting up zaptel-source (1:1.4.11~dfsg-3) ...
14:42:07
#lspci
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
00:03.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to CSA Bridge (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:01.0 Ethernet controller: Intel Corporation 82547EI Gigabit Ethernet Controller
02:02.0 Ethernet controller: Digium, Inc. Device 8001 (rev 11)
/dev/pts/4
14:42:22
#lspci
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
00:03.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to CSA Bridge (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:01.0 Ethernet controller: Intel Corporation 82547EI Gigabit Ethernet Controller
02:02.0 Ethernet controller: Digium, Inc. Device 8001 (rev 11)
/dev/pts/8
14:44:20
#lspci -v
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
        Subsystem: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface
        Flags: bus master, fast devsel, latency 0
        Memory at f8000000 (32-bit, prefetchable) [size=64M]
        Capabilities: [e4] Vendor Specific Information <?>
        Kernel driver in use: agpgart-intel
        Kernel modules: intel-agp
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
        Subsystem: Intel Corporation Desktop Board D865GLC
        Flags: bus master, fast devsel, latency 0, IRQ 16
...
        Capabilities: [dc] Power Management version 2
        Kernel driver in use: e1000
        Kernel modules: e1000
02:02.0 Ethernet controller: Digium, Inc. Device 8001 (rev 11)
        Subsystem: Digium, Inc. Device 8001
        Flags: bus master, medium devsel, latency 32, IRQ 3
        I/O ports at b800 [size=256]
        Memory at ff8ffc00 (32-bit, non-prefetchable) [size=1K]
        Expansion ROM at 80000000 [disabled] [size=128K]
        Capabilities: [c0] Power Management version 2

Файлы

  • extensions.conf
  • iax.conf
  • sip.conf
  • extensions.conf
    >
    [default]
    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 => _2XX,1,Dial(SIP/kiev/${EXTEN})
    exten => 999,1,Answer
    exten => 999,n,Echo()
    
    iax.conf
    >
    [general]
    context=default
    register => poltava:1234@192.168.102.1/kiev
    [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
    ; tranking=yes
    ; call-limit=1
    ; limitonpeers=yes
    
    sip.conf
    >
    [general]
    context=default
    register => poltava:1234@192.168.102.1/kiev
    [101]
    username=phone
    type=friend
    host=dynamic
    secret=123
    callerid="gib-snom"
    [103]
    type=friend
    host=dynamic
    secret=123
    callerid="GIB-win"
    [kiev]
    type=friend
    host=dynamic
    secret=1234
    call-limit=1
    limitonpeers=yes
    

    Статистика

    Время первой команды журнала09:41:00 2009-12- 8
    Время последней команды журнала14:44:20 2009-12- 8
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 5.94
    Процент синтаксически неверно набранных команд, % 0.00
    Суммарное время работы с терминалом *, час 2.43
    Количество командных строк в единицу времени, команда/мин 0.69
    Частота использования команд
    vim29|============================| 28.43%
    asterisk25|========================| 24.51%
    vi6|=====| 5.88%
    cat6|=====| 5.88%
    screen4|===| 3.92%
    ping4|===| 3.92%
    lspci4|===| 3.92%
    apt-get4|===| 3.92%
    [3|==| 2.94%
    cd2|=| 1.96%
    nmap2|=| 1.96%
    echo2|=| 1.96%
    [101]2|=| 1.96%
    [kiev]2|=| 1.96%
    iax.conf1|| 0.98%
    cp1|| 0.98%
    [103]1|| 0.98%
    less1|| 0.98%
    ~1|| 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$