/l3/users/igor-public/nt-voip/linux0.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 |
|
#dpkg-reconfigure locales
Package configuration ┌──────────────────────────┤ Configuring locales ├──────────────────────────┐ │ Locales are a framework to switch between multiple languages and allow │ │ users to use their language, country, characters, collation order, etc. │ │ │ │ Please choose which locales to generate. UTF-8 locales should be chosen │ │ by default, particularly for new installations. Other character sets may │ │ be useful for backwards compatibility with older systems and software. │ │ │ │ Locales to be generated: │ ... │ │ │ <Ok> <Cancel> │ │ │ └───────────────────────────────────────────────────────────────────────────┘ Generating locales (this might take a while)... de_DE.UTF-8... done en_US.UTF-8... done fr_FR.UTF-8... done ru_UA.UTF-8... done Generation complete. |
#LANG=fr_FR.UTF-8 date
lundi 23 avril 2012, 12:25:49 (UTC+0300) |
#LANG=de_DE.UTF-8 date
Mo 23. Apr 12:26:06 EEST 2012 |
#LANG=de_DE.UTF-8 cp
cp: missing file operand Try `cp --help' for more information. |
#LC_ALL=de_DE.UTF-8 cp
cp: missing file operand Try `cp --help' for more information. |
#export | less
|
#LANG=de_DE.UTF-8 cp
cp: Fehlendes Dateioperand „cp --help“ gibt weitere Informationen. |
#LANG=fr_FR.UTF-8 cp
cp: opérande fichier manquant Saisissez « cp --help » pour plus d'informations. |
#cat ~/.l3rc
l3cd=/users/alexsay/nt-voip/linux3.unix.nt/root |
#cat ~user/.l3rc
cat: ~user/.l3rc: Нет такого файла или каталога |
#cat ~alexsay/.l3rc
l3cd=/users/alexsay/nt-voip/linux3.unix.nt/alexsay |
#pkill -1 l3-agent
|
#exit
exit Connection to 192.168.15.3 closed. |
#apt-cache search asterisk
asterisk-mobile - bluetooth mobile devices support for Asterisk asterisk-mp3 - MP3 format support (format_mp3) for the Asterisk PBX asterisk-mysql - MySQL support for the Asterisk PBX (cdr mainly) asterisk-ooh323c - H.323 protocol support for Asterisk (ooh323c stack) asterisk-chan-capi - Common ISDN API 2.0 implementation for Asterisk asterisk-core-sounds-en-g722 - asterisk PBX sound files - English/g722 asterisk-core-sounds-en-gsm - asterisk PBX sound files - English/gsm asterisk-core-sounds-en-wav - asterisk PBX sound files - English/wav asterisk-core-sounds-es-g722 - asterisk PBX sound files - Spanish/g722 asterisk-core-sounds-es-gsm - asterisk PBX sound files - Spanish/gsm ... asterisk - Open Source Private Branch Exchange (PBX) dahdi-linux - DAHDI telephony interface - Linux userspace parts dahdi-source - DAHDI telephony interface - source code for kernel driver dahdi - utilities for using the DAHDI kernel modules iaxmodem - software modem with IAX2 connectivity libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI libnetsds-perl - Service Delivery Suite framework op-panel - switchboard type application for the Asterisk PBX libopenr2-3 - MFC/R2 (telephony) call setup library python-asterisk - Asterisk Manager API interface module for Python |
#apt-cache search asterisk | less
|
#vim /etc/bash.bashrc
--- /tmp/l3-saved-2340.13591.3217 2012-04-23 12:35:18.000000000 +0300 +++ /etc/bash.bashrc 2012-04-23 12:35:24.000000000 +0300 @@ -29,9 +29,9 @@ #esac # enable bash completion in interactive shells -#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then -# . /etc/bash_completion -#fi +if [ -f /etc/bash_completion ] && ! shopt -oq posix; then + . /etc/bash_completion +fi # if the command-not-found package is installed, use it if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found ]; then |
#dpkg -L asterisk | less
|
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk. |
#less /etc/logrotate.d/asterisk
|
#ls /usr/lib/asterisk/modules/app* | less
|
#/etc/init.d/asterisk status
Asterisk PBX is running. |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#/etc/init.d/asterisk status
Asterisk PBX is not running ... failed! |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze4, 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 Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?) |
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk. |
#ssh 192.168.15.5
The authenticity of host '192.168.15.5 (192.168.15.5)' can't be established. RSA key fingerprint is 04:93:5b:b5:f1:59:3c:0c:38:37:bb:d2:f9:55:28:6b. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.5' (RSA) to the list of known hosts. root@192.168.15.5'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 ... codec_g722.so ITU G.722-64kbps G722 Transcoder 0 func_rand.so Random number dialplan function 0 198 modules loaded linux5*CLI> linux5*CLI> root@linux5:~# root@linux5:~# root@linux5:~# exit logout Connection to 192.168.15.5 closed. |
#ssh 192.168.15.5
~ ~ ~ ~ ~ ~ ~ ~ ~ root@linux5:~# exit logout Connection to 192.168.15.5 closed. |
#ssh 192.168.15.5
root@192.168.15.5'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 Apr 23 14:11:19 2012 from note.unix.nt l3-agent is already running: pid=7560; pidfile=/root/.lilalo/l3-agent.pid |
#exit
exit Connection to 192.168.15.5 closed. |
#ssh 192.168.15.253
The authenticity of host '192.168.15.253 (192.168.15.253)' can't be established. RSA key fingerprint is 23:4b:a2:99:88:79:fc:35:b7:62:e8:6b:0d:d0:e1:4b. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.253' (RSA) to the list of known hosts. root@192.168.15.253's password: |
#ssh 192.168.15.255
ssh: connect to host 192.168.15.255 port 22: Network is unreachable |
#ssh 192.168.15.254
Connection to 192.168.15.254 closed. |
#vim x
--- /dev/null 2012-04-23 11:36:55.334143723 +0300 +++ x 2012-04-23 14:18:46.000000000 +0300 @@ -0,0 +1,6 @@ +14 16 +18 20 +4 6 +10 15 +8 3 + |
#history
1 usermod -s /bin/bash igor 2 exit 3 passwd user 4 useradd -m -s /bin/bash user 5 passwd user 6 exit 7 lspci 8 apt-get install gnome 9 dpkg-reconfigure locales 10 LANG=fr_FR.UTF-8 date ... 50 ssh 192.168.15.5 51 ssh 192.168.15.5 52 ssh 192.168.15.253 53 ssh 192.168.15.255 54 ssh 192.168.15.254 55 vim x 56 vlan=10; cat x | while read l; do echo vlan $vlan tagged $l ;done 57 vlan=10; cat x | while read l; do echo vlan $vlan tagged $l ;vlan=$[vlan+10]; done 58 vlan=10; cat x | while read l; do echo vlan $vlan tagged $l ;vlan=$[vlan+10]; echo vlan $vlan ip address 192.168.$vlan.254 255.255.255.0; done 59 history |
#history | tail > y
|
#vim y
--- /tmp/l3-saved-2340.9383.29549 2012-04-23 14:20:41.000000000 +0300 +++ y 2012-04-23 14:21:30.000000000 +0300 @@ -1,10 +1,7 @@ - 51 ssh 192.168.15.5 - 52 ssh 192.168.15.253 - 53 ssh 192.168.15.255 - 54 ssh 192.168.15.254 - 55 vim x - 56 vlan=10; cat x | while read l; do echo vlan $vlan tagged $l ;done - 57 vlan=10; cat x | while read l; do echo vlan $vlan tagged $l ;vlan=$[vlan+10]; done - 58 vlan=10; cat x | while read l; do echo vlan $vlan tagged $l ;vlan=$[vlan+10]; echo vlan $vlan ip address 192.168.$vlan.254 255.255.255.0; done - 59 history - 60 history | tail > y +vlan=10 +cat x | while read l +do +echo vlan $vlan tagged $l +echo vlan $vlan ip address 192.168.$vlan.254 255.255.255.0 +vlan=$[vlan+10] +done |
#bash y
vlan 10 tagged 14 16 vlan 10 ip address 192.168.10.254 255.255.255.0 vlan 20 tagged 18 20 vlan 20 ip address 192.168.20.254 255.255.255.0 vlan 30 tagged 4 6 vlan 30 ip address 192.168.30.254 255.255.255.0 vlan 40 tagged 10 15 vlan 40 ip address 192.168.40.254 255.255.255.0 vlan 50 tagged 8 3 vlan 50 ip address 192.168.50.254 255.255.255.0 vlan 60 tagged vlan 60 ip address 192.168.60.254 255.255.255.0 |
#vim y
|
#~
18 20 4 6 ~ 10 15 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "x" 5L, 45C written |
#bash y
vlan 10 tagged 14 16 vlan 10 ip address 192.168.10.254 255.255.255.0 vlan 20 tagged 18 20 vlan 20 ip address 192.168.20.254 255.255.255.0 vlan 30 tagged 4 6 vlan 30 ip address 192.168.30.254 255.255.255.0 vlan 40 tagged 10 15 vlan 40 ip address 192.168.40.254 255.255.255.0 vlan 50 tagged 8 3 vlan 50 ip address 192.168.50.254 255.255.255.0 |
#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 eth0 iface eth0 inet static address 192.168.15.252 netmask 255.255.255.0 network 192.168.15.0 broadcast 192.168.15.255 gateway 192.168.15.254 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt |
#bash y
vlan 10 untagged 14,16 vlan 20 untagged 18,20 vlan 30 untagged 4,6 vlan 40 untagged 10,15 vlan 50 untagged 8,3 |
#ssh 192.168.15.254
ProCurve J8164A Switch 2626-PWR Software revision H.10.83 Connection to 192.168.15.254 closed. |
##helo
|
#ssh 192.168.15.254
name "VLAN10" untagged 14,16 ip address 192.168.10.254 255.255.255.0 exit vlan 20 name "VLAN20" untagged 18,20 ip address 192.168.20.254 255.255.255.0 exit vlan 30 name "VLAN30" Connection to 192.168.15.254 closed. |
#apt-cache search dhcp server
ahcpd - the Ad-Hoc Configuration Protocol avahi-autoipd - Avahi IPv4LL network address configuration daemon bootp - server for the bootp protocol with DHCP support udhcpd - Provides the busybox DHCP server implementation dhcp-helper - A DHCP relay agent dhcp-probe - network DHCP or BootP server discover dhcpdump - Parse DHCP packets from tcpdump dhcping - DHCP Daemon Ping Program dhis-server - Dynamic Host Information System - server dibbler-client - portable DHCPv6 client ... libnm-util-dev - network management framework (development files) libnm-util1 - network management framework (shared library) network-manager-dbg - network management framework daemon - debugging symbols network-manager - network management framework daemon pump - BOOTP and DHCP client for automatic IP configuration pxe - free PXE daemon python-pydhcplib - Python DHCP client/server library resolvconf - name server information handler totd - Small DNS proxy that supports IPv6/IPv4 record translation wide-dhcpv6-server - DHCPv6 server for automatic IPv6 hosts configuration |
#apt-cache search dhcp server | less
|
#vim /etc/dhcp/dhc
--- /tmp/l3-saved-2340.7432.11716 2012-04-23 14:46:59.000000000 +0300 +++ /etc/dhcp/dhcpd.conf 2012-04-23 14:48:11.000000000 +0300 @@ -32,10 +32,10 @@ # This is a very basic subnet declaration. -#subnet 10.254.239.0 netmask 255.255.255.224 { -# range 10.254.239.10 10.254.239.20; -# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; -#} +subnet 192.168.15.0 netmask 255.255.255.0 { + range 192.168.15.200 192.168.15.250; + option routers 192.168.15.254; +} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. |
#vim /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-2340.17568.8693 2012-04-23 14:49:24.000000000 +0300 +++ /etc/dhcp/dhcpd.conf 2012-04-23 14:56:30.000000000 +0300 @@ -10,8 +10,8 @@ ddns-update-style none; # option definitions common to all supported networks... -option domain-name "example.org"; -option domain-name-servers ns1.example.org, ns2.example.org; +option domain-name "unix.nt"; +option domain-name-servers 10.0.35.1; default-lease-time 600; max-lease-time 7200; @@ -38,6 +38,7 @@ } # This declaration allows BOOTP clients to get dynamic addresses, +# ng option domain-name-servers 10.0.35.1; # which we don't really recommend. #subnet 10.254.239.32 netmask 255.255.255.224 { |
#vim /etc/dhcp/dhcpd.conf
|
#cat /etc/default/
acpid dbus isc-dhcp-server rsync alsa devpts kdm.d/ rsyslog asterisk exim4 keyboard saned avahi-daemon grub locale ssh bluetooth hal nfs-common tmpfs bootlogd halt ntpdate useradd console-setup hdparm portmap cron ifupdown rcS |
#cat /etc/default/isc-dhcp-server
# Defaults for dhcp initscript # sourced by /etc/init.d/dhcp # installed at /etc/default/isc-dhcp-server by the maintainer scripts # # This is a POSIX shell fragment # # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". INTERFACES="" |
#/etc/init.d/
acpid hdparm pppd-dns alsa-utils hostname.sh procps anacron hwclockfirst.sh rc asterisk hwclock.sh rc.local atd ifupdown rcS aumix ifupdown-clean reboot avahi-daemon isc-dhcp-server rmnologin binfmt-support kbd rsync bluetooth keyboard-setup rsyslog bootlogd killprocs saned ... checkroot.sh mountall-bootclean.sh ssh console-setup mountall.sh stop-bootlogd cpufrequtils mountdevsubfs.sh stop-bootlogd-single cron mountkernfs.sh sudo dahdi mountnfs-bootclean.sh udev dbus mountnfs.sh udev-mtab exim4 mountoverflowtmp umountfs fancontrol mtab.sh umountnfs.sh fuse networking umountroot gdm3 network-manager unattended-upgrades |
#/etc/init.d/isc-dhcp-server
.ICE-unix/ orbit-Debian-gdm/ ssh-JACDld1075/ .X11-unix/ install orbit-password/ x .xfsm-ICE-X250CW keyring-MCrsEU/ orbit-user/ .X0-lock y |
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd failed! Starting ISC DHCP server: dhcpd. |
#ssh 192.168.10.1
The authenticity of host '192.168.10.1 (192.168.10.1)' can't be established. RSA key fingerprint is 1c:10:13:1e:42:34:91:26:d6:05:1c:89:28:1e:3b:95. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.10.1' (RSA) to the list of known hosts. root@192.168.10.1's password: Linux linux1 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 ... root@linux1:~# root@linux1:~# ps aux | grep dhc root 2573 0.0 0.0 4092 1824 ? Ss 15:16 0:00 /usr/sbin/dhcpd -q eth0 root 2578 0.0 0.0 3908 736 pts/3 S+ 15:16 0:00 grep dhc root@linux1:~# /etc/init.d/isc-dhcp-server restart Stopping ISC DHCP server: dhcpd. Starting ISC DHCP server: dhcpd. root@linux1:~# exit logout Connection to 192.168.10.1 closed. |
#exit
exit Connection to 192.168.50.1 closed. |
#ssh 192.168.15.254
192.168.30.201 000b82-12fe54 dynamic 6 192.168.40.1 000ffe-7eb8fb dynamic 10 192.168.40.10 001bfc-f38313 dynamic 15 192.168.50.1 000ffe-7eb939 dynamic 8 192.168.50.200 001c23-f9543e dynamic 3 10.0.1.4 00155d-b28504 dynamic 26 ProCurve Switch 2626-PWR# conf t ProCurve Switch 2626-PWR(config)# vlan 40 untagged 12 ProCurve Switch 2626-PWR(config)# ProCurve Switch 2626-PWR(config)# ProCurve Switch 2626-PWR(config)# wr m ProCurve Switch 2626-PWR(config)# ProCurve Switch 2626-PWR(config)# sh run Running configuration: Connection to 192.168.15.254 closed. |
#ssh 192.168.15.254
Connection to 192.168.15.254 closed. |
#cd /etc/asterisk/
|
#less sip.conf
|
#vim sip.conf
--- /dev/null 2012-04-23 11:36:55.334143723 +0300 +++ sip.conf 2012-04-23 15:52:26.000000000 +0300 @@ -0,0 +1,12 @@ +context = default + +[6001] +type=friend +secret=1234 +host=dynamic + +[6002] +type=friend +secret=1234 +host=dynamic + |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux0 (pid = 6436) Verbosity is at least 3 linux0*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': == Found [Apr 23 15:52:33] WARNING[6456]: config.c:1100 process_text_line: parse error: No category context for line 1 of /etc/asterisk/sip.conf [Apr 23 15:52:33] ERROR[6456]: chan_sip.c:24547 reload_config: Contents of sip.conf are invalid and cannot be parsed linux0*CLI> quit Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux0 (pid = 6436) ... linux0*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] -- Remote UNIX connection disconnected -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux0*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux0 (pid = 7931) Verbosity was 0 and is now 3 linux0*CLI> sip show peers No such command 'sip show peers' (type 'core show help sip show' for other possible commands) linux0*CLI> quit Executing last minute cleanups |
#asterisk -rvvv
|
#vim /etc/asterisk/extensions.conf
|
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux0 (pid = 8172) ... -- merging incls/swits/igpats from old(parkedcalls) to new(parkedcalls) context, registrar = pbx_config -- Added extension '700' priority 1 to parkedcalls (0x91716b0) -- Time to scan old dialplan and merge leftovers back into the new: 0.000699 sec -- Time to restore hints and swap in new dialplan: 0.000001 sec -- Time to delete the old dialplan: 0.000092 sec -- Total time merge_contexts_delete: 0.000792 sec linux0*CLI> linux0*CLI> linux0*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
|
#~
extensions.ael extensions.conf.SAVE extensions_minivm.conf extensions.conf extensions.lua |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux0 (pid = 8172) ... -- Registered extension context 'ael-dundi-e164-customers' (0xb50aa460) in local table 0x91732c0; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-customers) to new(ael-dundi-e164-customers) context, registrar = pbx_config -- Registered extension context 'ael-dundi-e164-canonical' (0xb50aa4f0) in local table 0x91732c0; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-canonical) to new(ael-dundi-e164-canonical) context, registrar = pbx_config -- Time to scan old dialplan and merge leftovers back into the new: 0.000688 sec -- Time to restore hints and swap in new dialplan: 0.000001 sec -- Time to delete the old dialplan: 0.000035 sec -- Total time merge_contexts_delete: 0.000724 sec linux0*CLI> quit Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux0 (pid = 8172) ... -- Added extension 's' priority 1 to app_queue_gosub_virtual_context (0x91709b0) -- Registered extension context 'parkedcalls' (0xb50ab0d8) in local table 0x90c3ed8; registrar: features -- merging incls/swits/igpats from old(parkedcalls) to new(parkedcalls) context, registrar = pbx_config -- Added extension '700' priority 1 to parkedcalls (0xb50ab0d8) -- Time to scan old dialplan and merge leftovers back into the new: 0.000632 sec -- Time to restore hints and swap in new dialplan: 0.000001 sec -- Time to delete the old dialplan: 0.000039 sec -- Total time merge_contexts_delete: 0.000672 sec linux0*CLI> quit Executing last minute cleanups |
#grep ael-dundi-e164-switc /etc/asterisk/*
/etc/asterisk/extensions.ael.save:context ael-dundi-e164-switch { /etc/asterisk/extensions.ael.save: ael-dundi-e164-switch; |
#mkdir /etc/asterisk/save/
|
#mv /etc/asterisk/extensions.
extensions.ael.save extensions.conf.SAVE extensions.conf extensions.lua.save |
#kdir
asterisk -rvvv Asterisk 1.6.2.9-2+squeeze4, 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 ... -- Registered extension context 'ael-dundi-e164-canonical' (0x9169900) in local table 0x91733d0; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-canonical) to new(ael-dundi-e164-canonical) context, registrar = pbx_config -- Time to scan old dialplan and merge leftovers back into the new: 0.000673 sec -- Time to restore hints and swap in new dialplan: 0.000001 sec -- Time to delete the old dialplan: 0.000039 sec -- Total time merge_contexts_delete: 0.000713 sec linux0*CLI> linux0*CLI> linux0*CLI> quit Executing last minute cleanups |
#ls /usr/share/asterisk/sounds/
1-for-am-2-for-pm.gsm 1-yes-2-no.gsm abandon-all-hope.gsm abandons.gsm academic-support.gsm access-code.gsm access-denied.gsm access-granted.gsm accessible-through-system.gsm account-balance-is.gsm ... your.gsm your-msg-has-been-saved.gsm your-msg-is-too-short.gsm your-notifications.gsm your-req-notification.gsm your-temp-greeting.gsm you-seem-impatient.gsm you-sound-cute.gsm you-wish-to-join.gsm zip-code.gsm |
#ls /usr/share/asterisk/sounds/*thanks*
/usr/share/asterisk/sounds/thanks-for-calling-today.gsm /usr/share/asterisk/sounds/thanks-for-using.gsm |
#ssh 192.168.15.1
^C |
#ssh 192.168.10.1
exten => 1001,1,Dial(SIP/1001) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ root@linux1:~# exit logout Connection to 192.168.10.1 closed. |
#~
_60XX,1,Dial(SIP/${EXTEN}) exten => 6001,1,Dial(SIP/6001) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/extensions.conf" 5L, 86C written |
#ssh 192.168.10.1
root@192.168.10.1's password: Linux linux1 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 Apr 23 17:04:03 2012 from note.unix.nt root@linux1:~# root@linux1:~# root@linux1:~# root@linux1:~# exit logout Connection to 192.168.10.1 closed. |
#ssh 192.168.15.254
Connection to 192.168.15.254 closed. |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux0 (pid = 8172) Verbosity is at least 3 linux0*CLI> set verbose 4 No such command 'set verbose 4' (type 'core show help set verbose' for other possible commands) linux0*CLI> core set verbose 4 Verbosity was 3 and is now 4 linux0*CLI> exit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
|
#asterisk -rv
Asterisk 1.6.2.9-2+squeeze4, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze4 currently running on linux0 (pid = 8172) Verbosity is at least 4 linux0*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': == Found [Apr 24 10:35:11] NOTICE[8192]: chan_sip.c:24169 build_peer: The 'username' field for sip peers has been deprecated in favor of the term 'defaultuser' == Parsing '/etc/asterisk/sip_notify.conf': == Found linux0*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 6001/6001 (Unspecified) D N 5060 Unmonitored 6002/6002 (Unspecified) D N 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] linux0*CLI> exit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#ssh 192.168.10.1
root@192.168.10.1's password: Linux linux1 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: Tue Apr 24 10:10:54 2012 from note.unix.nt l3-agent is already running: pid=2288; pidfile=/root/.lilalo/l3-agent.pid root@linux1:~# less /etc/asterisk/sip.conf ... type=friend secret=1234 host=dynamic [1005] type=friend secret=1234 host=dynamic root@linux1:~# exit logout Connection to 192.168.10.1 closed. |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-8577.128.23877 2012-04-24 11:00:29.000000000 +0300 +++ /etc/asterisk/sip.conf 2012-04-24 11:06:29.000000000 +0300 @@ -1,5 +1,6 @@ [general] context = default +register => zurich:password@192.168.30.1/bern [local-phone](!) type=friend @@ -15,3 +16,10 @@ username=6002 secret=1234 +[bern] +type=friend +secret=password +host=dynamic +canreinvite=no +username=zurich + |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:23 inet addr:192.168.15.252 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b923/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:643074 errors:0 dropped:3 overruns:0 frame:0 TX packets:358027 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:845440121 (806.2 MiB) TX bytes:35548888 (33.9 MiB) Interrupt:19 Memory:f0180000-f01a0000 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:1207 errors:0 dropped:0 overruns:0 frame:0 TX packets:1207 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:137818 (134.5 KiB) TX bytes:137818 (134.5 KiB) |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-8577.12471.19292 2012-04-24 11:10:08.000000000 +0300 +++ /etc/asterisk/extensions.conf 2012-04-24 11:13:50.000000000 +0300 @@ -3,3 +3,5 @@ exten => 6000,1,Playback(demo-thanks) exten => _60XX,1,Dial(SIP/${EXTEN}) +exten => _30XX,1,Dial(SIP/bern/${EXTEN}) + |
#vim /etc/asterisk/sip.conf
|
#canreinvite=no
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux0 (pid = 8172) ... == Using SIP RTP CoS mark 5 -- Executing [6001@default:1] Dial("SIP/bern-00000000", "SIP/6001") in new stack == Using SIP RTP CoS mark 5 -- Called 6001 -- SIP/6001-00000001 is ringing -- SIP/6001-00000001 answered SIP/bern-00000000 -- Packet2Packet bridging SIP/bern-00000000 and SIP/6001-00000001 == Spawn extension (default, 6001, 1) exited non-zero on 'SIP/bern-00000000' linux0*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-8577.6617.31298 2012-04-24 11:39:13.000000000 +0300 +++ /etc/asterisk/extensions.conf 2012-04-24 11:41:35.000000000 +0300 @@ -1,12 +1,27 @@ [default] +[internal] + +[local] exten => 6000,1,Playback(demo-thanks) exten => _60XX,1,Dial(SIP/${EXTEN}) +[national] exten => _30XX,1,Dial(SIP/bern/${EXTEN}) +[international] exten => _10XX,1,Dial(SIP/bern/${EXTEN}) exten => _20XX,1,Dial(SIP/bern/${EXTEN}) exten => _40XX,1,Dial(SIP/bern/${EXTEN}) exten => _50XX,1,Dial(SIP/bern/${EXTEN}) +[gr1] +include => internal +include => local +include => national +include => international + +[gr2] +include => internal +include => local + |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-8577.2121.3629 2012-04-24 11:41:39.000000000 +0300 +++ /etc/asterisk/sip.conf 2012-04-24 11:42:18.000000000 +0300 @@ -11,10 +11,12 @@ [6001](local-phone) username=6001 secret=1234 +context=gr1 [6002](local-phone) username=6002 secret=1234 +context=gr2 [bern] type=friend |
acpid dbus isc-dhcp-server rsync alsa devpts kdm.d/ rsyslog asterisk exim4 keyboard saned avahi-daemon grub locale ssh bluetooth hal nfs-common tmpfs bootlogd halt ntpdate useradd console-setup hdparm portmap cron ifupdown rcS
# Defaults for dhcp initscript # sourced by /etc/init.d/dhcp # installed at /etc/default/isc-dhcp-server by the maintainer scripts # # This is a POSIX shell fragment # # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". 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 eth0 iface eth0 inet static address 192.168.15.252 netmask 255.255.255.0 network 192.168.15.0 broadcast 192.168.15.255 gateway 192.168.15.254 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt
l3cd=/users/alexsay/nt-voip/linux3.unix.nt/root
l3cd=/users/alexsay/nt-voip/linux3.unix.nt/alexsay
Время первой команды журнала | 11:22:55 2012- 4-23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:41:35 2012- 4-24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 10.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.03 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.41 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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