/l3/users/maxim/ais-voip-2011-jun/linux2.unix.ais/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#ping 192.168.15.1
PING 192.168.15.1 (192.168.15.1) 56(84) bytes of data. 64 bytes from 192.168.15.1: icmp_req=1 ttl=64 time=0.123 ms 64 bytes from 192.168.15.1: icmp_req=2 ttl=64 time=0.119 ms ^C --- 192.168.15.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.119/0.121/0.123/0.002 ms |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 35118 Unmonitored ast/msk 192.168.15.1 D 5060 Unmonitored v1202 (Unspecified) D 5060 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline] linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 35118 Unmonitored ast/msk 192.168.15.1 D 5060 Unmonitored v1202 (Unspecified) D 5060 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline] linux2*CLI> exit |
#vim sip.conf
--- /tmp/l3-saved-2329.10406.20683 2011-06-28 12:12:47.000000000 +0400 +++ sip.conf 2011-06-28 12:12:59.000000000 +0400 @@ -9,7 +9,7 @@ host=dynamic canreinvite=no -[v1202] +[1202] type=friend secret=1234 host=dynamic |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 35118 Unmonitored 1202/1202 192.168.15.234 D 5060 Unmonitored ast/msk 192.168.15.1 D 5060 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline] [Jun 28 12:14:19] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 35118 Unmonitored 1202/1202 192.168.15.234 D 5060 Unmonitored ast/msk 192.168.15.1 D 5060 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline] [Jun 28 12:14:19] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#vim extensions.conf
--- /tmp/l3-saved-2329.27636.5624 2011-06-28 12:16:02.000000000 +0400 +++ extensions.conf 2011-06-28 12:21:31.000000000 +0400 @@ -5,3 +5,5 @@ exten => _12XX,1,Answer exten => _12XX,n,Dial(SIP/${EXTEN}) + +exten => _11XX,n,Dial(SIP/ast/${EXTEN}) |
#asterisk -rv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity was 0 and is now 1 linux2*CLI> exit Executing last minute cleanups |
#asterisk -rv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity was 0 and is now 1 linux2*CLI> exit Executing last minute cleanups |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> sip reload Reloading SIP linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> sip reload Reloading SIP linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> dialplan reload Dialplan reloaded. [Jun 28 12:23:21] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from '1201' to extension '1102' rejected because extension not found in context 'default'. [Jun 28 12:23:32] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> dialplan reload Dialplan reloaded. [Jun 28 12:23:21] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from '1201' to extension '1102' rejected because extension not found in context 'default'. [Jun 28 12:23:32] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#vim extensions.conf
--- /tmp/l3-saved-2329.20961.9435 2011-06-28 12:24:19.000000000 +0400 +++ extensions.conf 2011-06-28 12:24:48.000000000 +0400 @@ -6,4 +6,5 @@ exten => _12XX,1,Answer exten => _12XX,n,Dial(SIP/${EXTEN}) -exten => _11XX,n,Dial(SIP/ast/${EXTEN}) +exten => _11XX,n,Dial(SIP/msk/${EXTEN}) + |
#[ast]
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> dialplan reload Dialplan reloaded. linux2*CLI> exit |
#[ast]
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> dialplan reload Dialplan reloaded. linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> dialplan reload Dialplan reloaded. [Jun 28 12:25:24] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from '1201' to extension '1102' rejected because extension not found in context 'default'. linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> dialplan reload Dialplan reloaded. [Jun 28 12:25:24] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from '1201' to extension '1102' rejected because extension not found in context 'default'. linux2*CLI> exit |
#vim extensions.conf
--- /tmp/l3-saved-2329.24614.7897 2011-06-28 12:25:48.000000000 +0400 +++ extensions.conf 2011-06-28 12:26:17.000000000 +0400 @@ -6,5 +6,5 @@ exten => _12XX,1,Answer exten => _12XX,n,Dial(SIP/${EXTEN}) -exten => _11XX,n,Dial(SIP/msk/${EXTEN}) +exten => _11XX,n,Dial(SIP/ast/${EXTEN}) |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 [Jun 28 12:26:53] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from '1201' to extension '1102' rejected because extension not found in context 'default'. linux2*CLI> xit No such command 'xit' (type 'core show help xit' for other possible commands) linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 [Jun 28 12:26:53] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from '1201' to extension '1102' rejected because extension not found in context 'default'. linux2*CLI> xit No such command 'xit' (type 'core show help xit' for other possible commands) linux2*CLI> exit |
#[ ]
[ ] exten => 8000,1,Playback(welcome) ,1 exten => _12XX,1,Answer ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "extensions.conf" 10L, 149C записано |
#[ ]
[ ] exten => 8000,1,Playback(welcome) ,1 exten => _12XX,1,Answer ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "extensions.conf" 10L, 149C записано |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 [Jun 28 12:32:33] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 12:35:34] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 [Jun 28 12:32:33] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 12:35:34] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#vim extensions.conf
--- /tmp/l3-saved-2329.21612.2590 2011-06-28 12:36:24.000000000 +0400 +++ extensions.conf 2011-06-28 12:38:47.000000000 +0400 @@ -8,3 +8,6 @@ exten => _11XX,1,Dial(SIP/ast/${EXTEN}) +; + +exten => |
#vim sip.conf
--- /tmp/l3-saved-2329.19687.432 2011-06-28 12:38:55.000000000 +0400 +++ sip.conf 2011-06-28 12:41:59.000000000 +0400 @@ -2,6 +2,9 @@ context=default register => msk:password@192.168.15.1/ast +register => msk:password@192.168.15.6/ny +register => msk:password@192.168.15.3/mn + [1201] type=friend @@ -22,4 +25,19 @@ canreinvite=no username=msk +[ny] +type=friend +secret=password +host=dynamic +canreinvite=no +username=msk + +[mn] +type=friend +secret=password +host=dynamic +canreinvite=no +username=msk + + |
#vim extensions.conf
--- /tmp/l3-saved-2329.21317.1321 2011-06-28 12:42:01.000000000 +0400 +++ extensions.conf 2011-06-28 12:42:36.000000000 +0400 @@ -8,6 +8,6 @@ exten => _11XX,1,Dial(SIP/ast/${EXTEN}) -; +;m/n exten => |
#vim extensions.conf
--- /tmp/l3-saved-2329.1643.9476 2011-06-28 12:42:40.000000000 +0400 +++ extensions.conf 2011-06-28 12:46:39.000000000 +0400 @@ -3,11 +3,16 @@ exten => 8000,1,Playback(welcome) +;Local exten => _12XX,1,Answer exten => _12XX,n,Dial(SIP/${EXTEN}) +;M/G exten => _11XX,1,Dial(SIP/ast/${EXTEN}) -;m/n +;M/N +;mn +exten => _21XX.1.Dial(SIP/mn/${EXTEN}) +;ny +exten => _32XX.1.Dial(SIP/ny/${EXTEN}) -exten => |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> sip show peers ... Dialplan reloaded. [Jun 28 12:48:23] NOTICE[3322]: pbx.c:3736 pbx_extension_helper: Cannot find extension '_21XX.1.Dial(SIP' in context '' [Jun 28 12:48:23] WARNING[3322]: pbx_config.c:1491 pbx_load_config: Invalid priority/label '' at line 15 [Jun 28 12:48:23] NOTICE[3322]: pbx.c:3736 pbx_extension_helper: Cannot find extension '_32XX.1.Dial(SIP' in context '' [Jun 28 12:48:23] WARNING[3322]: pbx_config.c:1491 pbx_load_config: Invalid priority/label '' at line 17 [Jun 28 12:48:26] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from 'msk' to extension '2101' rejected because extension not found in context 'default'. linux2*CLI> sip reload Reloading SIP [Jun 28 12:48:29] WARNING[1375]: chan_sip.c:18281 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'msk' to '192.168.15.3' linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> sip show peers ... Dialplan reloaded. [Jun 28 12:48:23] NOTICE[3322]: pbx.c:3736 pbx_extension_helper: Cannot find extension '_21XX.1.Dial(SIP' in context '' [Jun 28 12:48:23] WARNING[3322]: pbx_config.c:1491 pbx_load_config: Invalid priority/label '' at line 15 [Jun 28 12:48:23] NOTICE[3322]: pbx.c:3736 pbx_extension_helper: Cannot find extension '_32XX.1.Dial(SIP' in context '' [Jun 28 12:48:23] WARNING[3322]: pbx_config.c:1491 pbx_load_config: Invalid priority/label '' at line 17 [Jun 28 12:48:26] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from 'msk' to extension '2101' rejected because extension not found in context 'default'. linux2*CLI> sip reload Reloading SIP [Jun 28 12:48:29] WARNING[1375]: chan_sip.c:18281 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'msk' to '192.168.15.3' linux2*CLI> exit |
#vim sip.conf
--- /tmp/l3-saved-2329.23958.26280 2011-06-28 12:48:57.000000000 +0400 +++ sip.conf 2011-06-28 12:49:29.000000000 +0400 @@ -3,7 +3,8 @@ register => msk:password@192.168.15.1/ast register => msk:password@192.168.15.6/ny -register => msk:password@192.168.15.3/mn +register => msk:1234@192.168.15.3/mn + [1201] |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 35118 Unmonitored 1202/1202 192.168.15.234 D 5060 Unmonitored ast/msk 192.168.15.1 D 5060 Unmonitored mn/msk 192.168.15.3 D 5060 Unmonitored ny/msk 192.168.15.6 D 5060 Unmonitored 5 sip peers [Monitored: 0 online, 0 offline Unmonitored: 5 online, 0 offline] linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 35118 Unmonitored 1202/1202 192.168.15.234 D 5060 Unmonitored ast/msk 192.168.15.1 D 5060 Unmonitored mn/msk 192.168.15.3 D 5060 Unmonitored ny/msk 192.168.15.6 D 5060 Unmonitored 5 sip peers [Monitored: 0 online, 0 offline Unmonitored: 5 online, 0 offline] linux2*CLI> exit |
#vim extensions.conf
--- /tmp/l3-saved-2329.28098.19854 2011-06-28 12:50:28.000000000 +0400 +++ extensions.conf 2011-06-28 12:53:01.000000000 +0400 @@ -10,9 +10,8 @@ ;M/G exten => _11XX,1,Dial(SIP/ast/${EXTEN}) -;M/N -;mn -exten => _21XX.1.Dial(SIP/mn/${EXTEN}) -;ny -exten => _32XX.1.Dial(SIP/ny/${EXTEN}) +exten => _21XX,1,Dial(SIP/mn/${EXTEN}) +exten => _22XX,1,Dial(SIP/mn/${EXTEN}) +exten => _31XX,1,Dial(SIP/ny/${EXTEN}) +exten => _32XX,1,Dial(SIP/ny/${EXTEN}) |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 [Jun 28 12:53:38] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 12:54:44] WARNING[1375]: chan_sip.c:17992 handle_response_invite: Received response: "Forbidden" from '"1202" <sip:1202@192.168.15.2>;tag=as69e5830d' [Jun 28 12:54:50] WARNING[1375]: chan_sip.c:17992 handle_response_invite: Received response: "Forbidden" from '"1202" <sip:1202@192.168.15.2>;tag=as7660b7be' [Jun 28 12:54:56] WARNING[1375]: chan_sip.c:17992 handle_response_invite: Received response: "Forbidden" from '"1102" <sip:1102@192.168.15.2>;tag=as1f80784c' [Jun 28 12:56:38] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 12:57:11] NOTICE[1375]: chan_sip.c:20200 handle_request_invite: Failed to authenticate device "2102" <sip:2102@192.168.15.3>;tag=as0620739e [Jun 28 12:57:15] NOTICE[1375]: chan_sip.c:20200 handle_request_invite: Failed to authenticate device "2201" <sip:2201@192.168.15.3>;tag=as27f5f945 [Jun 28 12:57:42] NOTICE[1375]: chan_sip.c:20200 handle_request_invite: Failed to authenticate device "2201" <sip:2201@192.168.15.3>;tag=as75e40260 [Jun 28 12:57:55] NOTICE[1375]: chan_sip.c:20200 handle_request_invite: Failed to authenticate device "2102" <sip:2102@192.168.15.3>;tag=as0147e80a linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 1 [Jun 28 12:53:38] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 12:54:44] WARNING[1375]: chan_sip.c:17992 handle_response_invite: Received response: "Forbidden" from '"1202" <sip:1202@192.168.15.2>;tag=as69e5830d' [Jun 28 12:54:50] WARNING[1375]: chan_sip.c:17992 handle_response_invite: Received response: "Forbidden" from '"1202" <sip:1202@192.168.15.2>;tag=as7660b7be' [Jun 28 12:54:56] WARNING[1375]: chan_sip.c:17992 handle_response_invite: Received response: "Forbidden" from '"1102" <sip:1102@192.168.15.2>;tag=as1f80784c' [Jun 28 12:56:38] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 12:57:11] NOTICE[1375]: chan_sip.c:20200 handle_request_invite: Failed to authenticate device "2102" <sip:2102@192.168.15.3>;tag=as0620739e [Jun 28 12:57:15] NOTICE[1375]: chan_sip.c:20200 handle_request_invite: Failed to authenticate device "2201" <sip:2201@192.168.15.3>;tag=as27f5f945 [Jun 28 12:57:42] NOTICE[1375]: chan_sip.c:20200 handle_request_invite: Failed to authenticate device "2201" <sip:2201@192.168.15.3>;tag=as75e40260 [Jun 28 12:57:55] NOTICE[1375]: chan_sip.c:20200 handle_request_invite: Failed to authenticate device "2102" <sip:2102@192.168.15.3>;tag=as0147e80a linux2*CLI> exit |
#~
secret=password host=dynamic canreinvite=no username=msk [mn] [mn] secret=password host=dynamic canreinvite=no username=msk type=friend 41,12 85% 42,0-1 Внизу "/etc/asterisk/sip.conf" 43L, 501C записано |
#vim sip.conf
--- /tmp/l3-saved-2329.30230.31620 2011-06-28 13:29:26.000000000 +0400 +++ sip.conf 2011-06-28 13:34:21.000000000 +0400 @@ -5,8 +5,6 @@ register => msk:password@192.168.15.6/ny register => msk:password@192.168.15.3/mn - - [1201] type=friend secret=1234 @@ -29,7 +27,8 @@ canreinvite=no username=msk -callerid = "Max Moscow <1201>" +callerid = "Alexey Ast <1102>" +callerid = "Alexey Ast <1101>" [ny] @@ -40,6 +39,7 @@ username=msk callerid = "Dmitry NY <3201>" +callerid = "Dmitry NY <3202>" [mn] type=friend @@ -49,4 +49,5 @@ username=msk callerid = "Viktor Minsk <2101>" +callerid = "Viktor Minsk <2102>" |
#vim extensions.conf
--- /tmp/l3-saved-2329.27662.16848 2011-06-28 13:37:04.000000000 +0400 +++ extensions.conf 2011-06-28 13:44:44.000000000 +0400 @@ -1,6 +1,7 @@ [default] +[internal] exten => 8000,1,Playback(welcome) ;Local @@ -20,9 +21,19 @@ exten => _32XX,1,Dial(SIP/ny/${EXTEN}) [gr1] + +include => internal include => local + + [gr2] -include => natinal + +include => internal +include => local +include => national + [gr3] -include => internatinal + +include => international + |
#vim sip.conf
|
#vim sip.conf
--- /tmp/l3-saved-2329.24020.23363 2011-06-28 13:44:52.000000000 +0400 +++ sip.conf 2011-06-28 13:49:02.000000000 +0400 @@ -11,6 +11,7 @@ host=dynamic canreinvite=no callerid = "Max Moscow <1201>" +context=gr1 [1202] @@ -19,6 +20,8 @@ host=dynamic canreinvite=no callerid = "Max Moscow <1202>" +context=gr2 + [ast] type=friend @@ -29,7 +32,7 @@ callerid = "Alexey Ast <1102>" callerid = "Alexey Ast <1101>" - +context=gr3 [ny] type=friend @@ -40,6 +43,7 @@ callerid = "Dmitry NY <3201>" callerid = "Dmitry NY <3202>" +context=gr4 [mn] type=friend @@ -50,4 +54,5 @@ callerid = "Viktor Minsk <2101>" callerid = "Viktor Minsk <2102>" +context=gr4 |
#vim extensions.conf
--- /tmp/l3-saved-2329.11336.32610 2011-06-28 13:49:04.000000000 +0400 +++ extensions.conf 2011-06-28 13:54:43.000000000 +0400 @@ -36,4 +36,10 @@ include => international +[gr4] +include => local +include => national +include => international + + |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 3 linux2*CLI> sip reload ... [Jun 28 14:02:50] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:05:50] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:08:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:09:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:11:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:14:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:17:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:20:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:23:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) Verbosity is at least 3 linux2*CLI> sip reload ... [Jun 28 14:02:50] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:05:50] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:08:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:09:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:11:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:14:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:17:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:20:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 14:23:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
Время первой команды журнала | 10:12:10 2011- 6-28 | ||||||||||||||||||||||||
Время последней команды журнала | 12:30:10 2011- 6-28 | ||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 41.58 | ||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.30 | ||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.73 | ||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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