/l3/users/kos/nt-VOIP/linux6.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.15.253 0.0.0.0 UG 0 0 0 eth2 localnet * 255.255.255.0 U 0 0 0 eth2 |
#cat /etc/resolv.conf
search unix.nt nameserver 10.0.35.1 |
#host 192.168.15.253
Host 253.15.168.192.in-addr.arpa. not found: 3(NXDOMAIN) |
#host 192.168.15.252
Host 252.15.168.192.in-addr.arpa. not found: 3(NXDOMAIN) |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default switch.unix.nt 0.0.0.0 UG 0 0 0 eth2 localnet * 255.255.255.0 U 0 0 0 eth2 |
#ssh root@192.168.15.25
The authenticity of host '192.168.15.25 (192.168.15.25)' can't be established. RSA key fingerprint is 21:74:39:4b:aa:04:6e:2b:da:e5:52:0d:90:f5:08:01. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.25' (RSA) to the list of known hosts. root@192.168.15.25's password: Linux linux5 2.6.39-bpo.2-686-pae #1 SMP Thu Aug 4 11:02:22 UTC 2011 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Oct 17 14:10:30 2011 from 192.168.15.252 l3-agent is already running: pid=3298; pidfile=/root/.lilalo/l3-agent.pid |
#privet
bash: privet: command not found |
#exit
exit Connection to 192.168.15.25 closed. |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default switch.unix.nt 0.0.0.0 UG 0 0 0 eth2 localnet * 255.255.255.0 U 0 0 0 eth2 |
#get-apt install strace
bash: get-apt: command not found |
#get-app install strace
bash: get-app: command not found |
#screen -x
|
#apt-cashe search asterisk
bash: apt-cashe: command not found |
#apt-cashe search asterisk
bash: apt-cashe: command not found |
#apt-get install asterisk asterisk-config asterisk-sounds
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package asterisk-sounds |
#apt-get install asterisk asterisk-config
Package configuration ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ⤠Configuring libvpb0 âââââââââââââââââââ â This is the numeric code for the region your phone system will be operating in (eg. 61 for Australia or 33 for France). It is used to configure the default regional standards that Voicetronix telephony hardware should comply with. â â â â ITU-T telephone code: â â â â7_61______________________________________________________________________________________________________________________________________________________________________________________________________________________________________ â â â â <Ok> â â â ... Setting up unixodbc (2.2.14p2-1) ... Setting up asterisk (1:1.6.2.9-2+squeeze3) ... Adding system user for Asterisk Adding user `asterisk' to group `dialout' ... Adding user asterisk to group dialout Done. Adding user `asterisk' to group `audio' ... Adding user asterisk to group audio Done. Starting Asterisk PBX: asterisk. |
#apt-get install asterisk-sounds-main
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: asterisk-core-sounds-en-gsm The following NEW packages will be installed: asterisk-sounds-main 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. Need to get 2,187 kB of archives. After this operation, 438 kB of additional disk space will be used. ... Package asterisk-prompt-en is not installed. Package asterisk-core-sounds-en-gsm which provides asterisk-prompt-en is to be removed. (Reading database ... 113817 files and directories currently installed.) Removing asterisk-core-sounds-en-gsm ... Selecting previously deselected package asterisk-sounds-main. (Reading database ... 113355 files and directories currently installed.) Unpacking asterisk-sounds-main (from .../asterisk-sounds-main_1%3a1.6.2.9-2+squeeze3_all.deb) ... Setting up asterisk-sounds-main (1:1.6.2.9-2+squeeze3) ... update-alternatives: using /usr/share/asterisk/sounds/en_US_f_Allison to provide /usr/share/asterisk/sounds/en (asterisk-prompt-en) in auto mode. update-alternatives: using /usr/share/asterisk/sounds/en_US_f_Allison to provide /usr/share/asterisk/sounds/en_US (asterisk-prompt-en-us) in auto mode. |
#apt-get install asterisk-sounds-extra
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: asterisk-sounds-extra 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 3,419 kB of archives. After this operation, 6,562 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main asterisk-sounds-extra all 1.4.9-1 [3,419 kB] Fetched 3,419 kB in 0s (11.6 MB/s) Selecting previously deselected package asterisk-sounds-extra. (Reading database ... 113825 files and directories currently installed.) Unpacking asterisk-sounds-extra (from .../asterisk-sounds-extra_1.4.9-1_all.deb) ... Setting up asterisk-sounds-extra (1.4.9-1) ... |
#/etc/init.d/asterisk start
Asterisk PBX is already running. Use restart. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#ps aux | grep ast
asterisk 31232 1.2 0.2 47964 18072 ? Ssl 14:43 0:00 /usr/sbin/asterisk -p -U asterisk asterisk 31233 0.0 0.0 2936 568 ? S 14:43 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 31232 root 31286 0.0 0.0 3904 724 pts/0 S+ 14:44 0:00 grep ast |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux6 (pid = 31232) ... dahdi database devstate dialplan dnsmgr dundi linux6*CLI> d dahdi database devstate dialplan dnsmgr dundi linux6*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline] linux6*CLI> sip reload Reloading SIP linux6*CLI> quit Executing last minute cleanups |
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth2 iface eth2 inet static address 192.168.15.26 netmask 255.255.255.0 network 192.168.15.0 broadcast 192.168.15.255 gateway 192.168.15.253 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt |
#vim /etc/network/interfaces
--- /tmp/l3-saved-29807.8147.26238 2011-10-17 15:07:58.000000000 +0300 +++ /etc/network/interfaces 2011-10-17 15:10:18.000000000 +0300 @@ -8,11 +8,11 @@ # The primary network interface allow-hotplug eth2 iface eth2 inet static - address 192.168.15.26 + address 192.168.50.1 netmask 255.255.255.0 - network 192.168.15.0 - broadcast 192.168.15.255 - gateway 192.168.15.253 + network 192.168.50.0 + broadcast 192.168.50.255 + gateway 192.168.50.254 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt |
#ifdown eth1; ifup eth1
ifdown: interface eth1 not configured Ignoring unknown interface eth1=eth1. |
#ifdown eth0; ifup eth0
ifdown: interface eth0 not configured Ignoring unknown interface eth0=eth0. |
#ifdown eth0 ifup eth0
ifdown: interface eth0 not configured ifdown: interface ifup not configured ifdown: interface eth0 not configured |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifdown eth1
ifdown: interface eth1 not configured |
#ifdown eth2
SIOCDELRT: No such process |
#ifup eht0
Ignoring unknown interface eht0=eht0. |
#ifup eth0
Ignoring unknown interface eth0=eth0. |
#ifup eth1
Ignoring unknown interface eth1=eth1. |
#ifconfig
eth2 Link encap:Ethernet HWaddr 70:71:bc:09:3a:ec inet addr:192.168.15.26 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::7271:bcff:fe09:3aec/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:550150 errors:0 dropped:0 overruns:0 frame:0 TX packets:264029 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:776115701 (740.1 MiB) TX bytes:18812485 (17.9 MiB) Interrupt:20 Memory:f0600000-f0620000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:25 errors:0 dropped:0 overruns:0 frame:0 TX packets:25 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1888 (1.8 KiB) TX bytes:1888 (1.8 KiB) |
#ping 192.168.60.1
PING 192.168.60.1 (192.168.60.1) 56(84) bytes of data. From 192.168.15.26 icmp_seq=9 Destination Host Unreachable From 192.168.15.26 icmp_seq=10 Destination Host Unreachable From 192.168.15.26 icmp_seq=11 Destination Host Unreachable From 192.168.15.26 icmp_seq=12 Destination Host Unreachable From 192.168.15.26 icmp_seq=13 Destination Host Unreachable From 192.168.15.26 icmp_seq=14 Destination Host Unreachable From 192.168.15.26 icmp_seq=15 Destination Host Unreachable From 192.168.15.26 icmp_seq=16 Destination Host Unreachable From 192.168.15.26 icmp_seq=17 Destination Host Unreachable ^C --- 192.168.60.1 ping statistics --- 20 packets transmitted, 0 received, +9 errors, 100% packet loss, time 19126ms pipe 3 |
#ping 192.168.60.254
PING 192.168.60.254 (192.168.60.254) 56(84) bytes of data. From 192.168.15.26 icmp_seq=1 Destination Host Unreachable From 192.168.15.26 icmp_seq=2 Destination Host Unreachable From 192.168.15.26 icmp_seq=3 Destination Host Unreachable From 192.168.15.26 icmp_seq=5 Destination Host Unreachable From 192.168.15.26 icmp_seq=6 Destination Host Unreachable From 192.168.15.26 icmp_seq=7 Destination Host Unreachable From 192.168.15.26 icmp_seq=8 Destination Host Unreachable From 192.168.15.26 icmp_seq=9 Destination Host Unreachable From 192.168.15.26 icmp_seq=11 Destination Host Unreachable From 192.168.15.26 icmp_seq=12 Destination Host Unreachable ^C --- 192.168.60.254 ping statistics --- 14 packets transmitted, 0 received, +10 errors, 100% packet loss, time 13070ms pipe 3 |
#ifup eth2
|
#ifconfig
eth2 Link encap:Ethernet HWaddr 70:71:bc:09:3a:ec inet addr:192.168.60.1 Bcast:192.168.60.255 Mask:255.255.255.0 inet6 addr: fe80::7271:bcff:fe09:3aec/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:550474 errors:0 dropped:0 overruns:0 frame:0 TX packets:264204 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:776156262 (740.2 MiB) TX bytes:18835424 (17.9 MiB) Interrupt:20 Memory:f0600000-f0620000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:57 errors:0 dropped:0 overruns:0 frame:0 TX packets:57 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5248 (5.1 KiB) TX bytes:5248 (5.1 KiB) |
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. 64 bytes from 10.0.35.1: icmp_req=1 ttl=63 time=0.201 ms 64 bytes from 10.0.35.1: icmp_req=2 ttl=63 time=0.245 ms 64 bytes from 10.0.35.1: icmp_req=3 ttl=63 time=0.283 ms ^C --- 10.0.35.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1998ms rtt min/avg/max/mdev = 0.201/0.243/0.283/0.033 ms |
#ping 192.168.60.1
PING 192.168.60.1 (192.168.60.1) 56(84) bytes of data. 64 bytes from 192.168.60.1: icmp_req=1 ttl=64 time=0.023 ms 64 bytes from 192.168.60.1: icmp_req=2 ttl=64 time=0.015 ms ^C --- 192.168.60.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.015/0.019/0.023/0.004 ms |
#ping 192.168.60.254
PING 192.168.60.254 (192.168.60.254) 56(84) bytes of data. 64 bytes from 192.168.60.254: icmp_req=1 ttl=64 time=0.936 ms 64 bytes from 192.168.60.254: icmp_req=2 ttl=64 time=0.614 ms 64 bytes from 192.168.60.254: icmp_req=3 ttl=64 time=0.622 ms ^C --- 192.168.60.254 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.614/0.724/0.936/0.149 ms |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.60.254 0.0.0.0 UG 0 0 0 eth2 192.168.60.0 * 255.255.255.0 U 0 0 0 eth2 |
#~]#
bash: ~]#: command not found |
#~}#
bash: ~}#: command not found |
#~.
bash: ~.: command not found |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default gw6.unix.nt 0.0.0.0 UG 0 0 0 eth2 192.168.60.0 * 255.255.255.0 U 0 0 0 eth2 |
#get-apt install dhcp3-server
bash: get-apt: command not found |
#less /etc/dhcp/dhcpd.conf
|
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd failed! Starting ISC DHCP server: dhcpd. |
#tail /var/log/daemon.log
Oct 17 15:12:36 linux6 NetworkManager[20642]: <info> (eth2): carrier now ON (device state 1) Oct 17 15:12:51 linux6 NetworkManager[20642]: <info> (eth2): carrier now OFF (device state 1) Oct 17 15:13:11 linux6 NetworkManager[20642]: <info> (eth2): carrier now ON (device state 1) Oct 17 15:17:10 linux6 avahi-daemon[18320]: Withdrawing address record for 192.168.15.26 on eth2. Oct 17 15:17:10 linux6 avahi-daemon[18320]: Leaving mDNS multicast group on interface eth2.IPv4 with address 192.168.15.26. Oct 17 15:17:10 linux6 avahi-daemon[18320]: Interface eth2.IPv4 no longer relevant for mDNS. Oct 17 15:17:10 linux6 avahi-daemon[18320]: Joining mDNS multicast group on interface eth2.IPv4 with address 192.168.60.1. Oct 17 15:17:10 linux6 avahi-daemon[18320]: New relevant interface eth2.IPv4 for mDNS. Oct 17 15:17:10 linux6 avahi-daemon[18320]: Registering new address record for 192.168.60.1 on eth2.IPv4. Oct 17 15:17:25 linux6 ntpdate[31610]: step time server 193.193.193.107 offset -0.240105 sec |
#tail -f /var/lib/dhcp/dhcpd.leases
lease 192.168.60.200 { starts 1 2011/10/17 13:10:12; ends 1 2011/10/17 13:20:12; cltt 1 2011/10/17 13:10:12; binding state active; next binding state free; hardware ethernet 00:26:18:04:aa:04; uid "\001\000&\030\004\252\004"; client-hostname "Eee1000HD"; } ^[[A^[[B^[[B^[[B^[[A^C |
#tail -f /var/lib/dhcp/dhcpd.leases
lease 192.168.60.200 { starts 1 2011/10/17 13:10:12; ends 1 2011/10/17 13:20:12; cltt 1 2011/10/17 13:10:12; binding state active; next binding state free; hardware ethernet 00:26:18:04:aa:04; uid "\001\000&\030\004\252\004"; client-hostname "Eee1000HD"; } ... starts 1 2011/10/17 13:22:20; ends 1 2011/10/17 13:32:20; cltt 1 2011/10/17 13:22:20; binding state active; next binding state free; hardware ethernet 00:19:e7:42:72:65; uid "\001\000\031\347Bre"; client-hostname "SEP0019E7427265"; } ^C |
#tail -f /var/lib/dhcp/dhcpd.leases
lease 192.168.60.200 { starts 1 2011/10/17 13:47:08; ends 1 2011/10/17 13:57:08; cltt 1 2011/10/17 13:47:08; binding state active; next binding state free; hardware ethernet 00:26:18:04:aa:04; uid "\001\000&\030\004\252\004"; client-hostname "Eee1000HD"; } ^C |
#cat /etc/asterisk/sip.conf | sed 's/;.*//' | expand | grep -xv ' *' | less
|
#cat /etc/asterisk/sip.conf | sed 's/;.*//' | expand | grep -xv ' *' | head -7 | less
|
#cat /etc/asterisk/sip.conf | sed 's/;.*//' | expand | grep -xv ' *' | head -7 | less >>sip.conf
|
#cat /etc/asterisk/sip.conf.SAVED | sed 's/;.*//' | expand | grep -xv ' *' | head -7 | less > /etc/asterisk/sip.conf
|
#cp sip.conf.SAVED sip.conf
cp: cannot stat `sip.conf.SAVED': No such file or directory |
#cp sip.conf sip.conf.SAVED
|
#scp user@192.168.50.1 /etc/asterisk/sip.conf .
cp: cannot stat `user@192.168.50.1': No such file or directory |
#scp user@192.168.50.1:/etc/asterisk/sip.conf .
The authenticity of host '192.168.50.1 (192.168.50.1)' can't be established. RSA key fingerprint is 21:74:39:4b:aa:04:6e:2b:da:e5:52:0d:90:f5:08:01. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.50.1' (RSA) to the list of known hosts. user@192.168.50.1's password: scp: /etc/asterisk/sip.conf: Permission denied |
#scp root@192.168.50.1:/etc/asterisk/sip.conf .
root@192.168.50.1's password: sip.conf 100% 208 0.2KB/s 00:00 |
#cat sip.conf
[general] context=default allowoverlap=no udpbindaddr=0.0.0.0 tcpenable=no tcpbindaddr=0.0.0.0 srvlookup=yes |
#sip show peers
bash: sip: command not found |
#sip show peers
bash: sip: command not found |
#mv
mv: missing file operand Try `mv --help' for more information. |
#mv /etc/asterisk/extensions.conf /etc/asterisk/extensions.cong.SAVED
|
#vim /etc/asterisk/extensions.conf
--- /dev/null 2011-10-17 14:23:54.443475743 +0300 +++ /etc/asterisk/extensions.conf 2011-10-17 17:48:45.000000000 +0300 @@ -0,0 +1,6 @@ +[default] + + + + +exten => 2299,1,Playback(hello-world) |
#seep show peers
bash: seep: command not found |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux6 (pid = 1127) ... Name/username Host Dyn Nat ACL Port Status 2201/2201 192.168.60.201 D 5060 Unmonitored 2202/2202 192.168.60.200 D 41634 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] == Using SIP RTP CoS mark 5 [Oct 17 17:54:44] NOTICE[1162]: chan_sip.c:20276 handle_request_invite: Call from '2202' to extension '2201' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Oct 17 17:54:54] NOTICE[1162]: chan_sip.c:20276 handle_request_invite: Call from '2202' to extension '2299' rejected because extension not found in context 'default'. linux6*CLI> exit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1371.13282.21756 2011-10-17 17:55:28.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-17 17:56:21.000000000 +0300 @@ -3,4 +3,5 @@ -exten => 2299,1,Playback(hello-world) +exten => 2299,1,Playback(demo-thanks) + |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux6 (pid = 1127) ... == Using SIP RTP CoS mark 5 linux6*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 2201/2201 192.168.60.201 D 5060 Unmonitored 2202/2202 192.168.60.200 D 41634 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] == Using SIP RTP CoS mark 5 == Using SIP RTP CoS mark 5 linux6*CLI> exit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1371.31092.17604 2011-10-17 17:59:11.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-17 18:00:21.000000000 +0300 @@ -4,4 +4,5 @@ exten => 2299,1,Playback(demo-thanks) +exten => _220X,1,Dial(SIP/$(EXTEN)) |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1371.7602.11427 2011-10-17 18:03:25.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-17 18:03:53.000000000 +0300 @@ -4,5 +4,5 @@ exten => 2299,1,Playback(demo-thanks) -exten => _220X,1,Dial(SIP/$(EXTEN)) +exten => _220X,1,Dial(SIP/{$EXTEN}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1371.15291.6758 2011-10-17 18:05:07.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-17 18:06:36.000000000 +0300 @@ -4,5 +4,5 @@ exten => 2299,1,Playback(demo-thanks) -exten => _220X,1,Dial(SIP/{$EXTEN}) +exten => _220X,1,Dial(SIP/${EXTEN}) |
#ping 192.168.60.254
PING 192.168.60.254 (192.168.60.254) 56(84) bytes of data. 64 bytes from 192.168.60.254: icmp_req=1 ttl=64 time=0.700 ms 64 bytes from 192.168.60.254: icmp_req=2 ttl=64 time=0.667 ms 64 bytes from 192.168.60.254: icmp_req=3 ttl=64 time=0.634 ms ^C --- 192.168.60.254 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.634/0.667/0.700/0.026 ms |
#ping 192.168.60.200
PING 192.168.60.200 (192.168.60.200) 56(84) bytes of data. 64 bytes from 192.168.60.200: icmp_req=1 ttl=128 time=0.236 ms 64 bytes from 192.168.60.200: icmp_req=2 ttl=128 time=0.238 ms ^C --- 192.168.60.200 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.236/0.237/0.238/0.001 ms |
#ping 192.168.60.201
PING 192.168.60.201 (192.168.60.201) 56(84) bytes of data. 64 bytes from 192.168.60.201: icmp_req=1 ttl=250 time=63.7 ms 64 bytes from 192.168.60.201: icmp_req=2 ttl=250 time=62.4 ms ^C --- 192.168.60.201 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 62.402/63.067/63.733/0.711 ms |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.60.254 0.0.0.0 UG 0 0 0 eth2 192.168.60.0 * 255.255.255.0 U 0 0 0 eth2 |
#nslookup
> 192.168.60.254 ;; connection timed out; no servers could be reached > exit |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3748.15503.3389 2011-10-18 10:10:08.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-18 10:11:50.000000000 +0300 @@ -5,4 +5,5 @@ exten => 2299,1,Playback(demo-thanks) exten => _220X,1,Dial(SIP/${EXTEN}) - +exten => 2298,1,Record(recorded-voice:wap,2) +exten => 2298,n,Playback(recorded-voice) |
#ls -l /var/spool/asterisk/
total 28 drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 dictate drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 meetme drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 monitor drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 outgoing drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 system drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 tmp drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 voicemail |
#ls -l /var/spool/asterisk/
total 28 drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 dictate drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 meetme drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 monitor drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 outgoing drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 system drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 tmp drwxr-x--- 2 asterisk asterisk 4096 Jul 7 12:28 voicemail |
#ps aux | grep aster
asterisk 1127 0.0 0.2 48312 18668 ? Ssl Oct17 0:33 /usr/sbin/asterisk -p -U asterisk asterisk 1128 0.0 0.0 2936 564 ? S Oct17 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 1127 root 3882 0.0 0.0 3908 720 pts/7 S+ 10:17 0:00 grep aster |
#ps aux | grep aster
asterisk 1127 0.0 0.2 48312 18668 ? Ssl Oct17 0:33 /usr/sbin/asterisk -p -U asterisk asterisk 1128 0.0 0.0 2936 564 ? S Oct17 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 1127 root 3882 0.0 0.0 3908 720 pts/7 S+ 10:17 0:00 grep aster |
#cat /etc/asterisk/sip.conf
[general] context=default allowoverlap=no udpbindaddr=0.0.0.0 tcpenable=no tcpbindaddr=0.0.0.0 srvlookup=yes [2201] type=friend ;friend peer user secret=1234 host=dynamic [2202] type=friend secret=1234 host=dynamic |
#cat /etc/asterisk/sip.conf
[general] context=default allowoverlap=no udpbindaddr=0.0.0.0 tcpenable=no tcpbindaddr=0.0.0.0 srvlookup=yes [2201] type=friend ;friend peer user secret=1234 host=dynamic [2202] type=friend secret=1234 host=dynamic |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3748.9836.1581 2011-10-18 11:34:57.000000000 +0300 +++ /etc/asterisk/sip.conf 2011-10-18 11:36:26.000000000 +0300 @@ -6,6 +6,7 @@ tcpbindaddr=0.0.0.0 srvlookup=yes canreinvite=no + register => bat:1234@192.168.50.1/tbs [2201] @@ -19,10 +20,10 @@ host=dynamic [tbs] - type=friend secret=1234 host=dynamic username=bat + |
[general] context=default allowoverlap=no udpbindaddr=0.0.0.0 tcpenable=no tcpbindaddr=0.0.0.0 srvlookup=yes [2201] type=friend ;friend peer user secret=1234 host=dynamic [2202] type=friend secret=1234 host=dynamic
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth2 iface eth2 inet static address 192.168.15.26 netmask 255.255.255.0 network 192.168.15.0 broadcast 192.168.15.255 gateway 192.168.15.253 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt
search unix.nt nameserver 10.0.35.1
[general] context=default allowoverlap=no udpbindaddr=0.0.0.0 tcpenable=no tcpbindaddr=0.0.0.0 srvlookup=yes
Время первой команды журнала | 11:53:52 2011-10-17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:42:53 2011-10-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 10.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 14.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.44 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.49 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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