/l3/users/igor-gorbatko/asterisk/debian3.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
#top
top - 23:38:08 up 19:34, 6 users, load average: 1.32, 0.87, 0.52 Tasks: 95 total, 2 running, 93 sleeping, 0 stopped, 0 zombie Cpu(s): 99.7%us, 0.3%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2059368k total, 519772k used, 1539596k free, 104048k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 1646620k total, 0k used, 1646620k free, 203708k cached 2605 root 20 0 16344 12m 1508 R 91.8 0.6 655:11.51 l3-agent 2752 root 19 -1 228m 10m 6596 S 6.6 0.5 3:29.97 Xorg 5667 asterisk -11 0 31352 11m 6884 S 1.0 0.6 0:18.14 asterisk 2832 root 20 0 23440 12m 7616 S 0.7 0.6 0:23.50 xfce4-terminal ... 4 root 15 -5 0 0 0 S 0.0 0.0 0:01.02 ksoftirqd/0 5 root RT -5 0 0 0 S 0.0 0.0 0:00.80 watchdog/0 6 root 15 -5 0 0 0 S 0.0 0.0 0:03.14 events/0 7 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 39 root 15 -5 0 0 0 S 0.0 0.0 0:00.26 kblockd/0 41 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid 42 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpi_notify 117 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod 150 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush 151 root 20 0 0 0 0 S 0.0 0.0 0:00.76 pdflush |
#ps aux | grep l3
root 2605 55.8 0.6 16344 13036 ? Rs 04:04 655:15 l3-agent root 5932 0.0 0.0 3120 736 pts/6 S+ 23:38 0:00 grep l3 |
#kill 2605
|
#top
top - 23:38:19 up 19:35, 6 users, load average: 1.49, 0.93, 0.54 Tasks: 95 total, 2 running, 93 sleeping, 0 stopped, 0 zombie Cpu(s): 52.6%us, 0.2%sy, 0.0%ni, 43.5%id, 0.0%wa, 3.6%hi, 0.0%si, 0.0%st Mem: 2059368k total, 519780k used, 1539588k free, 104052k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 1646620k total, 0k used, 1646620k free, 203712k cached 2605 root 20 0 16344 12m 1508 R 89.3 0.6 655:21.82 l3-agent 2752 root 19 -1 228m 10m 6596 S 7.8 0.5 3:30.21 Xorg 5667 asterisk -11 0 31352 11m 6884 S 3.9 0.6 0:18.30 asterisk 5947 root 20 0 2388 1036 804 R 3.9 0.1 0:00.02 top ... 6 root 15 -5 0 0 0 S 0.0 0.0 0:03.14 events/0 7 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 39 root 15 -5 0 0 0 S 0.0 0.0 0:00.26 kblockd/0 41 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid 42 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpi_notify 117 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod 150 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush 151 root 20 0 0 0 0 S 0.0 0.0 0:00.76 pdflush 152 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kswapd0 153 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0 |
#top
![]() top - 23:38:31 up 19:35, 6 users, load average: 1.26, 0.90, 0.53 Tasks: 94 total, 1 running, 93 sleeping, 0 stopped, 0 zombie Cpu(s): 1.7%us, 0.0%sy, 0.0%ni, 98.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2059368k total, 508720k used, 1550648k free, 104056k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 1646620k total, 0k used, 1646620k free, 203724k cached 4012 root 20 0 119m 48m 17m S 4.0 2.4 2:06.43 xulrunner-stub 2752 root 19 -1 228m 10m 6596 S 1.3 0.5 3:30.57 Xorg 1 root 20 0 2100 720 624 S 0.0 0.0 0:01.84 init 2 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kthreadd ... 4 root 15 -5 0 0 0 S 0.0 0.0 0:01.10 ksoftirqd/0 5 root RT -5 0 0 0 S 0.0 0.0 0:00.80 watchdog/0 6 root 15 -5 0 0 0 S 0.0 0.0 0:03.26 events/0 7 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 39 root 15 -5 0 0 0 S 0.0 0.0 0:00.28 kblockd/0 41 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid 42 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpi_notify 117 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod 150 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush 151 root 20 0 0 0 0 S 0.0 0.0 0:00.80 pdflush |
#cd /etc/
|
#ssh root@192.168.102.2
The authenticity of host '192.168.102.2 (192.168.102.2)' can't be established. RSA key fingerprint is 0b:40:eb:0f:f1:0c:12:1d:16:16:68:c6:5f:3b:49:73. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.102.2' (RSA) to the list of known hosts. root@192.168.102.2's password: Linux debian2 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Dec 9 11:07:22 2009 l3-agent is already running: pid=2539; pidfile=/root/.lilalo/l3-agent.pid |
#exit
Connection to 192.168.102.1 closed. |
#cd /etc/asterisk/
|
#vim extensions.conf
--- /tmp/l3-saved-2943.18310.2140 2009-12-09 00:44:28.000000000 -1000 +++ extensions.conf 2009-12-09 00:45:31.000000000 -1000 @@ -8,6 +8,8 @@ exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) +exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) + exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity was 0 and is now 1 debian3*CLI> extensions reload Dialplan reloaded. The 'extensions reload' command is deprecated and will be removed in a future release. Please use 'dialplan reload' instead. debian3*CLI> dial dialplan dial debian3*CLI> dialplan reload Dialplan reloaded. [Dec 9 00:46:26] NOTICE[6078]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 debian3*CLI> |
#vim extensions.conf
|
#vim iax.conf
--- /tmp/l3-saved-2943.792.29362 2009-12-09 02:43:06.000000000 -1000 +++ iax.conf 2009-12-09 02:52:32.000000000 -1000 @@ -1,6 +1,15 @@ [general] context=default -register => poltava:1234@192.168.102.1/kiev +;register => poltava:1234@192.168.102.1/kiev +register => frompoltava:1234@192.168.102.2/obukhov + +[obukhov] +type=friend +host=dynamic +secret=1234 +deny=0.0.0.0/0.0.0.0 +permit=192.168.102.2/255.255.255.0 +trunk=yes [kiev] type=friend |
#context=default
![]() asterisk astgenkey astman |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... debian3*CLI> iax2 show cache channels firmware netstats peer peers provisioning registry stats threads users debian3*CLI> iax2 show peers Name/Username Host Mask Port Status kiev 192.168.102.1 (D) 255.255.255.255 4569 (T) Unmonitored obukhov (Unspecified) (D) 255.255.255.255 0 (T) Unmonitored 2 iax2 peers [0 online, 0 offline, 2 unmonitored] debian3*CLI> |
#vim iax.conf
|
#[ ]
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 1 debian3*CLI> |
#vim iax.conf
|
#[ limito]peers=yes
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 1 debian3*CLI> iax2 reload debian3*CLI> iax2 show registry Host dnsmgr Username Perceived Refresh State 0.0.0.0:4569 N frompoltav <Unregistered> 60 Unregistered debian3*CLI> iax2 reload debian3*CLI> iax2 show registry Host dnsmgr Username Perceived Refresh State 0.0.0.0:4569 N frompoltav <Unregistered> 60 Unregistered debian3*CLI> |
#vim iax.conf
--- /tmp/l3-saved-2943.4826.13731 2009-12-09 02:56:39.000000000 -1000 +++ iax.conf 2009-12-09 02:56:57.000000000 -1000 @@ -1,7 +1,7 @@ [general] context=default ;register => poltava:1234@192.168.102.1/kiev -register => frompoltava:1234@192.168.102.2/obukhov +register => frompoltava:1234@192.168.102.2 [obukhov] type=friend |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... peers provisioning registry stats threads users debian3*CLI> iax2 show cache channels firmware netstats peer peers provisioning registry stats threads users debian3*CLI> iax2 show registry Host dnsmgr Username Perceived Refresh State 192.168.102.2:4569 N frompoltav 192.168.101.3:4569 60 Registered debian3*CLI> |
#vim ext
![]() |
#vim extensions.
![]() --- /tmp/l3-saved-2943.17273.12289 2009-12-09 02:58:15.000000000 -1000 +++ extensions.conf 2009-12-09 02:59:30.000000000 -1000 @@ -19,7 +19,7 @@ exten => 191,1,Dial(SIP/101,5) exten => 191,n,Dial(SIP/kiev/380503049607,10}) -;exten => _2XX,n,Dial(IAX2/kiev/${EXTEN}) +;exten => _2XX,n,Dial(IAX2/obukhov/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo() |
#~
exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) "extensions.conf" 2l(, 540C ${EXTEN}) exten => 191,1,Dial(SIP/101,5) exten => 191,n,Dial(SIP/kiev/380503049607,10}) ( ) exten => 999,1,Answer l( obukhov/${EXTEN}) () () exten => 911,1,Dial(ZAP/G1/911,5) "extensions.conf" 27L, 543C written |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 1 debian3*CLI> extensions reload Dialplan reloaded. debian3*CLI> |
#vim extensions.conf
--- /tmp/l3-saved-2943.25030.4767 2009-12-09 03:00:34.000000000 -1000 +++ extensions.conf 2009-12-09 03:00:52.000000000 -1000 @@ -14,12 +14,12 @@ exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) -exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) +;exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) exten => 191,1,Dial(SIP/101,5) exten => 191,n,Dial(SIP/kiev/380503049607,10}) -;exten => _2XX,n,Dial(IAX2/obukhov/${EXTEN}) +exten => _2XX,n,Dial(IAX2/obukhov/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo() |
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 1 debian3*CLI> extensions reload Dialplan reloaded. debian3*CLI> exit Executing last minute cleanups |
#vim extensions.conf
|
#{EXTEN})
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 1 [Dec 9 03:02:49] NOTICE[6080]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist [Dec 9 03:02:49] NOTICE[6078]: chan_sip.c:14035 handle_request_invite: Call from '101' to extension '202' rejected because extension not found. debian3*CLI> |
#vim extensions.conf
--- /tmp/l3-saved-2943.7089.12785 2009-12-09 03:03:45.000000000 -1000 +++ extensions.conf 2009-12-09 03:04:08.000000000 -1000 @@ -10,16 +10,16 @@ -exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) +;exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) -;exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) +exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) exten => 191,1,Dial(SIP/101,5) exten => 191,n,Dial(SIP/kiev/380503049607,10}) -exten => _2XX,n,Dial(IAX2/obukhov/${EXTEN}) +exten => _3XX,n,Dial(IAX2/obukhov/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo() |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 1 debian3*CLI> extensions reload Dialplan reloaded. [Dec 9 03:04:17] NOTICE[6078]: chan_sip.c:14035 handle_request_invite: Call from '101' to extension '301' rejected because extension not found. [Dec 9 03:04:32] NOTICE[6078]: chan_sip.c:14035 handle_request_invite: Call from '101' to extension '302' rejected because extension not found. [Dec 9 03:04:33] NOTICE[6086]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist [Dec 9 03:04:33] NOTICE[6078]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 debian3*CLI> |
#vim extensions.conf
--- /tmp/l3-saved-2943.2881.2341 2009-12-09 03:04:37.000000000 -1000 +++ extensions.conf 2009-12-09 03:04:45.000000000 -1000 @@ -19,7 +19,7 @@ exten => 191,1,Dial(SIP/101,5) exten => 191,n,Dial(SIP/kiev/380503049607,10}) -exten => _3XX,n,Dial(IAX2/obukhov/${EXTEN}) +exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo() |
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 1 debian3*CLI> extensions reload Dialplan reloaded. debian3*CLI> quit Executing last minute cleanups |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Called obukhov/302 -- Call accepted by 192.168.102.2 (format gsm) -- Format for call is gsm -- IAX2/obukhov-16385 is ringing [Dec 9 03:05:28] NOTICE[6080]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist -- Hungup 'IAX2/obukhov-16385' == Spawn extension (default, 302, 1) exited non-zero on 'SIP/101-09a594c8' [Dec 9 03:05:38] NOTICE[6084]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist [Dec 9 03:06:09] NOTICE[6085]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist debian3*CLI> |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 3 debian3*CLI> |
#vim extensions.conf
|
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': Found == Parsing '/etc/asterisk/extconfig.conf': Found Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 3 -- B-channel 0/1 successfully restarted on span 1 [Dec 9 03:07:25] NOTICE[6085]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist [Dec 9 03:07:34] NOTICE[6078]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 -- B-channel 0/1 restarted on span 1 debian3*CLI> |
#vim iax.conf
--- /tmp/l3-saved-2943.19715.1432 2009-12-09 03:07:54.000000000 -1000 +++ iax.conf 2009-12-09 03:08:08.000000000 -1000 @@ -8,7 +8,7 @@ host=dynamic secret=1234 deny=0.0.0.0/0.0.0.0 -permit=192.168.102.2/255.255.255.0 +permit=192.168.102.2/255.255.255.255 trunk=yes [kiev] |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... debian3*CLI> iax2 reload == Parsing '/etc/asterisk/iax.conf': Found == Parsing '/etc/asterisk/users.conf': Found -- Seeding 'obukhov' at 192.168.102.2:4569 for 60 -- Seeding 'kiev' at 192.168.102.1:4569 for 60 == Parsing '/etc/asterisk/iaxprov.conf': Found -- Loaded provisioning template 'default' -- Registered IAX2 to '192.168.102.2', who sees us as 192.168.101.3:4569 with no messages waiting [Dec 9 03:08:20] NOTICE[6081]: chan_iax2.c:8022 socket_process: Rejected connect attempt from 192.168.102.2, request '101@default' does not exist debian3*CLI> |
#vim iax.conf
|
#[ ]
exten => 102,n,Playback(rondo) exten => 102,n,Hangup ;exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) ;exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) "extensions.conf" 27L, 543C exten => 191,1,Dial(SIP/101,5) exten => 191,n,Dial(SIP/kiev/380503049607,10}) |
#{EXTEN})
[general] context=default ;register => poltava:1234@192.168.102.1/kiev register => frompoltava:1234@192.168.102.2 [obukhov] type=friend host=dynamic "iax.conf" 23L, 379C secret=1234 deny=0.0.0.0/0.0.0.0 permit=192.168.102.2/255.255.255.255 trunk=yes [kiev] type=friend host=dynamic secret=1234 deny=0.0.0.0/0.0.0.0 permit=192.168.102.1/255.255.255.255 trunk=yes ; call-limit=1 |
#; limitonpeers=yes
exten => 102,1,Answer exten => 102,n,Wait(1) exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) "extensions.conf" 27L, 543C exten => 191,1,Dial(SIP/101,5) exten => 191,n,Dial(SIP/kiev/380503049607,10}) exten => 999,1,Answer exten => 999,n,Echo() "extensions.conf" 27L, 541C written |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... > host prefs = (), > priority = mine -- Executing [101@default:1] Set("IAX2/obukhov-7259", "CALLERID(number)=4") in new stack -- Executing [101@default:2] Dial("IAX2/obukhov-7259", "SIP/101") in new stack -- Called 101 -- SIP/101-09a57f38 is ringing -- SIP/101-09a57f38 is ringing -- SIP/101-09a57f38 answered IAX2/obukhov-7259 == Spawn extension (default, 101, 2) exited non-zero on 'IAX2/obukhov-7259' -- Hungup 'IAX2/obukhov-7259' |
#vim extensions.conf
|
#{EXTEN})
[ ] trunk=yes "iax.conf" 23L, 379C [kiev] ] [ ] type=friend host=dynamic secret=1234 deny=0.0.0.0/0.0.0.0 permit=192.168.102.1/255.255.255.255 trunk=yes ; call-limit=1 ; limitonpeers=yes 13,0-1 All |
#[kiev] ]
unix 2 [ ACC ] STREAM LISTENING 19274 /var/run/asterisk/asterisk.ctl |
#netstat tapnul | grep aster
![]() |
#netstat tapnul
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 192.168.101.3:ssh 192.168.102.1:52036 ESTABLISHED tcp 0 0 192.168.101.3:ssh 192.168.102.1:41718 ESTABLISHED tcp 0 0 192.168.101.3:37285 192.168.102.2:ssh ESTABLISHED Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node Path unix 5 [ ] DGRAM 13630 /dev/log unix 2 [ ] DGRAM 3233 @/org/kernel/udev/udevd unix 2 [ ] DGRAM 7619 @/org/freedesktop/hal/udev_event ... unix 3 [ ] STREAM CONNECTED 7725 @/var/run/hald/dbus-eiMdLFvj7Q unix 3 [ ] STREAM CONNECTED 7712 unix 3 [ ] STREAM CONNECTED 7614 @/var/run/hald/dbus-C2MgYKLltB unix 3 [ ] STREAM CONNECTED 7613 unix 3 [ ] STREAM CONNECTED 7594 /var/run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 7593 unix 2 [ ] DGRAM 7476 unix 3 [ ] STREAM CONNECTED 7205 unix 3 [ ] STREAM CONNECTED 7204 unix 2 [ ] DGRAM 7184 |
#netstatv lup
![]() bash: netstatv: command not found |
#netstat lup
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 192.168.101.3:ssh 192.168.102.1:52036 ESTABLISHED tcp 0 0 192.168.101.3:ssh 192.168.102.1:41718 ESTABLISHED tcp 0 0 192.168.101.3:37285 192.168.102.2:ssh ESTABLISHED Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node Path unix 5 [ ] DGRAM 13630 /dev/log unix 2 [ ] DGRAM 3233 @/org/kernel/udev/udevd unix 2 [ ] DGRAM 7619 @/org/freedesktop/hal/udev_event ... unix 3 [ ] STREAM CONNECTED 7725 @/var/run/hald/dbus-eiMdLFvj7Q unix 3 [ ] STREAM CONNECTED 7712 unix 3 [ ] STREAM CONNECTED 7614 @/var/run/hald/dbus-C2MgYKLltB unix 3 [ ] STREAM CONNECTED 7613 unix 3 [ ] STREAM CONNECTED 7594 /var/run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 7593 unix 2 [ ] DGRAM 7476 unix 3 [ ] STREAM CONNECTED 7205 unix 3 [ ] STREAM CONNECTED 7204 unix 2 [ ] DGRAM 7184 |
#netstat lup
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 192.168.101.3:ssh 192.168.102.1:52036 ESTABLISHED tcp 0 0 192.168.101.3:ssh 192.168.102.1:41718 ESTABLISHED tcp 0 0 192.168.101.3:37285 192.168.102.2:ssh ESTABLISHED Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node Path unix 5 [ ] DGRAM 13630 /dev/log unix 2 [ ] DGRAM 3233 @/org/kernel/udev/udevd unix 2 [ ] DGRAM 7619 @/org/freedesktop/hal/udev_event ... unix 3 [ ] STREAM CONNECTED 7725 @/var/run/hald/dbus-eiMdLFvj7Q unix 3 [ ] STREAM CONNECTED 7712 unix 3 [ ] STREAM CONNECTED 7614 @/var/run/hald/dbus-C2MgYKLltB unix 3 [ ] STREAM CONNECTED 7613 unix 3 [ ] STREAM CONNECTED 7594 /var/run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 7593 unix 2 [ ] DGRAM 7476 unix 3 [ ] STREAM CONNECTED 7205 unix 3 [ ] STREAM CONNECTED 7204 unix 2 [ ] DGRAM 7184 |
#vim extensions.conf
|
#{EXTEN})
; switch should provide dialtone, read digits, etc. ; Note: If immediate=yes the dialplan execution will always start at extension ; 's' priority 1 regardless of the dialed number! ; immediate=no ; ; Specify whether flash-hook transfers to 'busy' channels should complete or yes ; return to the caller performing the transfer (default is yes). ; ;transfertobusy=no "zapata.conf" 683L, 24201C written |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 6059) Verbosity is at least 3 debian3*CLI> zap destroy restart show debian3*CLI> |
#cd ..
|
#cd init.d/
|
#./asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#cd ..
|
#cd asterisk/
|
#vim extensions.conf
--- /tmp/l3-saved-2943.28328.4207 2009-12-09 03:30:23.000000000 -1000 +++ extensions.conf 2009-12-09 03:31:58.000000000 -1000 @@ -1,5 +1,7 @@ [default] +exten => s,1,Answer +exten => s,n,Background(rondo) exten => 102,1,Answer exten => 102,n,Wait(1) exten => 102,n,Playback(rondo) |
#cp extensions.conf extensions.conf.2
|
#echo 1 > extensions.conf
|
#vi extensions.conf
--- /tmp/l3-saved-2943.21100.20498 2009-12-09 03:38:05.000000000 -1000 +++ extensions.conf 2009-12-09 03:48:09.000000000 -1000 @@ -1 +1,24 @@ -1 +[default] + +[internal] +exten => s,1,Answer +exten => s,n,Background(rondo) +exten => 102,1,Answer +exten => 102,n,Wait(1) +exten => 102,n,Playback(rondo) +exten => 102,n,Hangup +exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) +exten => _1XX,n,Dial(SIP/${EXTEN}) +exten => 999,1,Answer +exten => 999,n,Echo() + +[outbound] +exten => s,1,Answer +exten => s,n,Background(rondo) +exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) +exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) +exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) +exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) +exten => 191,1,Dial(SIP/101,5) +exten => 191,n,Dial(SIP/kiev/380503049607,10}) + |
#vi extensions.conf.2
|
#cd ..
|
#vi sip.conf
--- /tmp/l3-saved-2943.22626.20391 2009-12-09 03:48:15.000000000 -1000 +++ sip.conf 2009-12-09 03:49:55.000000000 -1000 @@ -5,6 +5,7 @@ [101] +context= username=phone type=friend host=dynamic |
#vi extensions.conf
--- /tmp/l3-saved-2943.11680.21714 2009-12-09 03:49:57.000000000 -1000 +++ extensions.conf 2009-12-09 03:51:48.000000000 -1000 @@ -22,3 +22,12 @@ exten => 191,1,Dial(SIP/101,5) exten => 191,n,Dial(SIP/kiev/380503049607,10}) +[white] +include => internal +include => outbound + +[black] +include => internal + +[inbound] +include => internal |
#vi sip.conf
--- /tmp/l3-saved-2943.19427.991 2009-12-09 03:51:51.000000000 -1000 +++ sip.conf 2009-12-09 03:53:06.000000000 -1000 @@ -5,7 +5,7 @@ [101] -context= +context=white username=phone type=friend host=dynamic @@ -13,12 +13,14 @@ callerid="gib-snom" [103] +context=black type=friend host=dynamic secret=123 callerid="GIB-win" [kiev] +context=inbound type=friend host=dynamic secret=1234 |
#asterisk restart
![]() Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#./asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... == Primary D-Channel on span 1 up -- Registered IAX2 to '192.168.102.2', who sees us as 192.168.101.3:4569 with no messages waiting [Dec 9 04:00:12] NOTICE[7230]: chan_zap.c:6872 handle_init_event: Alarm cleared on channel 1 [Dec 9 04:00:12] NOTICE[7230]: chan_zap.c:6872 handle_init_event: Alarm cleared on channel 2 [Dec 9 04:00:12] NOTICE[7229]: chan_zap.c:9024 pri_dchannel: PRI got event: No more alarm (5) on Primary D-channel of span 1 -- B-channel 0/1 restarted on span 1 -- B-channel 0/1 successfully restarted on span 1 -- B-channel 0/2 successfully restarted on span 1 [Dec 9 04:01:36] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 debian3*CLI> |
#cd ..
|
#cd asterisk/
|
#vi sip.conf
|
#vi sip.conf
|
#context=inbound
exten => s,1,Answer exten => s,n,Background(rondo) exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) [ ] [xten => ]3XX,1,Dial(IAX2/obukhov/${EXTEN}) ;exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) exten => 191,1,Dial(SIP/101,5) [white] [white] include => internal 26,1 30% |
#vi extensions.conf
--- /tmp/l3-saved-7044.26726.26076 2009-12-09 04:15:05.000000000 -1000 +++ extensions.conf 2009-12-09 04:15:59.000000000 -1000 @@ -19,8 +19,8 @@ exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) ;exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) -exten => 191,1,Dial(SIP/101,5) -exten => 191,n,Dial(SIP/kiev/380503049607,10}) +;exten => 191,1,Dial(SIP/101,5) +exten => 191,1,Dial(SIP/kiev/380503049607,10}) [white] include => internal |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- SIP/kiev-085fbb50 answered SIP/101-085f7bd8 -- Native bridging SIP/101-085f7bd8 and SIP/kiev-085fbb50 [Dec 9 04:16:37] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 == Spawn extension (white, 202, 1) exited non-zero on 'SIP/101-085f7bd8' -- Executing [191@white:1] Set("SIP/101-085f5000", "CALLERID(number)=4101") in new stack -- Executing [191@white:2] Dial("SIP/101-085f5000", "SIP/191") in new stack [Dec 9 04:16:50] WARNING[7579]: chan_sip.c:2921 create_addr: No such host: 191 [Dec 9 04:16:50] WARNING[7579]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) == Everyone is busy/congested at this time (1:0/0/1) == Auto fallthrough, channel 'SIP/101-085f5000' status is 'CHANUNAVAIL' |
#screen
|
#vim extensions.conf
|
#vi extensions.conf
![]() --- /tmp/l3-saved-7044.9949.25695 2009-12-09 04:17:29.000000000 -1000 +++ extensions.conf 2009-12-09 04:18:03.000000000 -1000 @@ -20,7 +20,7 @@ ;exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) ;exten => 191,1,Dial(SIP/101,5) -exten => 191,1,Dial(SIP/kiev/380503049607,10}) +exten => 191,1,Dial(SIP/kiev/380503049607,10) [white] include => internal |
#[ ]
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... == Parsing '/etc/asterisk/festival.conf': Found == Auto fallthrough, channel 'SIP/101-085f7bd8' status is 'UNKNOWN' [Dec 9 23:02:23] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 9 23:05:23] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 9 23:08:23] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 9 23:11:24] NOTICE[7233]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 debian3*CLI> debian3*CLI> debian3*CLI> quit Executing last minute cleanups |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Including context 'internal' in context 'black' -- Registered extension context 'inbound' -- Including context 'internal' in context 'inbound' == Parsing '/etc/asterisk/users.conf': Found -- Executing [191@white:1] Set("SIP/101-085f7bd8", "CALLERID(number)=4101") in new stack -- Executing [191@white:2] Dial("SIP/101-085f7bd8", "SIP/191") in new stack [Dec 9 04:18:12] WARNING[7779]: chan_sip.c:2921 create_addr: No such host: 191 [Dec 9 04:18:12] WARNING[7779]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) == Everyone is busy/congested at this time (1:0/0/1) == Auto fallthrough, channel 'SIP/101-085f7bd8' status is 'CHANUNAVAIL' |
#vi extensions.conf
![]() --- /tmp/l3-saved-7044.12903.3243 2009-12-09 04:18:31.000000000 -1000 +++ extensions.conf 2009-12-09 04:19:33.000000000 -1000 @@ -19,8 +19,7 @@ exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) ;exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) -;exten => 191,1,Dial(SIP/101,5) -exten => 191,1,Dial(SIP/kiev/380503049607,10) +exten => 891,1,Dial(SIP/kiev/380503049607,10) [white] include => internal |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Executing [891@white:1] Dial("SIP/101-085f7bd8", "SIP/kiev/380503049607|10") in new stack -- Called kiev/380503049607 -- SIP/kiev-085fbb50 is making progress passing it to SIP/101-085f7bd8 -- SIP/kiev-085fbb50 is ringing == Spawn extension (white, 891, 1) exited non-zero on 'SIP/101-085f7bd8' -- Executing [202@white:1] Dial("SIP/101-085f0bd0", "SIP/kiev/202") in new stack -- Called kiev/202 -- SIP/kiev-085fa5c0 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) == Auto fallthrough, channel 'SIP/101-085f0bd0' status is 'CONGESTION' |
#vi sip.conf
![]() |
#~
![]() [xten =>]102,n,Hangup exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo() [outbound] exten => s,1,Answer exten => s,n,Background(rondo) exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) ... ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 2,0-1 All |
#[ ]
![]() exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) exten => 888,n,Wait(1) exten => 999,1,Answed(/tmp/hello:gsm|1) exten => 888,n,Playback(/tmp/hello) exten => 999,n,Echo() [outbound]88,1,Aswer exten => s,1,Answerrd(hello) exten => s,n,Background(rondo) exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) ;exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) "extensions.conf" 38L, 821C written exten => 891,1,Dial(SIP/kiev/380503049607,10) [white] include => internal include => outbound -- INSERT -- 16,1 61% |
#vi extensions.conf
![]() |
#asterisk -rvvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Including context 'internal' in context 'white' -- Including context 'outbound' in context 'white' -- Registered extension context 'black' -- Including context 'internal' in context 'black' -- Registered extension context 'inbound' -- Including context 'internal' in context 'inbound' == Parsing '/etc/asterisk/users.conf': Found [Dec 9 05:12:27] WARNING[7921]: pbx.c:1832 pbx_extension_helper: No application 'Aswer' for extension (white, 888, 1) == Spawn extension (white, 888, 1) exited non-zero on 'SIP/101-085f5000' debian3*CLI> |
Время первой команды журнала | 10:37:58 2009-12- 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:12:11 2009-12- 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 11.88 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.77 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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