/l3/users/2014-11-nt-voip/nt-voip/debian4/root :1 :2 :3 :4 |
|
#cat /etc/asterisk/sip.conf
[general] context=default [2101] type=friend secret=1234 host=dynamic [2102] type=friend secret=1234 host=dynamic |
#ps aux | grep [a]ster
asterisk 11635 0.2 0.1 761896 30472 ? Ssl 16:37 0:07 /usr/sbin/asterisk -p -U asterisk asterisk 11636 0.0 0.0 13916 772 ? S 16:37 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 11635 root 12118 0.0 0.0 31412 2628 pts/3 S+ 17:18 0:00 /usr/bin/vim /etc/asterisk/sip.conf |
#date
Mon Nov 24 17:19:40 EET 2014 |
## 16:37
|
## 17:19
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101 (Unspecified) D N 0 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101/2101 192.168.40.100 D N 5060 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 1 offline] |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 2101/2101 192.168.40.100 D N 5060 Unmonitored 2102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 1 offline] |
#cat /etc/asterisk/extension.conf
cat: /etc/asterisk/extension.conf: No such file or directory |
#cat /etc/asterisk/extension.conf
cat: /etc/asterisk/extension.conf: No such file or directory |
#cat /etc/asterisk/extension.conf
cat: /etc/asterisk/extension.conf: No such file or directory |
#cat /etc/asterisk/extension.conf
cat: /etc/asterisk/extension.conf: No such file or directory |
#cat /etc/asterisk/extensions.conf
cat: /etc/asterisk/extensions.conf: No such file or directory |
#cat /etc/asterisk/extensions.conf
cat: /etc/asterisk/extensions.conf: No such file or directory |
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2701) debian4*CLI> dialplan reload Dialplan reloaded. debian4*CLI> Disconnected from Asterisk server |
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2701) debian4*CLI> dialplan reload Dialplan reloaded. debian4*CLI> Disconnected from Asterisk server |
#ÑÑÐasterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity was 0 and is now 1 debian4*CLI> sip show pee peers peer debian4*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 2101/2101 192.168.40.100 D N 5060 Unmonitored 2102/2102 192.168.40.101 D N 1646 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] debian4*CLI> quit Executing last minute cleanups |
#grep INTER /etc/default/isc-dhcp-server
CES="eth0"' >> /etc/default/isc-dhcp-server echo 'INTERFAC |
#cat /etc/network/interfaces
|
#cat /etc/network/interfaces
|
#d/192.168.12.1/192.168.1
|
#ping 192.168.12.253
quality=yes [2101] [2101] type=friend secret=1234 [2102] [2102]ynamic [2102] ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/sip.conf" 13L, 128C written |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.24169.24140 2014-11-25 09:55:30.613784448 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 09:55:47.501784617 +0200 @@ -1,6 +1,7 @@ [general] context=default quality=yes + [2101] type=friend secret=1234 |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> sip reload Reloading SIP debian4*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 2101/2101 192.168.40.100 D N 5060 Unmonitored 2102/2102 192.168.40.101 D N 1646 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] debian4*CLI> quit Executing last minute cleanups |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> sip show peers ... 2101/2101 192.168.40.100 D N 5060 Unmonitored 2102/2102 192.168.40.101 D N 35730 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] debian4*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 2101/2101 192.168.40.100 D N 5060 Unmonitored 2102/2102 192.168.40.101 D N 35730 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.27005.9916 2014-11-25 10:17:08.101799786 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 10:17:23.997799964 +0200 @@ -1,6 +1,6 @@ [general] context=default -quality=yes +qualify=yes [2101] type=friend |
#~
|
#chown asterisk /var/tmp/asterisk
|
#chown asterisk:asterisk /var/tmp/asterisk
|
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> /etc /var/tmp/asterisk ... phoneprov pri queue realtime reload rtcp rtp say sip skinny sqlite stun timing udptl ulimit unistim voicemail debian4*CLI> /etc /var/tmp/asterisk No such command '/etc /var/tmp/asterisk' (type 'core show help /etc /var/tmp/asterisk' for other possible commands) debian4*CLI> /etc /var/tmp/asterisk/ No such command '/etc /var/tmp/asterisk/' (type 'core show help /etc /var/tmp/asterisk/' for other possible commands) debian4*CLI> quit Executing last minute cleanups |
#grep INTER /etc/default/isc-dhcp-server
CES="eth0"' >> /etc/default/isc-dhcp-server echo 'INTERFAC |
#cat /etc/network/interfaces
|
#cat /etc/network/interfaces
cat /etc/var/tmp/asterisk cat: /etc/var/tmp/asterisk: No such file or directory |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> dialplan reload Dialplan reloaded. [Nov 25 12:09:24] NOTICE[2801]: chan_sip.c:22753 handle_request_invite: Call from '2101' (192.168.40.100:5060) to extension '8101' rejected because extension not found in context 'default'. [Nov 25 12:09:52] WARNING[4646]: app_record.c:197 record_exec: No extension specified to filename! [Nov 25 12:10:03] NOTICE[2801]: chan_sip.c:22753 handle_request_invite: Call from '2101' (192.168.40.100:5060) to extension '8102' rejected because extension not found in context 'default'. debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
|
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> dialplan re reload remove debian4*CLI> dialplan reload Dialplan reloaded. [Nov 25 12:20:20] WARNING[4735]: file.c:663 ast_openstream_full: File /var/tmp/asterisk/record00 does not exist in any format [Nov 25 12:20:20] WARNING[4735]: file.c:958 ast_streamfile: Unable to open /var/tmp/asterisk/record00 (format 0x4 (ulaw)): No such file or directory [Nov 25 12:20:20] WARNING[4735]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/2101-0000000f for /var/tmp/asterisk/record00 [Nov 25 12:20:20] WARNING[4735]: file.c:663 ast_openstream_full: File /var/tmp/asterisk/record00 does not exist in any format [Nov 25 12:20:20] WARNING[4735]: file.c:958 ast_streamfile: Unable to open /var/tmp/asterisk/record00 (format 0x4 (ulaw)): No such file or directory [Nov 25 12:20:20] WARNING[4735]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/2101-0000000f for /var/tmp/asterisk/record00 debian4*CLI> quit Executing last minute cleanups |
#grep INTER /etc/default/isc-dhcp-server
CES="eth0"' >> /etc/default/isc-dhcp-server echo 'INTERFAC |
#cat /etc/network/interfaces
|
#cat /etc/network/interfaces
|
#d/192.168.12.1/192.168.1
|
#ping 192.168.12.253
|
#layout "us,ru"
|
## hello
|
#s/192.168.12.4/192.168.4
|
#cat /etc/network/interfaces
|
#cat /etc/network/interfaces
|
#cat /etc/network/interfaces
CES="eth0"' >> /etc/default/isc-dhcp-servert/isc-dhcp-server echo 'INTERFAC |
#vim
--- /tmp/l3-saved-3924.25929.10850 2014-11-25 12:21:38.301888200 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 12:23:51.009889772 +0200 @@ -2,7 +2,7 @@ exten => _21XX,1,Dial(SIP/${EXTEN}) -exten => _8100,1,Record(/var/tmp/asterisk/record00:gsm) -exten => _81XX,n,Record(/var/tmp/asterisk/record${EXTEN:2}) -exten => _8200,1,Playback(/var/tmp/asterisk/record00) -exten => _82XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) + +exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) + +exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> dialplan reload Dialplan reloaded. [Nov 25 12:24:18] WARNING[4815]: file.c:663 ast_openstream_full: File /var/tmp/asterisk/record00 does not exist in any format [Nov 25 12:24:18] WARNING[4815]: file.c:958 ast_streamfile: Unable to open /var/tmp/asterisk/record00 (format 0x4 (ulaw)): No such file or directory [Nov 25 12:24:18] WARNING[4815]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/2101-00000012 for /var/tmp/asterisk/record00 [Nov 25 12:29:35] NOTICE[2801]: chan_sip.c:26267 sip_poke_noanswer: Peer '2102' is now UNREACHABLE! Last qualify: 27 [Nov 25 12:53:51] NOTICE[2801]: chan_sip.c:20886 handle_response_peerpoke: Peer '2102' is now Reachable. (34ms / 2000ms) [Nov 25 12:53:51] NOTICE[2801]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2102 debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.11650.24814 2014-11-25 13:21:54.701930999 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 13:29:56.765936709 +0200 @@ -2,6 +2,13 @@ context=default qualify=yes +[phone](!) +type=friend +host=dinamic +quality=yes + +register => ny:1234@192.168.50.1/atlanta + [2101] type=friend secret=1234 @@ -12,3 +19,13 @@ secret=1234 host=dynamic +[2103](phone) +secret=1234 + + +[Atlanta] +type=friend +host=dynamic +secret=1234 +directmedia=no + |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> sip reload Reloading SIP [Nov 25 13:30:23] ERROR[2801]: netsock2.c:263 ast_sockaddr_resolve: getaddrinfo("dinamic", "(null)", ...): No address associated with hostname [Nov 25 13:30:23] WARNING[2801]: acl.c:582 resolve_first: Unable to lookup 'dinamic' debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.18607.1549 2014-11-25 13:30:48.401937325 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 13:32:01.357938184 +0200 @@ -1,4 +1,4 @@ -[general] +[default] context=default qualify=yes |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> sip reload ... Name/username Host Dyn Forcerport ACL Port Status 2101/2101 192.168.40.100 D N 5060 Unmonitored 2102/2102 192.168.40.101 D N 35356 Unmonitored 2103 (Unspecified) N 0 Unmonitored Atlanta (Unspecified) D N 0 Unmonitored 4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 2 offline] debian4*CLI> sip reload Reloading SIP debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.18381.7759 2014-11-25 13:34:02.145939613 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 13:36:10.997941138 +0200 @@ -23,7 +23,7 @@ secret=1234 -[Atlanta] +[Atlanta](phone) type=friend host=dynamic secret=1234 |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> sip reload ... Reloading SIP debian4*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 2101/2101 192.168.40.100 D N 5060 Unmonitored 2102/2102 192.168.40.101 D N 35356 Unmonitored 2103 (Unspecified) N 0 Unmonitored Atlanta (Unspecified) D N 0 Unmonitored 4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 2 offline] debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.2852.4908 2014-11-25 13:36:46.637941560 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 13:37:29.465942067 +0200 @@ -23,7 +23,7 @@ secret=1234 -[Atlanta](phone) +[atlanta] type=friend host=dynamic secret=1234 |
#ast
astcanary asterisk astgenkey |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> sip reload ... [Nov 25 13:37:43] WARNING[2801]: acl.c:582 resolve_first: Unable to lookup 'dinamic' debian4*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 2101/2101 192.168.40.100 D N 5060 Unmonitored 2102/2102 192.168.40.101 D N 35356 Unmonitored 2103 (Unspecified) N 0 Unmonitored atlanta (Unspecified) D N 0 Unmonitored 4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 2 offline] debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.17318.20974 2014-11-25 13:42:53.301945897 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 13:46:38.389948561 +0200 @@ -1,13 +1,14 @@ -[default] +[general] context=default qualify=yes +register => ny:1234@192.168.50.1/atlanta + [phone](!) type=friend host=dinamic quality=yes -register => ny:1234@192.168.50.1/atlanta [2101] type=friend |
#asterisk -rx 'sip reload'
|
#less /etc/asterisk/sip.conf
|
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> sip reload ... [Nov 25 13:46:52] NOTICE[2801]: chan_sip.c:26267 sip_poke_noanswer: Peer '2102' is now UNREACHABLE! Last qualify: 0 debian4*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 2101/2101 192.168.40.100 D N 5060 OK (21 ms) 2102/2102 192.168.40.101 D N 35356 UNREACHABLE 2103 (Unspecified) N 0 UNKNOWN atlanta/ny 192.168.50.1 D N 5060 OK (1 ms) 4 sip peers [Monitored: 2 online, 2 offline Unmonitored: 0 online, 0 offline] debian4*CLI> quit Executing last minute cleanups |
[default] exten => _21XX,1.Dial(SIP/${EXTEN})
[general] context=default [2101] type=friend secret=1234 host=dynamic [2102] type=friend secret=1234 host=dynamic
CES="eth0"' >> /etc/default/isc-dhcp-servert/isc-dhcp-server echo 'INTERFAC
Время первой команды журнала | 16:18:53 2014-11-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:49:33 2014-11-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 8.91 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.85 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.59 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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