/l3/users/angell2807/nt-voip/linux2.unix.nt.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2996.17894.10228 2010-10-26 10:56:10.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 10:58:56.000000000 +0300 @@ -20,4 +20,5 @@ exten => 1298,1,Record(/tmp/warning1:gsm,,2) ; Запись в формате gsm в файл +; Николаев |
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-2996.10830.286 2010-10-26 10:59:02.000000000 +0300 +++ /etc/asterisk/sip.conf 2010-10-26 11:06:17.000000000 +0300 @@ -4,7 +4,13 @@ bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls - + +register => rv:1234@192.168.103.1/kv +register => rv:1234@192.168.101.1/nk +register => rv:1234@192.168.104.1/vn + + + [authentication] @@ -18,3 +24,24 @@ secret=1234 host=dynamic + +[kv] +type=friend +secret=1234 +host=dynamic +username=rv + + +[nk] +type=friend +secret=1234 +host=dynamic +username=rv + +[vn] +type=friend +secret=1234 +host=dynamic +username=rv + + |
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-2996.20986.29345 2010-10-26 11:11:30.000000000 +0300 +++ /etc/asterisk/sip.conf 2010-10-26 11:14:23.000000000 +0300 @@ -4,6 +4,9 @@ bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls + + +; Мы регимся на сервера другие register => rv:1234@192.168.103.1/kv register => rv:1234@192.168.101.1/nk @@ -25,6 +28,8 @@ host=dynamic +; Создаем клиентов + [kv] type=friend secret=1234 @@ -43,5 +48,5 @@ secret=1234 host=dynamic username=rv - +; End |
#echo $TERM
xterm |
#w
11:34:34 up 2:03, 3 users, load average: 0,06, 0,02, 0,00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT admina tty7 :0 09:37 0.00s 58.47s 0.18s x-session-manager admina pts/0 :0.0 09:42 0.00s 0.98s 18.52s gnome-terminal admina pts/2 :0.0 09:47 1:46m 0.70s 0.42s ssh root@192.168.108.1 |
#ls
|
#w
11:36:21 up 2:04, 4 users, load average: 0,10, 0,05, 0,01 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT admina tty7 :0 09:37 0.00s 1:10 0.18s x-session-manager admina pts/0 :0.0 09:42 0.00s 0.98s 19.46s gnome-terminal admina pts/2 :0.0 09:47 1:48m 0.70s 0.42s ssh root@192.168.108.1 admina pts/3 :0.0 11:35 48.00s 0.30s 19.46s gnome-terminal |
#l3-
l3-agent l3-config |
#l3-
l3-agent l3-config |
#l3-
l3-agent l3-config |
#l3-agent
l3-agent is already running: pid=2964; pidfile=/root/.lilalo/l3-agent.pid |
#w
11:39:37 up 2:08, 4 users, load average: 0,31, 0,18, 0,06 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT admina tty7 :0 09:37 0.00s 1:37 0.18s x-session-manager admina pts/0 :0.0 09:42 0.00s 0.98s 20.42s gnome-terminal admina pts/2 :0.0 09:47 1:51m 0.70s 0.42s ssh root@192.168.108.1 admina pts/3 :0.0 11:38 27.00s 0.30s 20.42s gnome-terminal |
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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 ========================================================================= ... [Oct 26 11:43:34] NOTICE[2586]: chan_sip.c:14441 handle_request_invite: Call from '1201' to extension '1101' rejected because extension not found. [Oct 26 11:43:44] NOTICE[2586]: chan_sip.c:14441 handle_request_invite: Call from '1201' to extension '1401' rejected because extension not found. [Oct 26 11:44:20] WARNING[2586]: chan_sip.c:8505 check_auth: username mismatch, have <kv>, digest has <rv> [Oct 26 11:44:20] NOTICE[2586]: chan_sip.c:14377 handle_request_invite: Failed to authenticate user "1301" <sip:1301@192.168.103.1>;tag=as3307218a [Oct 26 11:44:27] NOTICE[2586]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 11:45:24] NOTICE[2586]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 11:46:26] NOTICE[2586]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 11:46:33] NOTICE[2586]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 linux2*CLI> exit Executing last minute cleanups |
#~ [ ]
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.10529.12290 2010-10-26 11:49:02.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 11:53:03.000000000 +0300 @@ -21,4 +21,10 @@ exten => 1298,1,Record(/tmp/warning1:gsm,,2) ; Запись в формате gsm в файл ; Николаев +exten => _11XX,1,Dial(SIP/nk/${EXTEN}) +exten => _13XX,1,Dial(SIP/kv/${EXTEN}) +exten => _14XX,1,Dial(SIP/vn/${EXTEN}) + +exten => _1XXX,1,Dial(SIP/kv/${EXTEN}) +exten => _2XXX,1,Dial(SIP/kv/${EXTEN}) |
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4299.1290.168 2010-10-26 12:01:36.000000000 +0300 +++ /etc/asterisk/sip.conf 2010-10-26 12:02:12.000000000 +0300 @@ -27,6 +27,7 @@ type=friend secret=1234 host=dynamic +callerid="Igor Softphone(Rivne)" ; Создаем клиентов |
#l3-agent
l3-agent is already running: pid=2964; pidfile=/root/.lilalo/l3-agent.pid |
#cd .lilalo/
|
#l
итого 2804 -rw-r--r-- 1 root root 1896 Окт 25 15:14 10031284742177121697-1288008787.info -rw-r--r-- 1 root root 137 Окт 25 15:13 10031284742177121697-1288008787.script -rw-r--r-- 1 root root 2154 Окт 25 18:01 103508468128211907-1288018164.info -rw-r--r-- 1 root root 4363 Окт 25 18:01 103508468128211907-1288018164.script -rw-r--r-- 1 root root 1896 Окт 25 15:01 18652243651465832478-1288008029.info -rw-r--r-- 1 root root 137 Окт 25 15:00 18652243651465832478-1288008029.script -rw-r--r-- 1 root root 0 Окт 25 17:52 2028763452464028118-1288018167_1288018321_etc_asterisk_extensions.conf.diff -rw-r--r-- 1 root root 284 Окт 25 17:56 2028763452464028118-1288018167_1288018382_etc_asterisk_extensions.conf.diff -rw-r--r-- 1 root root 3257 Окт 25 18:01 2028763452464028118-1288018167.info ... -rw-r--r-- 1 root root 0 Окт 26 11:55 919523642957032506-1288082821_1288083288_etc_asterisk_extensions.conf.diff -rw-r--r-- 1 root root 240 Окт 26 12:01 919523642957032506-1288082821_1288083607_etc_asterisk_sip.conf.diff -rw-r--r-- 1 root root 262 Окт 26 12:02 919523642957032506-1288082821_1288083696_etc_asterisk_sip.conf.diff -rw-r--r-- 1 root root 1863 Окт 26 12:05 919523642957032506-1288082821.info -rw-r--r-- 1 root root 100814 Окт 26 12:05 919523642957032506-1288082821.script -rw-r--r-- 1 root root 4 Окт 26 09:42 l3-agent.pid -rw-r--r-- 1 root root 7709 Окт 25 14:20 l3bashrc -rwxr-xr-x 1 root root 234 Окт 25 14:20 l3prompt -rw-r--r-- 1 root root 735 Окт 26 12:05 .report.dat -rw-r--r-- 1 root root 0 Окт 26 12:05 report.xml |
#cd /etc/asterisk/
|
#apt-cache search zaptel source
zaptel-source - Zapata telephony interface (source code for kernel driver) |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.5133.31953 2010-10-26 12:34:13.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 12:35:58.000000000 +0300 @@ -31,3 +31,8 @@ exten => _1XXX,1,Dial(SIP/kv/${EXTEN}) exten => _2XXX,1,Dial(SIP/kv/${EXTEN}) + +[grup1] + +exten => 1201,1,Dial(SIP/1201) + |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.16808.17708 2010-10-26 12:36:32.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 12:37:30.000000000 +0300 @@ -34,5 +34,5 @@ [grup1] -exten => 1201,1,Dial(SIP/1201) +exten => 1202,1,Dial(SIP/1202) |
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4299.4128.20536 2010-10-26 12:37:41.000000000 +0300 +++ /etc/asterisk/sip.conf 2010-10-26 12:38:36.000000000 +0300 @@ -28,7 +28,7 @@ secret=1234 host=dynamic callerid="Igor Softphone(Rivne)" - +context=grup1 ; Создаем клиентов |
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4299.389.19082 2010-10-26 12:40:03.000000000 +0300 +++ /etc/asterisk/sip.conf 2010-10-26 12:40:35.000000000 +0300 @@ -22,6 +22,7 @@ secret=1234 host=dynamic callerid="Igor (Rivne)" +context=grup2 [1202] type=friend |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.9693.10398 2010-10-26 12:40:37.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 12:48:41.000000000 +0300 @@ -23,16 +23,35 @@ exten => 1298,1,Record(/tmp/warning1:gsm,,2) ; Запись в формате gsm в файл + +[local] +exten => _12XX,1,Dial(SIP/${EXTEN},10) + + + + +[national] ; Николаев exten => _11XX,1,Dial(SIP/nk/${EXTEN}) exten => _13XX,1,Dial(SIP/kv/${EXTEN}) exten => _14XX,1,Dial(SIP/vn/${EXTEN}) + +[international] exten => _1XXX,1,Dial(SIP/kv/${EXTEN}) exten => _2XXX,1,Dial(SIP/kv/${EXTEN}) [grup1] - exten => 1202,1,Dial(SIP/1202) +include => local +include => national +include => international + +[grup1] + +exten => 1201,1,Dial(SIP/1201) +include => local +include => national + |
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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 ========================================================================= ... -- Added extension '_2XXX' priority 1 to international -- Registered extension context 'grup1' -- Added extension '1202' priority 1 to grup1 -- Including context 'local' in context 'grup1' -- Including context 'national' in context 'grup1' -- Including context 'international' in context 'grup1' -- Added extension '1201' priority 1 to grup1 [Oct 26 12:48:49] WARNING[4934]: pbx_config.c:2320 pbx_load_config: Unable to include context 'local' in context 'grup1' [Oct 26 12:48:49] WARNING[4934]: pbx_config.c:2320 pbx_load_config: Unable to include context 'national' in context 'grup1' == Parsing '/etc/asterisk/users.conf': Found |
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.1833.27819 2010-10-26 12:50:25.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 12:50:57.000000000 +0300 @@ -23,7 +23,7 @@ exten => 1298,1,Record(/tmp/warning1:gsm,,2) ; Запись в формате gsm в файл - +;;Ресурсы [local] exten => _12XX,1,Dial(SIP/${EXTEN},10) @@ -41,7 +41,7 @@ exten => _1XXX,1,Dial(SIP/kv/${EXTEN}) exten => _2XXX,1,Dial(SIP/kv/${EXTEN}) - +;; Пользователя [grup1] exten => 1202,1,Dial(SIP/1202) include => local |
#~
28 exten => _12XX,1,Dial(SIP/${EXTEN},10) 29 30 31 c/asterisk/extensions.conf" 57L, 1171C 32 33 [national] 34 ; Николаев 35 exten => _11XX,1,Dial(SIP/nk/${EXTEN}) 36 exten => _13XX,1,Dial(SIP/kv/${EXTEN}) 37 exten => _14XX,1,Dial(SIP/vn/${EXTEN}) ... 48 include => national 49 include => international 50 51 [grup1] 52 53 exten => 1201,1,Dial(SIP/1201) 54 include => local 55 include => national 56 57 |
#~ [ ]
Asterisk 1.4.21.2~dfsg-3+lenny1, 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+lenny1 currently running on linux2 (pid = 2541) Verbosity is at least 3 [Oct 26 12:53:40] NOTICE[2586]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 linux2*CLI> |
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.10656.17394 2010-10-26 12:56:24.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 12:57:35.000000000 +0300 @@ -42,7 +42,7 @@ exten => _2XXX,1,Dial(SIP/kv/${EXTEN}) ;; Пользователя -[grup1] +[grup2] exten => 1202,1,Dial(SIP/1202) include => local include => national |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.3815.2860 2010-10-26 12:58:16.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 12:58:53.000000000 +0300 @@ -53,5 +53,6 @@ exten => 1201,1,Dial(SIP/1201) include => local include => national +include => international |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.15844.66 2010-10-26 12:59:14.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 13:00:24.000000000 +0300 @@ -53,6 +53,6 @@ exten => 1201,1,Dial(SIP/1201) include => local include => national -include => international - +[grup3] +include => local |
#vi /etc/asterisk/sip.conf
|
#~ [ ]
Asterisk 1.4.21.2~dfsg-3+lenny1, 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+lenny1 currently running on linux2 (pid = 2541) Verbosity is at least 3 linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> |
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.15001.13675 2010-10-26 13:48:03.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 13:49:17.000000000 +0300 @@ -43,14 +43,14 @@ ;; Пользователя [grup2] -exten => 1202,1,Dial(SIP/1202) +;exten => 1202,1,Dial(SIP/1202) include => local include => national include => international [grup1] -exten => 1201,1,Dial(SIP/1201) +;exten => 1201,1,Dial(SIP/1201) include => local include => national |
#vi /etc/asterisk/sip.conf
|
#~ [ ]
|
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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/vn-0930bbb8 is ringing -- SIP/vn-0930bbb8 answered SIP/1201-093015b8 -- Native bridging SIP/1201-093015b8 and SIP/vn-0930bbb8 == Spawn extension (grup2, 1401, 1) exited non-zero on 'SIP/1201-093015b8' [Oct 26 14:01:14] NOTICE[2586]: chan_sip.c:14668 handle_request_invite: Unable to create/find SIP channel for this INVITE linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> exit Executing last minute cleanups |
#vi /etc/asterisk/sip.conf
|
#~ [ ]
31 c/asterisk/extensions.conf" 58L, 1197C 32 33 [national] 34 ; Николаев 35 exten => _11XX,1,Dial(SIP/nk/${EXTEN}) 36 exten => _13XX,1,Dial(SIP/kv/${EXTEN}) 37 exten => _14XX,1,Dial(SIP/vn/${EXTEN}) 38 39 40 [international] ... 51 [grup2] 52 53 ;exten => 1201,1,Dial(SIP/1201) 54 [grup1] => local 55 include => national 56 57 [grup3] 58 include => local ~ ~ ZZ 58,1 Весь |
#~ [ ]
|
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4299.18063.5043 2010-10-26 14:02:59.000000000 +0300 +++ /etc/asterisk/sip.conf 2010-10-26 14:03:56.000000000 +0300 @@ -38,6 +38,7 @@ secret=1234 host=dynamic username=rv +context=grup3 [nk] @@ -45,11 +46,13 @@ secret=1234 host=dynamic username=rv +context=grup3 [vn] type=friend secret=1234 host=dynamic username=rv +context=grup3 ; End |
#vi /etc/asterisk/extensions.conf
|
#~ [ ]
Asterisk 1.4.21.2~dfsg-3+lenny1, 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 vn/1401 -- SIP/vn-0931a328 is ringing -- SIP/1201-0930bbb8 is ringing -- SIP/1201-0930bbb8 is ringing -- SIP/1201-0930bbb8 is ringing -- SIP/1201-0930bbb8 is ringing -- Nobody picked up in 10000 ms == Auto fallthrough, channel 'SIP/rv-09305f28' status is 'NOANSWER' == Spawn extension (grup2, 1401, 1) exited non-zero on 'SIP/1201-093163b0' linux2*CLI> |
#vi /etc/asterisk/extensions.conf
|
#~ [ ]
29 30 31 c/asterisk/extensions.conf" 58L, 1197C 32 33 [national] 34 ; Николаев 35 exten => _11XX,1,Dial(SIP/nk/${EXTEN}) 36 exten => _13XX,1,Dial(SIP/kv/${EXTEN}) 37 exten => _14XX,1,Dial(SIP/vn/${EXTEN}) 38 ... 49 include => international 50 51 [grup1] 52 53 ;exten => 1201,1,Dial(SIP/1201) 54 include => local 55 include => national 56 57 [grup3] 58 include => local |
#~ [ ]
|
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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 (grup3, 1201, 1) exited non-zero on 'SIP/rv-09300028' -- Got SIP response 503 "Unavailable" back from 192.168.103.1 -- Executing [1301@grup2:1] Dial("SIP/1201-09305f28", "SIP/kv/1301") in new stack -- Called kv/1301 -- SIP/kv-0930bbb8 is ringing -- SIP/kv-0930bbb8 answered SIP/1201-09305f28 -- Native bridging SIP/1201-09305f28 and SIP/kv-0930bbb8 == Spawn extension (grup2, 1301, 1) exited non-zero on 'SIP/1201-09305f28' [Oct 26 14:15:08] NOTICE[2586]: chan_sip.c:14668 handle_request_invite: Unable to create/find SIP channel for this INVITE linux2*CLI> |
#vi /etc/asterisk/extensions.conf
|
#apt-get install tcpdump
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Будут установлены следующие дополнительные пакеты: libpcap0.8 НОВЫЕ пакеты, которые будут установлены: libpcap0.8 tcpdump обновлено 0, установлено 2 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 400kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 848kB. ... Получено:2 http://10.0.35.1 lenny/main tcpdump 3.9.8-4 [306kB] Получено 400kБ за 0s (6429kБ/c) Выбор ранее не выбранного пакета libpcap0.8. (Чтение базы данных... на данный момент установлено 100698 файлов и каталогов.) Распаковывается пакет libpcap0.8 (из файла .../libpcap0.8_0.9.8-5_i386.deb)... Выбор ранее не выбранного пакета tcpdump. Распаковывается пакет tcpdump (из файла .../tcpdump_3.9.8-4_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет libpcap0.8 (0.9.8-5) ... Настраивается пакет tcpdump (3.9.8-4) ... |
#tcpdump -e eth0 ! host 192.168.108.1
tcpdump: syntax error |
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4299.30918.26246 2010-10-26 14:18:49.000000000 +0300 +++ /etc/asterisk/sip.conf 2010-10-26 14:19:09.000000000 +0300 @@ -8,7 +8,7 @@ ; Мы регимся на сервера другие -register => rv:1234@192.168.103.1/kv +;register => rv:1234@192.168.103.1/kv register => rv:1234@192.168.101.1/nk register => rv:1234@192.168.104.1/vn |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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/vn-09300028 is ringing -- SIP/vn-09300028 answered SIP/1201-09305f28 -- Native bridging SIP/1201-09305f28 and SIP/vn-09300028 == Spawn extension (grup2, 1401, 1) exited non-zero on 'SIP/1201-09305f28' [Oct 26 14:19:58] NOTICE[2586]: chan_sip.c:14668 handle_request_invite: Unable to create/find SIP channel for this INVITE linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> |
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4299.1627.21520 2010-10-26 14:20:09.000000000 +0300 +++ /etc/asterisk/sip.conf 2010-10-26 14:20:24.000000000 +0300 @@ -8,7 +8,7 @@ ; Мы регимся на сервера другие -;register => rv:1234@192.168.103.1/kv +register => rv:1234@192.168.103.1/kv register => rv:1234@192.168.101.1/nk register => rv:1234@192.168.104.1/vn |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.7841.2264 2010-10-26 14:20:34.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 14:20:51.000000000 +0300 @@ -46,7 +46,7 @@ ;exten => 1202,1,Dial(SIP/1202) include => local include => national -include => international +;include => international [grup1] |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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 ========================================================================= ... linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> [Oct 26 14:28:09] NOTICE[2586]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 linux2*CLI> |
#tcpdump -i eth0 ! host 192.168.108.1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 14:21:51.816358 arp who-has linux2.local (00:13:d4:b2:47:f9 (oui Unknown)) tell 192.168.102.2 14:21:57.161352 arp reply linux2.local is-at 00:13:d4:b2:47:f9 (oui Unknown) 14:21:51.817176 IP linux2.local.35422 > 10.0.35.1.domain: 61106+ PTR? 1.102.168.192.in-addr.arpa. (44) 14:21:51.981079 IP 10.0.35.1.domain > linux2.local.35422: 61106 NXDomain 0/1/0 (121) 14:21:52.085013 IP6 fe80::213:d4ff:feb2:47f9.mdns > ff02::fb.mdns: 0[|domain] ^C14:21:52.085101 IP linux2.local.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 1.102.168.192.in-addr.arpa. (44) 6 packets captured 605 packets received by filter 358 packets dropped by kernel |
#tcpdump -n -i eth0 ! host 192.168.108.1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 14:22:17.057759 IP 192.168.102.2.13666 > 192.168.102.1.5060: SIP, length: 4 14:22:24.654658 IP 209.85.135.19.80 > 192.168.102.1.57501: P 1699227581:1699227609(28) ack 3446618918 win 222 <nop,nop,timestamp 1373688367 4281865> 14:22:24.654701 IP 192.168.102.1.57501 > 209.85.135.19.80: . ack 28 win 125 <nop,nop,timestamp 4288228 1373688367> 14:22:27.853967 IP 192.168.103.1.5060 > 192.168.102.1.5060: SIP, length: 543 14:22:27.854176 IP 192.168.102.1.5060 > 192.168.103.1.5060: SIP, length: 433 14:22:27.854218 IP 192.168.102.1.5060 > 192.168.103.1.5060: SIP, length: 497 14:22:27.855161 IP 192.168.103.1.5060 > 192.168.102.1.5060: SIP, length: 543 14:22:27.855270 IP 192.168.102.1.5060 > 192.168.103.1.5060: SIP, length: 433 ... 14:22:52.317959 IP 192.168.104.201.5004 > 192.168.102.1.17366: UDP, length 172 14:22:52.318151 IP 192.168.102.1.11508 > 192.168.102.100.51974: UDP, length 45 14:22:52.337725 IP 192.168.104.201.5004 > 192.168.102.1.17366: UDP, length 172 14:22:52.337941 IP 192.168.102.1.11508 > 192.168.102.100.51974: UDP, length 45 14:22:52.357864 IP 192.168.104.201.5004 > 192.168.102.1.17366: UDP, length 172 14:22:52.358056 IP 192.168.102.1.11508 > 192.168.102.100.51974: UDP, length 45 ^C 598 packets captured 598 packets received by filter 0 packets dropped by kernel |
#iptables
iptables iptables-apply iptables-restore iptables-save iptables-xml |
#iptables
iptables iptables-apply iptables-restore iptables-save iptables-xml |
#iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#~ [ ]
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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/1201-09976250 answered SIP/rv-0996b348 -- Packet2Packet bridging SIP/rv-0996b348 and SIP/1201-09976250 == Spawn extension (grup3, 1201, 1) exited non-zero on 'SIP/rv-0996b348' -- Executing [1301@grup2:1] Dial("SIP/1201-0996b348", "SIP/kv/1301") in new stack -- Called kv/1301 -- SIP/kv-0996c8d8 is ringing -- SIP/kv-0996c8d8 answered SIP/1201-0996b348 -- Packet2Packet bridging SIP/1201-0996b348 and SIP/kv-0996c8d8 == Spawn extension (grup2, 1301, 1) exited non-zero on 'SIP/1201-0996b348' linux2*CLI> |
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4299.32095.32029 2010-10-26 14:38:47.000000000 +0300 +++ /etc/asterisk/sip.conf 2010-10-26 14:39:51.000000000 +0300 @@ -4,7 +4,7 @@ bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls -canreinvite=no +canreinvite=no ; Звонок через asterisk - очень нужен ; Мы регимся на сервера другие |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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+lenny1 currently running on linux2 (pid = 6406) Verbosity is at least 4 [Oct 26 14:44:42] NOTICE[6436]: chan_sip.c:14441 handle_request_invite: Call from '1201' to extension '1501' rejected because extension not found. [Oct 26 14:45:30] NOTICE[6436]: chan_sip.c:14441 handle_request_invite: Call from '1201' to extension '1801' rejected because extension not found. linux2*CLI> |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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 ========================================================================= ... func_db.so func_devstate.so func_enum.so func_env.so func_global.so func_groupcount.so func_language.so func_logic.so func_math.so func_md5.so func_moh.so func_odbc.so func_rand.so func_realtime.so func_sha1.so func_strings.so func_timeout.so func_uri.so pbx_ael.so pbx_config.so pbx_dundi.so pbx_loopback.so pbx_realtime.so pbx_spool.so res_adsi.so res_agi.so res_clioriginate.so res_config_odbc.so res_config_pgsql.so res_convert.so res_crypto.so res_esel.so res_features.so res_indications.so res_jabber.so res_monitor.so res_musiconhold.so res_odbc.so res_smdi.so res_snmp.so res_speech.so res_watchdog.so app_nbscat.so [Oct 26 15:12:01] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 linux2*CLI> |
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.13770.15899 2010-10-26 15:22:17.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 15:27:23.000000000 +0300 @@ -23,6 +23,13 @@ exten => 1298,1,Record(/tmp/warning1:gsm,,2) ; Запись в формате gsm в файл +[macro-dial-with-callerid] +exten => _.,s,Set(CALLERID(name)="${CALLERID(name)} (Rivne)" +exten => _.,n,Dial(${ARG1}) + + + + ;;Ресурсы [local] exten => _12XX,1,Dial(SIP/${EXTEN},10) @@ -32,7 +39,8 @@ [national] ; Николаев -exten => _11XX,1,Dial(SIP/nk/${EXTEN}) +exten => _11XX,1,Macro(dial-with-callerid, SIP/ptr/${EXTEN}) +;exten => _11XX,1,Dial(SIP/nk/${EXTEN}) exten => _13XX,1,Dial(SIP/kv/${EXTEN}) exten => _14XX,1,Dial(SIP/vn/${EXTEN}) |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.3202.24238 2010-10-26 15:27:54.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 15:28:17.000000000 +0300 @@ -24,9 +24,11 @@ exten => 1298,1,Record(/tmp/warning1:gsm,,2) ; Запись в формате gsm в файл [macro-dial-with-callerid] -exten => _.,s,Set(CALLERID(name)="${CALLERID(name)} (Rivne)" -exten => _.,n,Dial(${ARG1}) +;exten => _.,s,Set(CALLERID(name)="${CALLERID(name)} (Rivne)" +;exten => _.,n,Dial(${ARG1}) +exten => s,1,Set(CALLERID(name)="${CALLERID(name)} (Tula)") +exten => s,n,Dial(${ARG1}) |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.21244.14733 2010-10-26 15:29:41.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 15:30:15.000000000 +0300 @@ -41,7 +41,7 @@ [national] ; Николаев -exten => _11XX,1,Macro(dial-with-callerid, SIP/ptr/${EXTEN}) +exten => _11XX,1,Macro(dial-with-callerid,SIP/nk/${EXTEN}) ;exten => _11XX,1,Dial(SIP/nk/${EXTEN}) exten => _13XX,1,Dial(SIP/kv/${EXTEN}) exten => _14XX,1,Dial(SIP/vn/${EXTEN}) |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4299.5110.6441 2010-10-26 15:30:37.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-26 15:31:47.000000000 +0300 @@ -27,7 +27,7 @@ ;exten => _.,s,Set(CALLERID(name)="${CALLERID(name)} (Rivne)" ;exten => _.,n,Dial(${ARG1}) -exten => s,1,Set(CALLERID(name)="${CALLERID(name)} (Tula)") +exten => s,1,Set(CALLERID(name)="${CALLERID(name)} (Rivne)") exten => s,n,Dial(${ARG1}) @@ -43,8 +43,10 @@ ; Николаев exten => _11XX,1,Macro(dial-with-callerid,SIP/nk/${EXTEN}) ;exten => _11XX,1,Dial(SIP/nk/${EXTEN}) -exten => _13XX,1,Dial(SIP/kv/${EXTEN}) -exten => _14XX,1,Dial(SIP/vn/${EXTEN}) +;exten => _13XX,1,Dial(SIP/kv/${EXTEN}) +;exten => _14XX,1,Dial(SIP/vn/${EXTEN}) +exten => _13XX,1,Macro(dial-with-callerid,SIP/kv/${EXTEN}) +exten => _14XX,1,Macro(dial-with-callerid,SIP/vn/${EXTEN}) [international] |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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 ========================================================================= ... [Oct 26 15:36:23] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 15:39:26] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 15:42:29] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 15:45:32] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 15:48:35] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 15:51:38] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 15:54:41] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 15:57:44] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 [Oct 26 16:00:47] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 linux2*CLI> |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:d4:b2:47:f9 inet addr:192.168.102.1 Bcast:192.168.102.255 Mask:255.255.255.0 inet6 addr: fe80::213:d4ff:feb2:47f9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:62559 errors:0 dropped:0 overruns:0 frame:0 TX packets:56493 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:21600957 (20.6 MiB) TX bytes:9340750 (8.9 MiB) Memory:cffe0000-d0000000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:75 errors:0 dropped:0 overruns:0 frame:0 TX packets:75 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6455 (6.3 KiB) TX bytes:6455 (6.3 KiB) |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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+lenny1 currently running on linux2 (pid = 6406) Verbosity is at least 4 [Oct 26 16:03:50] NOTICE[6436]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1202 -- Executing [2001@grup2:1] Dial("SIP/1201-0996a350", "SIP/kv/2001") in new stack -- Called kv/2001 -- Got SIP response 503 "Service Unavailable" back from 192.168.103.1 -- SIP/kv-09966418 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) == Auto fallthrough, channel 'SIP/1201-0996a350' status is 'CONGESTION' linux2*CLI> |
#vi /etc/asterisk/extensions.conf
|
# 60 [ype=fri]nd
9 ;exten => _12XX,1,Dial(SIP/1201) 10 exten => _12XX,1,Dial(SIP/${EXTEN},10) 11 exten => _1201,n,Dial(SIP/1202,20) 12 13 14 exten => _12XXX,1,Dial(SIP/${EXTEN:0:4}) ; Используем только первые 4 цифры - 5-тую отбрасываем 15 exten => _12XXX,1,Dial(SIP/1${EXTEN:1:4}) 16 17 18 exten => _62XX,1,Wait(2) ... 62 63 [grup1] [grup1] 65 ;exten => 1201,1,Dial(SIP/1201) 66 include => local 67 include => national 68 69 [grup3] [grup3] 64 69,1 90% |
# 70 include => local
|
#vi /etc/asterisk/sip.conf
|
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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 ========================================================================= ... linux2*CLI> linux2*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': Found == Parsing '/etc/asterisk/users.conf': Found == Parsing '/etc/asterisk/sip_notify.conf': Found linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> |
#ps -ax
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html PID TTY STAT TIME COMMAND 1 ? Ss 0:01 init [2] 2 ? S< 0:00 [kthreadd] 3 ? S< 0:00 [migration/0] 4 ? S< 0:00 [ksoftirqd/0] 5 ? S< 0:00 [watchdog/0] 6 ? S< 0:02 [events/0] 7 ? S< 0:00 [khelper] 39 ? S< 0:00 [kblockd/0] ... 4260 pts/0 S+ 0:00 script -f -c bash -q /root/.lilalo//919523642957032506-1288082821.script 4298 pts/0 R+ 0:00 script -f -c bash -q /root/.lilalo//919523642957032506-1288082821.script 4299 pts/1 Ss 0:02 bash 6406 ? Ssl 0:02 /usr/sbin/asterisk -p -U asterisk 6620 ? S 0:00 /usr/lib/notification-daemon/notification-daemon 6716 ? S 0:00 /usr/lib/gnome-applets/gnome-keyboard-applet --oaf-activate-iid=OAFIID:GNOME_KeyboardApplet_Factory --oaf-ior-fd=23 6720 ? S 0:02 /usr/lib/gnome-netstatus/gnome-netstatus-applet --oaf-activate-iid=OAFIID:GNOME_NetstatusApplet_Factory --oaf-ior-fd=24 6724 ? S 0:02 /usr/lib/gnome-applets/gweather-applet-2 --oaf-activate-iid=OAFIID:GNOME_GWeatherApplet_Factory --oaf-ior-fd=25 6782 ? Sl 0:00 /usr/lib/evolution/2.22/evolution-exchange-storage --oaf-activate-iid=OAFIID:GNOME_Evolution_Exchange_Connector_BookFactory:1.2 --oaf-ior-fd=31 7473 pts/1 R+ 0:00 ps -ax |
#ps -ax | ek
bash: ek: команда не найдена Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html |
#ps -ax | grep ek
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html 7491 pts/1 S+ 0:00 grep ek |
#ps -ax | less
|
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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 ========================================================================= ... linux2*CLI> manager show user users user linux2*CLI> manager show user users user linux2*CLI> manager show user users user linux2*CLI> linux2*CLI> linux2*CLI> linux2*CLI> |
#apt-get install bind9
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Будут установлены следующие дополнительные пакеты: bind9utils Предлагаемые пакеты: bind9-doc resolvconf ufw НОВЫЕ пакеты, которые будут установлены: bind9 bind9utils обновлено 0, установлено 2 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. ... Настраивается пакет bind9utils (1:9.6.ESV.R1+dfsg-0+lenny2) ... Настраивается пакет bind9 (1:9.6.ESV.R1+dfsg-0+lenny2) ... Добавляется группа `bind' (GID 117) ... Готово. Добавляется системный пользователь `bind' (UID 109) ... Добавляется новый пользователь `bind' (UID 109) в группу `bind' ... Не создаётся домашний каталог `/var/cache/bind'. wrote key file "/etc/bind/rndc.key" # Starting domain name service...: bind9. |
#vi /etc/bind/named.conf
--- /tmp/l3-saved-4299.1926.29394 2010-10-26 16:39:10.000000000 +0300 +++ /etc/bind/named.conf 2010-10-26 16:40:38.000000000 +0300 @@ -37,4 +37,11 @@ file "/etc/bind/db.255"; }; + +zone "rv.unix.nt" { + type master; + file "/etc/bind/rv.unix.nt"; +}; + + include "/etc/bind/named.conf.local"; |
#>> /etc/bind/rv.unix.ua
|
#vi /etc/bind/rv.unix.ua
--- /tmp/l3-saved-4299.30755.8599 2010-10-26 16:41:28.000000000 +0300 +++ /etc/bind/rv.unix.ua 2010-10-26 16:44:35.000000000 +0300 @@ -0,0 +1,10 @@ +$TTL 3600 +@ SOA linux2.unix.nt. root ( + 1 ; версия + 7200 ; обновлять + 900 ; повтор + 9000 ; устаревание + 3600) ; максимальное время ж. отрицательного TTL + MX 10 linux2.unix.nt. + A 192.168.102.1 + |
#vi /etc/bind/named.conf
|
#vi /etc/bind/named.conf
|
Время первой команды журнала | 09:54:32 2010-10-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:44:35 2010-10-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 0.99 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 5.06 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.33 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008