Журнал лабораторных работ

Содержание

Журнал

Среда (10/19/11)

/dev/tty2
08:48:03
#whereis tc
tc: /sbin/tc /usr/lib/tc /usr/share/man/man8/tc.8.gz
08:48:11
#apt-cache search hping3
hping3 - Active Network Smashing Tool
08:51:07
#apt-get install hping3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  mysql-common libmysqlclient16
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  hping3
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 103 kB of archives.
After this operation, 315 kB of additional disk space will be used.
Get:1 http://10.0.35.1/debian/ squeeze/main hping3 i386 3.a2.ds2-6 [103 kB]
Fetched 103 kB in 0s (7861 kB/s)
Selecting previously deselected package hping3.
(Reading database ... 115517 files and directories currently installed.)
Unpacking hping3 (from .../hping3_3.a2.ds2-6_i386.deb) ...
Processing triggers for man-db ...
Setting up hping3 (3.a2.ds2-6) ...
08:51:22
#hping3 -2 192.168.70.1
HPING 192.168.70.1 (eth0 192.168.70.1): udp mode set, 28 headers + 0 data bytes
ICMP Port Unreachable from ip=192.168.70.1 name=linux7.unix.nt
status=0 port=2033 seq=0
ICMP Port Unreachable from ip=192.168.70.1 name=linux7.unix.nt
status=0 port=2034 seq=1
ICMP Port Unreachable from ip=192.168.70.1 name=linux7.unix.nt
status=0 port=2035 seq=2
ICMP Port Unreachable from ip=192.168.70.1 name=linux7.unix.nt
status=0 port=2036 seq=3
ICMP Port Unreachable from ip=192.168.70.1 name=linux7.unix.nt
...
ICMP Port Unreachable from ip=192.168.70.1 name=linux7.unix.nt
status=0 port=2039 seq=6
ICMP Port Unreachable from ip=192.168.70.1 name=linux7.unix.nt
status=0 port=2040 seq=7
ICMP Port Unreachable from ip=192.168.70.1 name=linux7.unix.nt
status=0 port=2041 seq=8
^C
--- 192.168.70.1 hping statistic ---
9 packets transmitted, 9 packets received, 0% packet loss
round-trip min/avg/max = 0.2/0.3/1.2 ms
08:52:24
#hping3 192.168.70.1 -udp
hping3: option requires an argument -- d
Try hping3 --help
08:53:11
#hping3 -udp 192.168.70.1
hping3: option requires an argument -- d
Try hping3 --help
08:53:19
#hping3 -S -p 80 www.microsoft.com
HPING www.microsoft.com (eth0 65.55.12.249): S set, 40 headers + 0 data bytes
len=46 ip=65.55.12.249 ttl=240 id=58256 sport=80 flags=SA seq=0 win=8190 rtt=186.2 ms
len=46 ip=65.55.12.249 ttl=240 id=16613 sport=80 flags=SA seq=1 win=8190 rtt=186.1 ms
len=46 ip=65.55.12.249 ttl=240 id=569 sport=80 flags=SA seq=2 win=8190 rtt=186.6 ms
len=46 ip=65.55.12.249 ttl=240 id=22670 sport=80 flags=SA seq=3 win=8190 rtt=186.1 ms
len=46 ip=65.55.12.249 ttl=240 id=43489 sport=80 flags=SA seq=4 win=8190 rtt=186.1 ms
len=46 ip=65.55.12.249 ttl=240 id=52790 sport=80 flags=SA seq=5 win=8190 rtt=186.6 ms
len=46 ip=65.55.12.249 ttl=240 id=5257 sport=80 flags=SA seq=6 win=8190 rtt=186.2 ms
len=46 ip=65.55.12.249 ttl=240 id=12505 sport=80 flags=SA seq=7 win=8190 rtt=186.1 ms
len=46 ip=65.55.12.249 ttl=240 id=44585 sport=80 flags=SA seq=8 win=8190 rtt=186.2 ms
^C
--- www.microsoft.com hping statistic ---
10 packets transmitted, 9 packets received, 10% packet loss
round-trip min/avg/max = 186.1/186.3/186.6 ms
08:54:46
#apt-cache search icmp tunnel
icmptx - Tunnel IP over ICMP
ptunnel - Tunnel TCP connections over ICMP packets
08:57:26
#apt-cache search iperf
iperf - Internet Protocol bandwidth measuring tool
08:59:04
#apt-get install iperf
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  mysql-common libmysqlclient16
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  iperf
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 52.5 kB of archives.
After this operation, 143 kB of additional disk space will be used.
Get:1 http://10.0.35.1/debian/ squeeze/main iperf i386 2.0.4-5 [52.5 kB]
Fetched 52.5 kB in 0s (713 kB/s)
Selecting previously deselected package iperf.
(Reading database ... 115548 files and directories currently installed.)
Unpacking iperf (from .../iperf_2.0.4-5_i386.deb) ...
Processing triggers for man-db ...
Setting up iperf (2.0.4-5) ...
08:59:30
#iperf -c 192.168.90.1
------------------------------------------------------------
Client connecting to 192.168.90.1, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.80.1 port 60600 connected with 192.168.90.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec    947 MBytes    794 Mbits/sec
09:00:59
#iperf -r 192.168.90.1
WARNING: option -r is not valid for server mode
iperf: ignoring extra argument -- 192.168.90.1
Usage: iperf [-s|-c host] [options]
Try `iperf --help' for more information.
09:02:07
#iperf -c -r 192.168.90.1
error: Name or service not known
09:02:14
#iperf -c 192.168.90.1 -r
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 192.168.90.1, TCP port 5001
TCP window size:   108 KByte (default)
------------------------------------------------------------
[  4] local 192.168.80.1 port 38280 connected with 192.168.90.1 port 5001
Waiting for server threads to complete. Interrupt again to force quit.
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec    942 MBytes    790 Mbits/sec
09:02:35
#iperf -c 192.168.90.1 -r
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 192.168.90.1, TCP port 5001
TCP window size:   135 KByte (default)
------------------------------------------------------------
[  4] local 192.168.80.1 port 38282 connected with 192.168.90.1 port 5001
Waiting for server threads to complete. Interrupt again to force quit.
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec    944 MBytes    792 Mbits/sec
09:03:30
#iperf -c 192.168.70.1 -r
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
connect failed: Connection refused
09:04:11
#iperf -s 192.168.90.1
iperf: ignoring extra argument -- 192.168.90.1
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
/dev/tty3
09:04:25
#iperf -r 192.168.80.1 -r
WARNING: option -r is not valid for server mode
WARNING: option -r is not valid for server mode
iperf: ignoring extra argument -- 192.168.80.1
Usage: iperf [-s|-c host] [options]
Try `iperf --help' for more information.
09:04:48
#iperf -r 192.168.80.1 -c
WARNING: option -r is not valid for server mode
iperf: option requires an argument -- c
iperf: ignoring extra argument -- 192.168.80.1
Usage: iperf [-s|-c host] [options]
Try `iperf --help' for more information.
09:04:56
#asterisk -rvvvvvvf
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 linux8 (pid = 6260)
...
linux8*CLI> queue reload all
[Oct 19 14:35:46] NOTICE[16661]: app_queue.c:5650 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.
  == Parsing '/etc/asterisk/queues.conf':   == Found
[Oct 19 14:35:46] WARNING[16661]: app_queue.c:1569 queue_set_param: Unknown keyword in queue 'queue1': mamber at line 506 of queues.conf
[Oct 19 14:35:46] WARNING[16661]: app_queue.c:1569 queue_set_param: Unknown keyword in queue 'queue1': mamber at line 507 of queues.conf
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
[Oct 19 14:36:08] NOTICE[6274]: chan_sip.c:20276 handle_request_invite: Call from '2401' to extension '23091' rejected because extension not found in context 'gr3'.
linux8*CLI> exit
Executing last minute cleanups
/dev/tty2
09:05:29
#apt-get install sox
Reading package lists... Done
Building dependency tree
Reading state information... Done
sox is already the newest version.
sox set to manually installed.
The following packages were automatically installed and are no longer required:
  mysql-common libmysqlclient16
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
09:12:33
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.11571.594	2011-10-19 10:14:13.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 10:23:14.000000000 +0300
@@ -19,7 +19,9 @@
 exten => 2498,n,Playback(/var/lib/asterisk/sounds/recorded-voice)
 
 [local]
-exten => _24XX,1,Dial(SIP/${EXTEN},10)
+exten => _24XX,1,Answer
+exten => _24XX,n,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${EXTEN}-${CALLERID(num)})
+exten => _24XX,n,Dial(SIP/${EXTEN},10)
 exten => _24XX,n,Voicemail(${EXTEN}@default)
 
 [national]
прошло 10 минут
09:23:14
#ls /var/spool/asterisk/monitor/

09:23:34
#ls /var/spool/asterisk/monitor/

09:24:33
#ls /var/spool/asterisk/monitor/

09:24:36
#ls /var/spool/asterisk/monitor/

09:24:38
#ls /var/spool/asterisk/monitor/

09:24:45
#vim /etc/asterisk/extensions.conf
09:26:49
#[local]

09:26:53
#apt-get install samba
  ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ Samba Server ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  ³ Please specify the workgroup for this system.  This setting controls which workgroup the system will appear in when used as a server, the default workgroup to be used when browsing with various frontends, and the domain name used   ³
  ³ with the "security=domain" setting.                                                                                                                                                                                                     ³
  ³                                                                                                                                                                                                                                         ³
  ³ Workgroup/Domain Name:                                                                                                                                                                                                                  ³
  ³                                                                                                                                                                                                                                         ³
  ³ WORKGROUP______________________________________________________________________________________________________________________________________________________________________________________________________________________________ ³
  ³                                                                                                                                                                                                                                         ³
  ³                                                                                                                 <Ok>                                                                                                                    ³
  ³                                                                                                                                                                                                                                         ³
...
Importing account for nobody...ok
Importing account for user...ok
Adding group `sambashare' (GID 117) ...
Done.
update-alternatives: using /usr/bin/smbstatus.samba3 to provide /usr/bin/smbstatus (smbstatus) in auto mode.
Starting Samba daemons: nmbd smbd.
Setting up samba-common-bin (2:3.5.6~dfsg-3squeeze5) ...
update-alternatives: using /usr/bin/nmblookup.samba3 to provide /usr/bin/nmblookup (nmblookup) in auto mode.
update-alternatives: using /usr/bin/net.samba3 to provide /usr/bin/net (net) in auto mode.
update-alternatives: using /usr/bin/testparm.samba3 to provide /usr/bin/testparm (testparm) in auto mode.
09:28:36
#vim /etc/samba/smb.conf
--- /tmp/l3-saved-3270.12530.5733	2011-10-19 10:29:43.000000000 +0300
+++ /etc/samba/smb.conf	2011-10-19 10:32:05.000000000 +0300
@@ -302,12 +302,13 @@
 ;   write list = root, @lpadmin
 
 # A sample share for sharing your CD-ROM with others.
-;[cdrom]
-;   comment = Samba server's CD-ROM
-;   read only = yes
-;   locking = no
-;   path = /cdrom
-;   guest ok = yes
+[monitor]
+
+  comment = Asterisk monitor files
+  read only = yes
+  locking = no
+  path = /var/spool/asterisk/monitor
+  guest ok = yes
 
 # The next two parameters show how to auto-mount a CD-ROM when the
 #	cdrom share is accesed. For this to work /etc/fstab must contain
09:32:05
#samba restert
bash: samba: command not found
09:32:21
#/etc/int.d/samba restart
bash: /etc/int.d/samba: No such file or directory
09:32:45
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
09:33:10
#vim /etc/gr
09:33:10
#vim /etc/group
--- /tmp/l3-saved-3270.23798.18446	2011-10-19 10:33:44.000000000 +0300
+++ /etc/group	2011-10-19 10:34:04.000000000 +0300
@@ -51,7 +51,7 @@
 Debian-gdm:x:111:
 scanner:x:112:saned
 saned:x:113:
-asterisk:x:114:
+asterisk:x:114:user
 smmta:x:115:
 smmsp:x:116:
 sambashare:x:117:
09:34:04
#ls /var/spool/asterisk/monitor/

09:34:16
#ls /var/spool/asterisk/monitor/

09:34:41
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.5473.15874	2011-10-19 10:34:50.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 10:37:04.000000000 +0300
@@ -21,6 +21,7 @@
 [local]
 exten => _24XX,1,Answer
 exten => _24XX,n,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${EXTEN}-${CALLERID(num)})
+exten => _24XX,n,Monitor(wav,${CALLFILENAME},m)
 exten => _24XX,n,Dial(SIP/${EXTEN},10)
 exten => _24XX,n,Voicemail(${EXTEN}@default)
 
09:37:04
#ls /var/spool/asterisk/monitor/
1319009837-2011-10-19-10-37-17-2401-2402.wav
09:37:33
#vim /etc/asterisk/extensions.conf
/dev/pts/2
09:45:20
#nautilus
(nautilus:17525): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported
(nautilus:17525): Eel-WARNING **: GConf error:
  Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, o
(nautilus:17525): Eel-WARNING **: GConf error:
  Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, o
(nautilus:17525): Eel-WARNING **: GConf error:
  Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, o
(nautilus:17525): Eel-WARNING **: GConf error:
  Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, o
GConf warning: failure listing pairs in `/apps/nautilus/preferences': Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message
...
(nautilus:17525): Eel-WARNING **: GConf error:
  Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, o
(nautilus:17525): Eel-WARNING **: GConf error:
  Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, o
(nautilus:17525): Eel-WARNING **: GConf error:
  Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, o
(nautilus:17525): Unique-DBus-WARNING **: Unable to open a connection to the session bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
(nautilus:17525): Unique-DBus-WARNING **: Unable to connect to the running instance, aborting.
(nautilus:17525): Unique-DBus-WARNING **: Unable to open a connection to the session bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
(nautilus:17525): Unique-DBus-WARNING **: Unable to connect to the running instance, aborting.
/dev/tty2
09:46:23
#smb passwd -a user
bash: smb: command not found
09:46:57
#smbpasswd -a user
New SMB password:
Retype new SMB password:
09:47:20
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.11971.6583	2011-10-19 11:00:46.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 11:07:17.000000000 +0300
@@ -3,6 +3,14 @@
 :________________________________________________
 :RESORSES
 :________________________________________________
+[macro-monitor]
+
+exten => s,1,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${MACRO_EXTEN}-${CALLERID(num)})
+exten => s,n,MixMonitor(wav,${CALLFILENAME})
+exten => s,n,Dial($(ARG1),10)
+
+
+
 
 [internal]
 
@@ -20,13 +28,10 @@
 
 [local]
 exten => _24XX,1,Answer
-exten => _24XX,n,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${EXTEN}-${CALLERID(num)})
-exten => _24XX,n,Monitor(wav,${CALLFILENAME},m)
-exten => _24XX,n,Dial(SIP/${EXTEN},10)
 exten => _24XX,n,Voicemail(${EXTEN}@default)
 
-[national]
-exten => _2[34]XX,1,Dial(SIP/msk/${EXTEN})
+x[national]
+exten => _2[34]XX,1,Macro(monitor,SIP/msk/${EXTEN})
 exten => _31XX,1,Dial(SIP/kln/${EXTEN})
 
 
прошло 19 минут
10:07:17
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.18588.14066	2011-10-19 11:07:34.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 11:07:43.000000000 +0300
@@ -30,7 +30,7 @@
 exten => _24XX,1,Answer
 exten => _24XX,n,Voicemail(${EXTEN}@default)
 
-x[national]
+[national]
 exten => _2[34]XX,1,Macro(monitor,SIP/msk/${EXTEN})
 exten => _31XX,1,Dial(SIP/kln/${EXTEN})
 
10:07:43
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.354.32396	2011-10-19 11:08:57.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 11:11:37.000000000 +0300
@@ -7,7 +7,7 @@
 
 exten => s,1,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${MACRO_EXTEN}-${CALLERID(num)})
 exten => s,n,MixMonitor(wav,${CALLFILENAME})
-exten => s,n,Dial($(ARG1),10)
+exten => s,n,Dial(${ARG1},10)
 
 
 
10:11:37
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.10101.9949	2011-10-19 11:12:23.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 11:13:12.000000000 +0300
@@ -6,7 +6,7 @@
 [macro-monitor]
 
 exten => s,1,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${MACRO_EXTEN}-${CALLERID(num)})
-exten => s,n,MixMonitor(wav,${CALLFILENAME})
+exten => s,n,Monitor(wav,${CALLFILENAME})
 exten => s,n,Dial(${ARG1},10)
 
 
10:13:12
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.32020.26882	2011-10-19 11:25:30.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 11:26:34.000000000 +0300
@@ -6,7 +6,7 @@
 [macro-monitor]
 
 exten => s,1,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${MACRO_EXTEN}-${CALLERID(num)})
-exten => s,n,Monitor(wav,${CALLFILENAME})
+exten => s,n,Monitor(mp3,${CALLFILENAME})
 exten => s,n,Dial(${ARG1},10)
 
 
прошло 13 минут
10:26:34
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.13821.712	2011-10-19 11:27:19.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 11:27:34.000000000 +0300
@@ -6,7 +6,7 @@
 [macro-monitor]
 
 exten => s,1,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${MACRO_EXTEN}-${CALLERID(num)})
-exten => s,n,Monitor(mp3,${CALLFILENAME})
+exten => s,n,Monitor(wav,${CALLFILENAME})
 exten => s,n,Dial(${ARG1},10)
 
 
10:27:34
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.16980.22841	2011-10-19 11:30:05.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 11:30:40.000000000 +0300
@@ -6,7 +6,7 @@
 [macro-monitor]
 
 exten => s,1,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${MACRO_EXTEN}-${CALLERID(num)})
-exten => s,n,Monitor(wav,${CALLFILENAME})
+exten => s,n,Monitor(wav,${CALLFILENAME},m)
 exten => s,n,Dial(${ARG1},10)
 
 
10:30:40
#apt-get install libsox-fmt-mp3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  mysql-common libmysqlclient16
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  libsox-fmt-mp3
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 47.0 kB of archives.
After this operation, 102 kB of additional disk space will be used.
Get:1 http://10.0.35.1/debian/ squeeze/main libsox-fmt-mp3 i386 14.3.1-1 [47.0 kB]
Fetched 47.0 kB in 0s (0 B/s)
Selecting previously deselected package libsox-fmt-mp3.
(Reading database ... 115668 files and directories currently installed.)
Unpacking libsox-fmt-mp3 (from .../libsox-fmt-mp3_14.3.1-1_i386.deb) ...
Setting up libsox-fmt-mp3 (14.3.1-1) ...
прошло 14 минут
10:44:46
#apt-get install libsox-fmt-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
libsox-fmt-base is already the newest version.
libsox-fmt-base set to manually installed.
The following packages were automatically installed and are no longer required:
  mysql-common libmysqlclient16
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
10:45:29
#vim /etc/samba/smb.conf
--- /tmp/l3-saved-3270.15476.6649	2011-10-19 11:46:38.000000000 +0300
+++ /etc/samba/smb.conf	2011-10-19 11:48:37.000000000 +0300
@@ -239,7 +239,7 @@
 
 # By default, the home directories are exported read-only. Change the
 # next parameter to 'no' if you want to be able to write to them.
-   read only = yes
+     writeable = yes
 
 # File creation mask is set to 0700 for security reasons. If you want to
 # create files with group=rw permissions, set next parameter to 0775.
10:48:37
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
10:48:51
#scp -r 192.168.50.1:/home/user/Music /home/user
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.
root@192.168.50.1's password:
Permission denied, please try again.
root@192.168.50.1's password:
Vova.mp3                                                                                                                                                                                                      100%   70KB  69.8KB/s   00:00
jsmailo.mp3                                                                                                                                                                                                   100%  848KB 848.1KB/s   00:00
10:52:43
#cd /home/user/

10:53:11
#mv *.mp3 Music
mv: cannot stat `*.mp3': No such file or directory
10:56:07
#mkdir Music
mkdir: cannot create directory `Music': File exists
10:56:37
#mv *.mp3 Music
mv: cannot stat `*.mp3': No such file or directory
10:56:44
#ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos
10:58:08
#cd Music

10:58:18
#ls
Vova.mp3  jsmailo.mp3
10:58:20
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 resample
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:00:10
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 resample -gl
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:00:16
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 resample -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:00:23
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 rate -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:00:42
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 rate -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:01:11
#ls
Vova.mp3  jsmailo.mp3
11:01:22
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 rate -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:01:37
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 rate -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:02:03
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 rate -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:02:28
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 resample -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:02:34
#ls
Vova.mp3  jsmailo.mp3
11:03:25
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 resample -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:03:39
#sox -t mp3 Vova.mp3 -t gsm Vova.gsm -c1 -r8000 resample -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:04:04
#ls
Vova.mp3  jsmailo.mp3
11:04:12
#sox -t mp3 Vova.mp3 -t gsm Vova -c1 -r8000 resample -ql
sox: SoX v14.3.1
sox FAIL sox: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...
SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'
SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
...
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename
AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm w
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa
EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast crop+ dcshift deemph delay dither divide+ earwax echo echos equalizer fade filter* fir firfit+ flanger gain highpass input# key* ladspa loudness lowpass mcompand mixer noiseprof noisered norm oops output# overdrive pad pan* phaser pitch polyphase* rabbit* rate remix repeat resample* reverb reverse riaa sile
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
11:04:20
#sox -t mp3 Vova.mp3 -t gsm -c1 -r8000 Vova.gsm rate -ql
sox WARN rate: rate clipped 5 samples; decrease volume?
sox WARN dither: dither clipped 5 samples; decrease volume?
11:05:17
#ls
Vova.gsm  Vova.mp3  jsmailo.mp3
11:05:21
#mv Vova.gsm /var/lib/asterisk/moh/

11:05:56
#vim /etc/asterisk/musiconhold.conf
--- /tmp/l3-saved-3270.19132.1995	2011-10-19 12:06:13.000000000 +0300
+++ /etc/asterisk/musiconhold.conf	2011-10-19 12:06:50.000000000 +0300
@@ -44,7 +44,7 @@
 
 [default]
 mode=files
-directory=moh
+directory=/var/lib/asterisk/moh
 ;
 ;[native-random]
 ;mode=files
11:06:50
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.16936.22083	2011-10-19 12:09:03.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 12:09:31.000000000 +0300
@@ -27,7 +27,7 @@
 exten => 2498,n,Playback(/var/lib/asterisk/sounds/recorded-voice)
 
 [local]
-exten => _24XX,1,Answer
+exten => _24XX,1,Dial
 exten => _24XX,n,Voicemail(${EXTEN}@default)
 
 [national]
11:09:31
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.838.27028	2011-10-19 12:09:32.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 12:10:35.000000000 +0300
@@ -27,7 +27,7 @@
 exten => 2498,n,Playback(/var/lib/asterisk/sounds/recorded-voice)
 
 [local]
-exten => _24XX,1,Dial
+exten => _24XX,1,Dial(SIP/${EXTEN})
 exten => _24XX,n,Voicemail(${EXTEN}@default)
 
 [national]
11:10:35
#sox -t mp3 jsmailo.mp3 -t gsm -c1 -r8000 jsmailo.gsm rate -ql
sox WARN rate: rate clipped 992 samples; decrease volume?
sox WARN dither: dither clipped 850 samples; decrease volume?
11:12:50
#mv jsmailo.gsm /var/lib/asterisk/moh2/
mv: cannot move `jsmailo.gsm' to `/var/lib/asterisk/moh2/': Not a directory
11:14:47
#mkdir /var/lib/asterisk/moh2/

11:15:03
#mv jsmailo.gsm /var/lib/asterisk/moh2/

11:15:05
#vim /etc/asterisk/extensions.conf
11:20:20
#chown asterisk:asterisk /var/lib/asterisk/moh2

11:21:02
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.8153.4361	2011-10-19 12:21:22.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 12:27:36.000000000 +0300
@@ -7,7 +7,9 @@
 
 exten => s,1,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${MACRO_EXTEN}-${CALLERID(num)})
 exten => s,n,Monitor(wav,${CALLFILENAME},m)
-exten => s,n,Dial(${ARG1},10)
+exten => s,n,GotoIf($[ "${CALLERID(num):0:2}" != "24" ]?dial)
+exten => s,n,SetMusicOnHold(class2)   
+exten => s,n(dial),Dial(${ARG1},10)
 
 
 
11:27:36
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.7813.20694	2011-10-19 12:30:01.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 12:30:48.000000000 +0300
@@ -29,7 +29,7 @@
 exten => 2498,n,Playback(/var/lib/asterisk/sounds/recorded-voice)
 
 [local]
-exten => _24XX,1,Dial(SIP/${EXTEN})
+exten => _24XX,1,Macro(monitor,SIP/${EXTEN})
 exten => _24XX,n,Voicemail(${EXTEN}@default)
 
 [national]
11:30:48
#history
    1  cd /tmp
    2  wget http://xgr.ru/lilalo/install
    3  wget http://xgu.ru/lilalo/install
    4  vim install
    5  vim install
    6  apt-get install vim
    7  vim install
    8  bash install
    9  /etc/init.d/gdm3 start
   10  vim install
...
  288  sox -t mp3 jsmailo.mp3 -t gsm -c1 -r8000 jsmailo.gsm rate -ql
  289  mv jsmailo.gsm /var/lib/asterisk/moh2/
  290  mkdir /var/lib/asterisk/moh2/
  291  mv jsmailo.gsm /var/lib/asterisk/moh2/
  292  vim /etc/asterisk/extensions.conf
  293  vim /etc/asterisk/musiconhold.conf
  294  chown asterisk:asterisk /var/lib/asterisk/moh2
  295  vim /etc/asterisk/extensions.conf
  296  vim /etc/asterisk/extensions.conf
  297  history
прошло 13 минут
11:43:59
#history -100
bash: history: -1: invalid option
history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
11:44:06
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.18192.5223	2011-10-19 12:54:08.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 12:55:22.000000000 +0300
@@ -29,6 +29,8 @@
 exten => 2498,n,Playback(/var/lib/asterisk/sounds/recorded-voice)
 
 [local]
+exten => 2450,1,Dial(SIP/2401&SIP/2402)
+
 exten => _24XX,1,Macro(monitor,SIP/${EXTEN})
 exten => _24XX,n,Voicemail(${EXTEN}@default)
 
прошло 11 минут
11:55:22
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3270.7428.3823	2011-10-19 12:57:19.000000000 +0300
+++ /etc/asterisk/extensions.conf	2011-10-19 12:57:39.000000000 +0300
@@ -29,7 +29,7 @@
 exten => 2498,n,Playback(/var/lib/asterisk/sounds/recorded-voice)
 
 [local]
-exten => 2450,1,Dial(SIP/2401&SIP/2402)
+exten => 2450,1,Dial(SIP/2401&SIP/2402,30)
 
 exten => _24XX,1,Macro(monitor,SIP/${EXTEN})
 exten => _24XX,n,Voicemail(${EXTEN}@default)
11:57:39
#vim /etc/asterisk/extensions.conf
прошло 73 минуты
13:10:44
#include => local
[general]
videosupport=yes
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
[2401]daddr=0.0.0.0
[2401]
srvlookup=yes
register => spb:1234@192.168.90.1/kln
...
~
~
~
~
~
                                                                                                                                                                                                                              25,0-1        All
pickupgroup=1
[2402]
callgroup=1
"/etc/asterisk/sip.conf" 52L, 570C written
13:12:14
#vim /etc/asterisk/extensions.conf
прошло 13 минут
13:26:00
#[2401]

13:27:38
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-3270.32487.30566	2011-10-19 14:27:51.000000000 +0300
+++ /etc/asterisk/queues.conf	2011-10-19 14:32:58.000000000 +0300
@@ -496,5 +496,15 @@
 ;
 ;member => Agent/@1		; Any agent in group 1
 ;member => Agent/:1,1		; Any agent in group 1, wait for first
+
                                 ; available, but consider with penalty
 
+[queue1]
+
+strategy=ringall
+
+mamber => SIP/2401
+mamber => SIP/2402
+
+
+

Статистика

Время первой команды журнала08:48:03 2011-10-19
Время последней команды журнала13:27:38 2011-10-19
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, %46.53
Процент синтаксически неверно набранных команд, % 2.97
Суммарное время работы с терминалом *, час 3.44
Количество командных строк в единицу времени, команда/мин 0.49
Частота использования команд
vim26|=========================| 25.49%
sox14|=============| 13.73%
ls14|=============| 13.73%
iperf9|========| 8.82%
apt-get6|=====| 5.88%
mv5|====| 4.90%
hping34|===| 3.92%
apt-cache3|==| 2.94%
mkdir2|=| 1.96%
/etc/init.d/samba2|=| 1.96%
cd2|=| 1.96%
history2|=| 1.96%
samba1|| 0.98%
asterisk1|| 0.98%
smbpasswd1|| 0.98%
[local]1|| 0.98%
chown1|| 0.98%
/etc/int.d/samba1|| 0.98%
whereis1|| 0.98%
scp1|| 0.98%
local1|| 0.98%
nautilus1|| 0.98%
include1|| 0.98%
smb1|| 0.98%
[2401]1|| 0.98%
____
*) Интервалы неактивности длительностью 30 минут и более не учитываются

Справка

Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
  1. В журнал автоматически попадают все команды, данные в любом терминале системы.

  2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

  3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
    $ l s-l
    bash: l: command not found
    

  4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
    $ test 5 -lt 4
    Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

  5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
    $ 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
    

  6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
    # id
    uid=0(root) gid=0(root) Gruppen=0(root)
    

  7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
    $ vi ~/.bashrc
    2a3,5
    >    if [ -f /usr/local/etc/bash_completion ]; then
    >         . /usr/local/etc/bash_completion
    >        fi
    

  8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
    $ patch ~/.bashrc
    В данном случае изменения применяются к файлу ~/.bashrc

  9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

    Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

  10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

  11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

  12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

  13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

  14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

    $ whoami
    
    user
    
    $ #^ Интересно, кто я?
    
    в журнале это будет выглядеть так:
    $ whoami
    
    user
    
    Интересно, кто я?

  15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

    $ whoami
    
    user
    
    $ cat > /dev/null #^ Интересно, кто я?
    
    Программа whoami выводит имя пользователя, под которым 
    мы зарегистрировались в системе.
    -
    Она не может ответить на вопрос о нашем назначении 
    в этом мире.
    
    В журнале это будет выглядеть так:
    $ whoami
    user
    
    Интересно, кто я?
    Программа whoami выводит имя пользователя, под которым
    мы зарегистрировались в системе.

    Она не может ответить на вопрос о нашем назначении
    в этом мире.
    Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

  16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

  17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
  18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
  19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
    1
        2
    3   
        4
    
    Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

О программе

LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008

$Id$