/l3/users/roman-sidorenko/asterisk/debian4/root :1 :2 :3 :4 :5 :6 :7 |
|
#apt-get install xfce4
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: a2ps aspell aspell-en dbus dbus-x11 defoma desktop-base desktop-file-utils eject exo-utils fontconfig fontconfig-config fortune-mod fortunes-min gamin gconf2 gconf2-common ghostscript gs-common gsfonts gtk2-engines-xfce hal hal-info hicolor-icon-theme libasound2 libaspell15 libatk1.0-0 libatk1.0-data libcairo2 libcroco3 libcups2 libcupsimage2 libcupsys2 libdatrie0 libdbus-1-3 libdbus-glib-1-2 libdirectfb-1.0-0 libdirectfb-extra ... Cleaning up category type1.. Updating category type1.. Updating category type3.. Updating category gsfontderivative.. Updating category truetype.. Updating category cid.. Updating category cmap.. Updating category psprint.. Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-2.6.26-2-686 |
#apt-get install iceweasel
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: liblcms1 libmozjs1d libnspr4-0d libnss3-1d xulrunner-1.9 Suggested packages: xulrunner-1.9-gnome-support latex-xft-fonts xfonts-mathml ttf-mathematica4.1 xprint mozplugger liblcms-utils The following NEW packages will be installed: iceweasel liblcms1 libmozjs1d libnspr4-0d libnss3-1d xulrunner-1.9 ... Unpacking xulrunner-1.9 (from .../xulrunner-1.9_1.9.0.13-0lenny1_i386.deb) ... Selecting previously deselected package iceweasel. Unpacking iceweasel (from .../iceweasel_3.0.6-1_i386.deb) ... Processing triggers for man-db ... Setting up libnspr4-0d (4.7.1-4) ... Setting up liblcms1 (1.17.dfsg-1+lenny2) ... Setting up libmozjs1d (1.9.0.13-0lenny1) ... Setting up libnss3-1d (3.12.3.1-0lenny1) ... Setting up xulrunner-1.9 (1.9.0.13-0lenny1) ... Setting up iceweasel (3.0.6-1) ... |
#vim /etc/network/interfaces
--- /tmp/l3-saved-12601.22416.4935 2009-12-07 02:32:15.000000000 -1000 +++ /etc/network/interfaces 2009-12-07 02:33:05.000000000 -1000 @@ -8,10 +8,10 @@ # The primary network interface allow-hotplug eth1 iface eth1 inet static - address 192.168.7.4 + address 192.168.102.1 netmask 255.255.255.0 - network 192.168.7.0 - broadcast 192.168.7.255 - gateway 192.168.7.254 + network 192.168.102.0 + broadcast 192.168.102.255 + gateway 192.168.102.254 # dns-* options are implemented by the resolvconf package, if installed - dns-nameservers 10.8.35.1 + dns-nameservers 10.0.35.1 |
#apt-get install minicom
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: lrzsz The following NEW packages will be installed: lrzsz minicom 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 417kB of archives. After this operation, 1434kB of additional disk space will be used. ... Get:2 http://10.0.35.1 lenny/main minicom 2.3-1 [317kB] Fetched 417kB in 0s (4133kB/s) Selecting previously deselected package lrzsz. (Reading database ... 38178 files and directories currently installed.) Unpacking lrzsz (from .../lrzsz_0.12.21-4.1_i386.deb) ... Selecting previously deselected package minicom. Unpacking minicom (from .../minicom_2.3-1_i386.deb) ... Processing triggers for man-db ... Setting up lrzsz (0.12.21-4.1) ... Setting up minicom (2.3-1) ... |
#minicom
Welcome to minicom 2.3 OPTIONS: I18n Press CTRL-A Z for help on special keys Compiled on Feb 24 2008, 16:35:15. Port /dev/ttyS1 |
#minicom /dev/tty
tty tty16 tty24 tty32 tty40 tty49 tty57 tty8 tty0 tty17 tty25 tty33 tty41 tty5 tty58 tty9 tty1 tty18 tty26 tty34 tty42 tty50 tty59 ttyS0 tty10 tty19 tty27 tty35 tty43 tty51 tty6 ttyS1 tty11 tty2 tty28 tty36 tty44 tty52 tty60 ttyS2 tty12 tty20 tty29 tty37 tty45 tty53 tty61 ttyS3 tty13 tty21 tty3 tty38 tty46 tty54 tty62 ttyUSB0 tty14 tty22 tty30 tty39 tty47 tty55 tty63 tty15 tty23 tty31 tty4 tty48 tty56 tty7 |
#minicom /dev/ttyUSB0
Welcome to minicom 2.3 OPTIONS: I18n Press CTRL-A Z for help on special keys Compiled on Feb 24 2008, 16:35:15. Port /dev/ttyS1 |
#minicom -o
Welcome to minicom 2.3 OPTIONS: I18n Press CTRL-A Z for help on special keys Compiled on Feb 24 2008, 16:35:15. Port /dev/ttyS1 |
#minicom -s
Welcome to minicom 2.3 OPTIONS: I18n Press CTRL-A Z for help on special keys Compiled on Feb 24 2008, 16:35:15. Port /dev/ttyUSB0 Management VLAN : IP Routing : Enabled 55.0 192.168.102.1 0007e9-0c4580 dynamic 2 IP ARP table ProCurve Switch 3400cl-48G(config)# u IP ARP table ProCurve Switch 3400cl-48G(config)# Killed |
#/etc/init.d/networking restart
Reconfiguring network interfaces...SIOCDELRT: No such process done. |
#ping -c 4 192.168.102.254
PING 192.168.102.254 (192.168.102.254) 56(84) bytes of data. From 192.168.7.4 icmp_seq=2 Destination Host Unreachable From 192.168.7.4 icmp_seq=3 Destination Host Unreachable From 192.168.7.4 icmp_seq=4 Destination Host Unreachable ^C --- 192.168.102.254 ping statistics --- 4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3018ms , pipe 2 |
#ifconfig
eth1 Link encap:Ethernet HWaddr 00:07:e9:0c:45:80 inet addr:192.168.7.4 Bcast:192.168.7.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe0c:4580/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:95449 errors:0 dropped:0 overruns:0 frame:0 TX packets:46206 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:142213150 (135.6 MiB) TX bytes:3378675 (3.2 MiB) 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:15 errors:0 dropped:0 overruns:0 frame:0 TX packets:15 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1216 (1.1 KiB) TX bytes:1216 (1.1 KiB) |
#ifup eth1
|
#ping -c 4 192.168.101.254
PING 192.168.101.254 (192.168.101.254) 56(84) bytes of data. 64 bytes from 192.168.101.254: icmp_seq=1 ttl=64 time=0.680 ms 64 bytes from 192.168.101.254: icmp_seq=2 ttl=64 time=0.777 ms 64 bytes from 192.168.101.254: icmp_seq=3 ttl=64 time=0.630 ms ^C --- 192.168.101.254 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.630/0.695/0.777/0.068 ms |
#ping -c 4 192.168.101.3
PING 192.168.101.3 (192.168.101.3) 56(84) bytes of data. 64 bytes from 192.168.101.3: icmp_seq=1 ttl=63 time=0.289 ms 64 bytes from 192.168.101.3: icmp_seq=2 ttl=63 time=0.160 ms 64 bytes from 192.168.101.3: icmp_seq=3 ttl=63 time=0.254 ms 64 bytes from 192.168.101.3: icmp_seq=4 ttl=63 time=0.338 ms --- 192.168.101.3 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 0.160/0.260/0.338/0.066 ms |
#apt-get install dhcp3-server
│ │ └───────────────────────────────────────────────────────────────────────────┘ Selecting previously deselected package dhcp3-server. (Reading database ... 38275 files and directories currently installed.) Unpacking dhcp3-server (from .../dhcp3-server_3.1.1-6+lenny3_i386.deb) ... Processing triggers for man-db ... Setting up dhcp3-server (3.1.1-6+lenny3) ... Generating /etc/default/dhcp3-server... Starting DHCP server: dhcpd3check syslog for diagnostics. failed! failed! invoke-rc.d: initscript dhcp3-server, action "start" failed. |
#vim /etc/dhcp3/dhcpd.conf
|
#option broadcast-address 10.254.239.31;
# option domain-name "internal.example.org"; # option routers 10.5.5.1; # option broadcast-address 10.5.5.31; # default-lease-time 600; # max-lease-time 7200; #} # Hosts which require special configuration options can be listed in # host statements. If no address is specified, the address will be # will still come from the host declaration. subnet 192.168.102.0 netmask 255.255.255.224 { range 192.168.102.100 192.168.102.200; option domain-name-servers unix.nt; option routers 192.168.102.254; option routers 10.5. } default-lease-time 600; "/etc/dhcp3/dhcpd.conf" 108L, 3550C written |
#/etc/init.d/dhcp3-server restart
dhcpd self-test failed. Please fix the config file. The error was: Internet Systems Consortium DHCP Server V3.1.1 Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ bad range, address 192.168.102.100 not in subnet 192.168.102.0 netmask 255.255.255.224 |
#cat /var/
backups/ lib/ lock/ mail/ run/ tmp/ cache/ local/ log/ opt/ spool/ |
#cat /var/lib/
apt/ gconf/ tex-common/ aptitude/ hal/ ucf/ aspell/ initramfs-tools/ urandom/ dbus/ initscripts/ usbutils/ defoma/ libuuid/ vim/ dhcp3/ logrotate/ x11/ dictionaries-common/ misc/ xkb/ dpkg/ mlocate/ exim4/ nfs/ |
#cat /var/lib/dhcp3/dhc
dhclient.leases dhcpd.leases dhcpd.leases~ |
#cat /var/lib/dhcp3/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-V3.1.1 lease 192.168.102.100 { starts 1 2009/12/07 12:47:29; ends 1 2009/12/07 12:57:29; cltt 1 2009/12/07 12:47:29; binding state active; next binding state free; hardware ethernet 00:1e:8c:64:2c:4a; uid "\001\000\036\214d,J"; ... lease 192.168.102.101 { starts 1 2009/12/07 12:52:56; ends 1 2009/12/07 14:52:56; cltt 1 2009/12/07 12:52:56; binding state active; next binding state free; hardware ethernet 00:05:5d:21:62:03; uid "\001\000\005]!b\003"; client-hostname "romchiko-book"; } |
#apt-get install screen
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: screen 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 604kB of archives. After this operation, 1008kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main screen 4.0.3-11+lenny1 [604kB] Fetched 604kB in 0s (4773kB/s) Selecting previously deselected package screen. (Reading database ... 38288 files and directories currently installed.) Unpacking screen (from .../screen_4.0.3-11+lenny1_i386.deb) ... Processing triggers for man-db ... Setting up screen (4.0.3-11+lenny1) ... |
#apt-get install ssh
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: openssh-blacklist openssh-blacklist-extra openssh-server Suggested packages: ssh-askpass rssh molly-guard The following NEW packages will be installed: openssh-blacklist openssh-blacklist-extra openssh-server ssh 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. ... Selecting previously deselected package ssh. Unpacking ssh (from .../ssh_1%3a5.1p1-5_all.deb) ... Processing triggers for man-db ... Setting up openssh-blacklist (0.4.1) ... Setting up openssh-blacklist-extra (0.4.1) ... Setting up openssh-server (1:5.1p1-5) ... Creating SSH2 RSA key; this may take some time ... Creating SSH2 DSA key; this may take some time ... Restarting OpenBSD Secure Shell server: sshd. Setting up ssh (1:5.1p1-5) ... |
#screen
|
#YO!
bash: YO!: command not found |
## dyk
|
#alias 'YO'='echo ty krut CHUVAK'
|
#YO
ty krut CHUVAK |
#apt-cache search asterisk
asterisk - Open Source Private Branch Exchange (PBX) asterisk-chan-capi - Common ISDN API 2.0 implementation for Asterisk asterisk-config - Configuration files for Asterisk asterisk-dbg - Debugging symbols for Asterisk asterisk-dev - Development files for Asterisk asterisk-doc - Source code documentation for Asterisk asterisk-h323 - H.323 protocol 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-oh323 - H.323 protocol support for Asterisk ... asterisk-prompt-it - Italian voice prompts for the Asterisk PBX asterisk-prompt-se - Swedish voice prompts for Asterisk asterisk-sounds-extra - Additional sound files for the Asterisk PBX asterisk-sounds-main - Core Sound files for Asterisk (English) destar - management interface for the Asterisk PBX iaxmodem - software modem with IAX2 connectivity libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI libiax-dev - implementation of the Inter-Asterisk eXchange protocol (devel) libiax0 - implementation of the Inter-Asterisk eXchange protocol python-asterisk - Asterisk Manager API interface module for Python |
#dpkg -L asterisk | grep /etc
/etc /etc/asterisk /etc/logrotate.d /etc/logrotate.d/asterisk /etc/default /etc/default/asterisk /etc/init.d /etc/init.d/asterisk |
#less /etc/logrotate.d/asterisk
|
#less /etc/default/asterisk
|
#ls /etc/rc2.d/
README S16ssh S20openbsd-inetd S89atd S99stop-bootlogd S10rsyslog S20exim4 S21asterisk S89cron S12acpid S20lpd S24hal S99rc.local S12dbus S20nfs-common S40dhcp3-server S99rmnologin |
#mv /etc/rc2.d/{S,s}21asterisk
|
#mv /etc/rc2.d/{s,S}21asterisk
|
#update-rc.d
usage: update-rc.d [-n] [-f] <basename> remove update-rc.d [-n] <basename> defaults [NN | SS KK] update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] . -n: not really -f: force |
#update-rc.d asterisk remove
update-rc.d: /etc/init.d/asterisk exists during rc.d purge (use -f to force) |
#update-rc.d -f asterisk remove
Removing any system startup links for /etc/init.d/asterisk ... /etc/rc0.d/K21asterisk /etc/rc1.d/K21asterisk /etc/rc2.d/S21asterisk /etc/rc3.d/S21asterisk /etc/rc4.d/S21asterisk /etc/rc5.d/S21asterisk /etc/rc6.d/K21asterisk |
#update-rc.d asterisk defaults
Adding system startup for /etc/init.d/asterisk ... /etc/rc0.d/K20asterisk -> ../init.d/asterisk /etc/rc1.d/K20asterisk -> ../init.d/asterisk /etc/rc6.d/K20asterisk -> ../init.d/asterisk /etc/rc2.d/S20asterisk -> ../init.d/asterisk /etc/rc3.d/S20asterisk -> ../init.d/asterisk /etc/rc4.d/S20asterisk -> ../init.d/asterisk /etc/rc5.d/S20asterisk -> ../init.d/asterisk |
#runlevel
N 2 |
#who -r
run-level 2 2009-12-07 01:00 last=S |
#ls /etc/asterisk/
adsi.conf enum.conf manager.conf rtp.conf adtranvofr.conf esel.conf manager.d say.conf agents.conf extconfig.conf meetme.conf sip.conf alarmreceiver.conf extensions.ael mgcp.conf sip_notify.conf alsa.conf extensions.conf misdn.conf skinny.conf amd.conf features.conf modules.conf sla.conf asterisk.adsi festival.conf musiconhold.conf smdi.conf asterisk.conf followme.conf muted.conf telcordia-1.adsi cdr.conf func_odbc.conf osp.conf udptl.conf cdr_custom.conf gtalk.conf oss.conf users.conf cdr_manager.conf h323.conf phone.conf voicemail.conf cdr_odbc.conf http.conf privacy.conf vpb.conf cdr_pgsql.conf iax.conf queues.conf watchdog.conf cdr_tds.conf iaxprov.conf res_odbc.conf zapata.conf codecs.conf indications.conf res_pgsql.conf dnsmgr.conf jabber.conf res_snmp.conf dundi.conf logger.conf rpt.conf |
#ls -l /etc/asterisk/sip.conf
-rw-r----- 1 asterisk asterisk 31889 2009-01-04 09:26 /etc/asterisk/sip.conf |
#strings /usr/lib/asterisk/modules/chan_sip.so | grep /etc
|
#strings /usr/lib/asterisk/modules/chan_sip.so | less
|
#ls -l /etc/asterisk/sip.conf
-rw-r----- 1 asterisk asterisk 31889 2009-01-04 09:26 /etc/asterisk/sip.conf |
#less /etc/asterisk/users.conf
|
#mv /etc/asterisk/extensions.conf{,.SAVED}
|
#cd /etc/asterisk/
|
#vim sip.conf
--- /dev/null 2009-12-07 01:00:31.505001687 -1000 +++ sip.conf 2009-12-07 03:53:16.000000000 -1000 @@ -0,0 +1,7 @@ +context=default + +[201] +type=friend +host=dynamic +secret=1234 + |
#asterisk -r
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian4 (pid = 18289) debian4*CLI> quit |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... No such module 'sip' The 'reload' command is deprecated and will be removed in a future release. Please use 'module reload' instead. debian4*CLI> module load reload show unload debian4*CLI> module load reload show unload debian4*CLI> module reload sip No such module 'sip' debian4*CLI> quit Executing last minute cleanups |
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... zap show cadences List cadences zap show channels Show active zapata channels zap show channel Show information on a channel zap show status Show all Zaptel cards status debian4*CLI> help | less No such command '| less'. debian4*CLI> debian4*CLI> debian4*CLI> quit Executing last minute cleanups |
#ls /var/log/asterisk/
cdr-csv cdr-custom event_log messages queue_log |
#less /var/log/asterisk/messages
|
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-13650.24369.4745 2009-12-07 03:57:41.000000000 -1000 +++ /etc/asterisk/sip.conf 2009-12-07 03:57:47.000000000 -1000 @@ -1,3 +1,4 @@ +[general] context=default [201] |
#ls -l
total 432 -rw-r----- 1 asterisk asterisk 140 2009-01-04 09:26 adsi.conf -rw-r----- 1 asterisk asterisk 840 2009-01-04 09:26 adtranvofr.conf -rw-r----- 1 asterisk asterisk 2724 2009-01-04 09:26 agents.conf -rw-r----- 1 asterisk asterisk 2227 2009-01-04 09:26 alarmreceiver.conf -rw-r----- 1 asterisk asterisk 2675 2009-01-04 09:26 alsa.conf -rw-r----- 1 asterisk asterisk 767 2009-01-04 09:26 amd.conf -rw-r----- 1 asterisk asterisk 3260 2009-01-04 09:26 asterisk.adsi -rw-r----- 1 asterisk asterisk 247 2009-01-04 09:17 asterisk.conf -rw-r----- 1 asterisk asterisk 7324 2009-01-04 09:26 cdr.conf ... -rw-r----- 1 asterisk asterisk 4044 2009-01-04 09:26 skinny.conf -rw-r----- 1 asterisk asterisk 6691 2009-01-04 09:26 sla.conf -rw-r----- 1 asterisk asterisk 2665 2009-01-04 09:26 smdi.conf -rw-r----- 1 asterisk asterisk 1384 2009-01-04 09:26 telcordia-1.adsi -rw-r----- 1 asterisk asterisk 598 2009-01-04 09:26 udptl.conf -rw-r----- 1 asterisk asterisk 1804 2009-01-04 09:26 users.conf -rw-r----- 1 asterisk asterisk 11723 2009-01-04 09:26 voicemail.conf -rw-r----- 1 asterisk asterisk 2772 2009-01-04 09:26 vpb.conf -rw-r----- 1 asterisk asterisk 393 2009-01-04 09:26 watchdog.conf -rw-r----- 1 asterisk asterisk 24193 2009-01-04 09:26 zapata.conf |
#less sip.conf
|
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... Def. Username: SIP Options : (none) Codecs : 0x8000e (gsm|ulaw|alaw|h263) Codec Order : (none) Auto-Framing: No Status : Unmonitored Useragent : Reg. Contact : debian4*CLI> quit Executing last minute cleanups |
#less sip.conf
|
#vi sip.conf
--- /tmp/l3-saved-13650.29211.6872 2009-12-07 04:05:05.000000000 -1000 +++ sip.conf 2009-12-07 04:07:22.000000000 -1000 @@ -5,4 +5,5 @@ type=friend host=dynamic secret=1234 +callerid="Roman Sidorenko" |
#vim extensions.conf
--- /dev/null 2009-12-07 01:00:31.505001687 -1000 +++ extensions.conf 2009-12-07 04:18:39.000000000 -1000 @@ -0,0 +1,7 @@ +[default] + +exten => 202,1,Answer +exten => 202,n,Wait(1) +exten => 202,n,Playback(demo-congrats) +exten => 202,n,Hangup + |
#apt-get install bash-completion
Reading package lists... Done Building dependency tree Reading state information... Done bash-completion is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#. /etc/bash_completion
|
#apt-get install asterisk-sounds-
asterisk-sounds-extra asterisk-sounds-main |
#dpkg -L asterisk-sounds-main | less
|
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian4 (pid = 18419) Verbosity is at least 1 debian4*CLI> dia dialplan dial debian4*CLI> dialplan reload No such command 'dialplan reload' (type 'help dialplan reload' for other possible commands) debian4*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rx show dialplan context
No such command 'show' (type 'help show' for other possible commands) |
#asterisk -rx 'show dialplan context'
There is no existence of 'context' context |
#asterisk -rx 'show dialplan default'
[ Context 'default' created by 'pbx_config' ] '202' => 1. Answer() [pbx_config] 2. Wait(1) [pbx_config] 3. Playback(demo-congrats) [pbx_config] 4. Hangup() [pbx_config] -= 1 extension (4 priorities) in 1 context. =- |
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... Reg. Contact : debian4*CLI> sip show peer Usage: sip show peer <name> [load] Shows all details on one SIP peer and the current status. Option "load" forces lookup of peer in realtime storage. debian4*CLI> sip show peer all Peer all not found. debian4*CLI> sip show peer peers peer debian4*CLI> sip show peer |
#cat sip.conf
[general] context=default [201] type=friend host=dynamic secret=1234 callerid="Roman Sidorenko" |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Executing [202@default:1] Answer("SIP/201-09b07440", "") in new stack -- Executing [202@default:2] Wait("SIP/201-09b07440", "1") in new stack -- Executing [202@default:3] Playback("SIP/201-09b07440", "demo-congrats") in new stack -- <SIP/201-09b07440> Playing 'demo-congrats' (language 'en') -- Executing [202@default:4] Hangup("SIP/201-09b07440", "") in new stack == Spawn extension (default, 202, 4) exited non-zero on 'SIP/201-09b07440' debian4*CLI> q No such command 'q' (type 'help q' for other possible commands) debian4*CLI> quit Executing last minute cleanups |
#apt-cache search sox gsm
libsox-fmt-gsm - SoX GSM format library sox - Swiss army knife of sound processing |
#apt-cache search sox mp3
cplay - A front-end for various audio players libsox-fmt-mp3 - SoX MP3 format library sox - Swiss army knife of sound processing |
#apt-get install sox libsox-fmt-gsm libsox-fmt-mp3
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libid3tag0 libmad0 libsamplerate0 libsox-fmt-alsa libsox-fmt-base libsox0 Suggested packages: libsox-fmt-all The following NEW packages will be installed: libid3tag0 libmad0 libsamplerate0 libsox-fmt-alsa libsox-fmt-base libsox-fmt-gsm libsox-fmt-mp3 libsox0 sox 0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. ... Processing triggers for man-db ... Setting up libid3tag0 (0.15.1b-10) ... Setting up libmad0 (0.15.1b-4) ... Setting up libsamplerate0 (0.1.4-1) ... Setting up libsox0 (14.0.1-2+b1) ... Setting up libsox-fmt-alsa (14.0.1-2+b1) ... Setting up libsox-fmt-base (14.0.1-2+b1) ... Setting up libsox-fmt-gsm (14.0.1-2+b1) ... Setting up libsox-fmt-mp3 (14.0.1-2+b1) ... Setting up sox (14.0.1-2+b1) ... |
#scp -r 192.168.101.3:~/Rondo .
The authenticity of host '192.168.101.3 (192.168.101.3)' can't be established. RSA key fingerprint is 9f:cb:11:58:16:4c:80:65:e6:fa:8c:e4:04:c8:a6:53. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.101.3' (RSA) to the list of known hosts. root@192.168.101.3's password: rondo_veneziano_-_danza_mediterranea.mp3 100% 7146KB 7.0MB/s 00:00 rondo_veneziano_-_re_sole.mp3 100% 5088KB 5.0MB/s 00:01 rondo_veneziano_-_la_serenissima.mp3 100% 3255KB 3.2MB/s 00:00 rondo_veneziano_-_bettina.mp3 100% 2960KB 2.9MB/s 00:00 rondo_veneziano_-_gioco_italiano.mp3 100% 8603KB 8.4MB/s 00:01 ... rondo_veneziano_-_viaggio_italiano.mp3 100% 8581KB 8.4MB/s 00:01 rondo_veneziano_-_nostalgia_di_venezia.mp3 100% 2321KB 2.3MB/s 00:00 rondo_veneziano_-_casanova.mp3 100% 3705KB 3.6MB/s 00:01 rondo_veneziano_-_donna_lucrezia.mp3 100% 5006KB 4.9MB/s 00:00 rondo_veneziano_-_torcello.mp3 100% 4271KB 4.2MB/s 00:00 rondo_veneziano_-_magica.mp3 100% 4857KB 4.7MB/s 00:01 rondo_veneziano_-_cattedrali.mp3 100% 6281KB 6.1MB/s 00:00 rondo_veneziano_-_alba_sul_mare.mp3 100% 5772KB 5.6MB/s 00:01 rondo_veneziano_-_desiree.mp3 100% 4736KB 4.6MB/s 00:00 rondo_veneziano_-_lorientale.mp3 100% 4353KB 4.3MB/s 00:01 |
#man sox
|
#sox rondo_veneziano_-_
rondo_veneziano_-_alba_sul_mare.mp3 rondo_veneziano_-_incontro.mp3 rondo_veneziano_-_bettina.mp3 rondo_veneziano_-_interludio.mp3 rondo_veneziano_-_casanova.mp3 rondo_veneziano_-_la_serenissima.mp3 rondo_veneziano_-_cattedrali.mp3 rondo_veneziano_-_lorientale.mp3 rondo_veneziano_-_cecilia.mp3 rondo_veneziano_-_magica.mp3 rondo_veneziano_-_danza_mediterranea.mp3 rondo_veneziano_-_nostalgia_di_venezia.mp3 rondo_veneziano_-_desiree.mp3 rondo_veneziano_-_re_sole.mp3 rondo_veneziano_-_donna_lucrezia.mp3 rondo_veneziano_-_torcello.mp3 rondo_veneziano_-_fantasia_veneziana.mp3 rondo_veneziano_-_viaggio_italiano.mp3 rondo_veneziano_-_gioco_italiano.mp3 |
#sox rondo_veneziano_-_alba_sul_mare.mp3 alba.gsm
|
#ls -l alba.gsm
-rw-r--r-- 1 root root 3838824 2009-12-07 04:39 alba.gsm |
#file alba.gsm
alba.gsm: data |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-13650.26280.11439 2009-12-07 04:39:55.000000000 -1000 +++ /etc/asterisk/extensions.conf 2009-12-07 04:40:06.000000000 -1000 @@ -2,6 +2,7 @@ exten => 202,1,Answer exten => 202,n,Wait(1) -exten => 202,n,Playback(demo-congrats) +exten => 202,n,Playback(alba) +;exten => 202,n,Playback(demo-congrats) exten => 202,n,Hangup |
#asterisk -rx 'dialplan reload'
Dialplan reloaded. |
#man sox
|
#apt-get install mpg123
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libmpg123-0 Suggested packages: libartsc0 libaudio2 libaudiofile0 libesd0 libesd-alsa0 libjack0 libpulse0 The following NEW packages will be installed: libmpg123-0 mpg123 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... Get:2 http://10.0.35.1 lenny/main mpg123 1.4.3-4 [130kB] Fetched 476kB in 0s (4939kB/s) Selecting previously deselected package libmpg123-0. (Reading database ... 43034 files and directories currently installed.) Unpacking libmpg123-0 (from .../libmpg123-0_1.4.3-4_i386.deb) ... Selecting previously deselected package mpg123. Unpacking mpg123 (from .../mpg123_1.4.3-4_i386.deb) ... Processing triggers for man-db ... Setting up libmpg123-0 (1.4.3-4) ... Setting up mpg123 (1.4.3-4) ... |
#mpg123 -w alba.wav rondo_veneziano_-_alba_sul_mare.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 version 1.4.3; written and copyright by Michael Hipp and others free software (LGPL/GPL) without any warranty but with best wishes Playing MPEG stream 1 of 1: rondo_veneziano_-_alba_sul_mare.mp3 ... Title: Alba sul mare Artist: Papagena Comment: Album: Rondo Veneziano 2 Year: Genre: classic MPEG 1.0 layer III, 224 kbit/s, 44100 Hz stereo [3:31] Decoding of rondo_veneziano_-_alba_sul_mare.mp3 finished. |
#rm /usr/share/asterisk/sounds/alb
alba.gsm albuquerque.gsm |
#rm /usr/share/asterisk/sounds/alb
alba.gsm albuquerque.gsm |
#rm /usr/share/asterisk/sounds/alba.gsm
|
#cp alba.wav /usr/share/asterisk/sounds/alba.wav
|
#mpg123 rondo_veneziano_-_alba_sul_mare.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 version 1.4.3; written and copyright by Michael Hipp and others free software (LGPL/GPL) without any warranty but with best wishes Playing MPEG stream 1 of 1: rondo_veneziano_-_alba_sul_mare.mp3 ... Title: Alba sul mare Artist: Papagena Comment: Album: Rondo Veneziano 2 Year: Genre: classic MPEG 1.0 layer III, 224 kbit/s, 44100 Hz stereo ^C [2:34] Decoding of rondo_veneziano_-_alba_sul_mare.mp3 finished. |
#apt-cache search alsa utils
alsa-utils - ALSA utilities awesfx - utility programs for AWE32/64 and Emu10k1 driver gnome-alsamixer - ALSA sound mixer for GNOME |
#apt-get install alsa-utils
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: alsa-base linux-sound-base Suggested packages: apmd alsa-oss oss-compat The following NEW packages will be installed: alsa-base alsa-utils linux-sound-base 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. ... (Reading database ... 43082 files and directories currently installed.) Unpacking linux-sound-base (from .../linux-sound-base_1.0.17.dfsg-4_all.deb) ... Selecting previously deselected package alsa-base. Unpacking alsa-base (from .../alsa-base_1.0.17.dfsg-4_all.deb) ... Selecting previously deselected package alsa-utils. Unpacking alsa-utils (from .../alsa-utils_1.0.16-2_i386.deb) ... Processing triggers for man-db ... Setting up linux-sound-base (1.0.17.dfsg-4) ... Setting up alsa-base (1.0.17.dfsg-4) ... Setting up alsa-utils (1.0.16-2) ... |
backups/ lib/ lock/ mail/ run/ tmp/ cache/ local/ log/ opt/ spool/
apt/ gconf/ tex-common/ aptitude/ hal/ ucf/ aspell/ initramfs-tools/ urandom/ dbus/ initscripts/ usbutils/ defoma/ libuuid/ vim/ dhcp3/ logrotate/ x11/ dictionaries-common/ misc/ xkb/ dpkg/ mlocate/ exim4/ nfs/
dhclient.leases dhcpd.leases dhcpd.leases~
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-V3.1.1 lease 192.168.102.100 { starts 1 2009/12/07 12:47:29; ends 1 2009/12/07 12:57:29; cltt 1 2009/12/07 12:47:29; binding state active; next binding state free; hardware ethernet 00:1e:8c:64:2c:4a; uid "\001\000\036\214d,J"; client-hostname "pc-"; } lease 192.168.102.101 { starts 1 2009/12/07 12:47:57; ends 1 2009/12/07 12:57:57; cltt 1 2009/12/07 12:47:57; binding state active; next binding state free; hardware ethernet 00:05:5d:21:62:03; uid "\001\000\005]!b\003"; client-hostname "romchiko-book"; } lease 192.168.102.102 { starts 1 2009/12/07 12:51:27; ends 1 2009/12/07 13:01:27; cltt 1 2009/12/07 12:51:27; binding state active; next binding state free; hardware ethernet 00:04:13:24:e5:7e; uid "\001\000\004\023$\345~"; } lease 192.168.102.100 { starts 1 2009/12/07 12:52:29; ends 1 2009/12/07 13:02:29; cltt 1 2009/12/07 12:52:29; binding state active; next binding state free; hardware ethernet 00:1e:8c:64:2c:4a; uid "\001\000\036\214d,J"; client-hostname "pc-"; } lease 192.168.102.101 { starts 1 2009/12/07 12:52:56; ends 1 2009/12/07 14:52:56; cltt 1 2009/12/07 12:52:56; binding state active; next binding state free; hardware ethernet 00:05:5d:21:62:03; uid "\001\000\005]!b\003"; client-hostname "romchiko-book"; }
[general] context=default [201] type=friend host=dynamic secret=1234 callerid="Roman Sidorenko"
Время первой команды журнала | 13:08:25 2009-12- 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:48:10 2009-12- 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 8.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.66 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.63 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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