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

Содержание

Журнал

Суббота (11/28/09)

/dev/pts/1
17:44:28
#ztdiag
Usage: ztdiag <channel>
/dev/pts/0
17:44:37
#ztcfg

/dev/pts/1
17:44:37
#ztcfg

/dev/pts/0
17:44:41
#ztmonitor
Usage: ztmonitor <channel num> [-v[v]] [-m] [-o] [-p] [-f FILE | -r FILE1 -t FILE2] [-F FILE | -R FILE1 -T FILE2]
Options:
        -v: Visual mode.  Implies -m.
        -vv: Visual/Verbose mode.  Implies -m.
        -m: Separate rx/tx streams.
        -o: Output audio via OSS.  Note: Only 'normal' combined rx/tx streams are output via OSS.
        -p: Get a pre-echocanceled stream.
        -f FILE: Save combined rx/tx stream to FILE.  Cannot be used with -m.
        -r FILE: Save rx stream to FILE.  Implies -m.
        -t FILE: Save tx stream to FILE.  Implies -m.
...
Save a stream to a file
        ztmonitor 1 -f stream.raw
Visualize an rx/tx stream and save them to separate files.
        ztmonitor 1 -v -r streamrx.raw -t streamtx.raw
Play a combined rx/tx stream via OSS and save it to a file
        ztmonitor 1 -o -f stream.raw
Save a combined normal rx/tx stream and a combined 'preecho' rx/tx stream to files
        ztmonitor 1 -p -f stream.raw -F streampreecho.raw
Save a normal rx/tx stream and a 'preecho' rx/tx stream to separate files
        ztmonitor 1 -m -p -r streamrx.raw -t streamtx.raw -R streampreechorx.raw -T streampreechotx.raw
/dev/pts/1
17:44:41
#ztmonitor
Usage: ztmonitor <channel num> [-v[v]] [-m] [-o] [-p] [-f FILE | -r FILE1 -t FILE2] [-F FILE | -R FILE1 -T FILE2]
Options:
        -v: Visual mode.  Implies -m.
        -vv: Visual/Verbose mode.  Implies -m.
        -m: Separate rx/tx streams.
        -o: Output audio via OSS.  Note: Only 'normal' combined rx/tx streams are output via OSS.
        -p: Get a pre-echocanceled stream.
        -f FILE: Save combined rx/tx stream to FILE.  Cannot be used with -m.
        -r FILE: Save rx stream to FILE.  Implies -m.
        -t FILE: Save tx stream to FILE.  Implies -m.
...
Save a stream to a file
        ztmonitor 1 -f stream.raw
Visualize an rx/tx stream and save them to separate files.
        ztmonitor 1 -v -r streamrx.raw -t streamtx.raw
Play a combined rx/tx stream via OSS and save it to a file
        ztmonitor 1 -o -f stream.raw
Save a combined normal rx/tx stream and a combined 'preecho' rx/tx stream to files
        ztmonitor 1 -p -f stream.raw -F streampreecho.raw
Save a normal rx/tx stream and a 'preecho' rx/tx stream to separate files
        ztmonitor 1 -m -p -r streamrx.raw -t streamtx.raw -R streampreechorx.raw -T streampreechotx.raw
/dev/pts/0
17:44:44
#zt
ztcfg            ztmonitor        ztscan           zttest
ztdiag           zt_registration  ztspeed          zttool
/dev/pts/1
17:44:44
#zt
ztcfg            ztmonitor        ztscan           zttest
ztdiag           zt_registration  ztspeed          zttool
/dev/pts/0
17:44:44
#asterisk -rvvv
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
=========================================================================
...
agents        agi           application   applications  audio
autoanswer    channel       channels      channeltype   channeltypes
codec         codecs        config        dialplan      features
file          function      functions     globals       hints
image         indications   keys          manager       modules
parkedcalls   profile       queue         queues        switches
transcoder    translation   uptime        version       video
voicemail
debian4*CLI> quit
Executing last minute cleanups
/dev/pts/1
17:44:44
#asterisk -rvvv
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
=========================================================================
...
agents        agi           application   applications  audio
autoanswer    channel       channels      channeltype   channeltypes
codec         codecs        config        dialplan      features
file          function      functions     globals       hints
image         indications   keys          manager       modules
parkedcalls   profile       queue         queues        switches
transcoder    translation   uptime        version       video
voicemail
debian4*CLI> quit
Executing last minute cleanups
/dev/pts/0
17:48:28
#vi /etc/asterisk/zapata.conf
/dev/pts/1
17:48:28
#vi /etc/asterisk/zapata.conf
/dev/pts/0
17:48:43
#; Default language
"/etc/asterisk/extensions.conf" 22L, 442C
exten => _1XXX,n,Hangup
[demo1]
[demo1]
exten => _2XXX,1,Dial(SIP/2xxx/${EXTEN},60)
exten => _2XXX,n,Hangup
exten => 111,1,Dial(ZAP/111/${EXTEN},60)
         1 1,n,Hangup
exten => _1XXX,n,Hangup
exten => _9XX,1,Dial(SIP/2xxx/${EXTEN},60)
exten => _9XX,n,Hangup
exten => _4XXX,1,Dial(SIP/${EXTEN},60)
"/etc/asterisk/extensions.conf" 25L, 506C written
/dev/pts/1
17:48:43
#; Default language
"/etc/asterisk/extensions.conf" 22L, 442C
exten => _1XXX,n,Hangup
[demo1]
[demo1]
exten => _2XXX,1,Dial(SIP/2xxx/${EXTEN},60)
exten => _2XXX,n,Hangup
exten => 111,1,Dial(ZAP/111/${EXTEN},60)
         1 1,n,Hangup
exten => _1XXX,n,Hangup
exten => _9XX,1,Dial(SIP/2xxx/${EXTEN},60)
exten => _9XX,n,Hangup
exten => _4XXX,1,Dial(SIP/${EXTEN},60)
"/etc/asterisk/extensions.conf" 25L, 506C written
/dev/pts/0
17:50:05
#vi /etc/asterisk/extensions.conf
/dev/pts/1
17:50:05
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3305.26104.8391	2009-11-28 18:51:13.000000000 +0200
+++ /etc/asterisk/extensions.conf	2009-11-28 18:51:25.000000000 +0200
@@ -9,7 +9,7 @@
 exten => 4000,n,Playback(demo-thanks)
 exten => 4000,n,Hangup
 
-exten => 111,1,Dial(ZAP/111/${EXTEN},60)
+exten => 111,1,Dial(ZAP/G1/${EXTEN},60)
 exten => 111,n,Hangup
 
 exten => _1XXX,1,Dial(SIP/1xxx/${EXTEN},60)
/dev/pts/0
17:51:25
#vi /etc/asterisk/zapata.conf
/dev/pts/1
17:51:25
#vi /etc/asterisk/zapata.conf
--- /tmp/l3-saved-3305.406.31947	2009-11-28 18:51:30.000000000 +0200
+++ /etc/asterisk/zapata.conf	2009-11-28 18:54:40.000000000 +0200
@@ -680,3 +680,6 @@
 ;context=default
 ;channel => 1 
 
+group=1
+context=demo1
+channel=1
/dev/pts/0
17:54:40
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/1
17:54:40
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/0
17:57:17
#asterisk -rvvv
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 [111@demo1:1] Dial("SIP/4444-08777460", "ZAP/G1/111|60") in new stack
    -- Called G1/111
    -- Zap/1-1 is ringing
    -- Zap/1-1 is ringing
    -- Zap/1-1 answered SIP/4444-08777460
    -- Hungup 'Zap/1-1'
  == Spawn extension (demo1, 111, 1) exited non-zero on 'SIP/4444-08777460'
debian4*CLI>
debian4*CLI> quit
Executing last minute cleanups
/dev/pts/1
17:57:17
#asterisk -rvvv
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 [111@demo1:1] Dial("SIP/4444-08777460", "ZAP/G1/111|60") in new stack
    -- Called G1/111
    -- Zap/1-1 is ringing
    -- Zap/1-1 is ringing
    -- Zap/1-1 answered SIP/4444-08777460
    -- Hungup 'Zap/1-1'
  == Spawn extension (demo1, 111, 1) exited non-zero on 'SIP/4444-08777460'
debian4*CLI>
debian4*CLI> quit
Executing last minute cleanups
/dev/pts/0
18:01:11
#channel=>1
loadzone=no
defaultzone=no
fxoks=1-4
#fxoks=3-4
/dev/pts/1
18:01:11
#channel=>1
loadzone=no
defaultzone=no
fxoks=1-4
#fxoks=3-4
/dev/pts/0
18:01:48
#; d-channel for the trunk.
desaultzone=no
fxoks=1-4
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/zaptel.conf" 4L, 48C written
/dev/pts/1
18:01:48
#; d-channel for the trunk.
desaultzone=no
fxoks=1-4
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/zaptel.conf" 4L, 48C written
/dev/pts/0
18:01:53
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: ZT_CHANCONFIG failed on channel 1: Invalid argument (22)
Did you forget that FXS interfaces are configured with FXO signalling
and that FXO interfaces use FXS signalling?
/dev/pts/1
18:01:53
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: ZT_CHANCONFIG failed on channel 1: Invalid argument (22)
Did you forget that FXS interfaces are configured with FXO signalling
and that FXO interfaces use FXS signalling?
/dev/pts/0
18:02:15
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel.
/dev/pts/1
18:02:15
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel.
/dev/pts/0
18:02:27
#ztdiag
Usage: ztdiag <channel>
/dev/pts/1
18:02:27
#ztdiag
Usage: ztdiag <channel>
18:03:33
#ztcfg -vvv
Zaptel Version: 1.4.11
Echo Canceller: MG2
Configuration
======================
Channel map:
Channel 01: FXO Kewlstart (Default) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Slaves: 03)
Channel 04: FXO Kewlstart (Default) (Slaves: 04)
4 channels to configure.
/dev/pts/0
18:03:33
#ztcfg -vvv
Zaptel Version: 1.4.11
Echo Canceller: MG2
Configuration
======================
Channel map:
Channel 01: FXO Kewlstart (Default) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Slaves: 03)
Channel 04: FXO Kewlstart (Default) (Slaves: 04)
4 channels to configure.
18:03:38
#zts
ztscan   ztspeed
18:03:38
#ztscan
[1]
active=yes
alarms=OK
description=Wildcard TDM410P Board 1
name=WCTDM/0
manufacturer=Digium
devicetype=Wildcard TDM410P
location=PCI Bus 03 Slot 01
basechan=1
totchans=4
irq=20
type=analog
port=1,FXS
port=2,none
port=3,none
port=4,none
/dev/pts/1
18:03:38
#zts
ztscan   ztspeed
18:03:38
#ztscan
[1]
active=yes
alarms=OK
description=Wildcard TDM410P Board 1
name=WCTDM/0
manufacturer=Digium
devicetype=Wildcard TDM410P
location=PCI Bus 03 Slot 01
basechan=1
totchans=4
irq=20
type=analog
port=1,FXS
port=2,none
port=3,none
port=4,none
/dev/pts/0
18:11:56
#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
=========================================================================
...
[Nov 28 19:14:43] WARNING[4495]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found
    -- Executing [112@demo1:1] Wait("SIP/4444-08775ed0", "1") in new stack
    -- Executing [112@demo1:2] MeetMe("SIP/4444-08775ed0", "1|dM") in new stack
  == Spawn extension (demo1, 112, 2) exited non-zero on 'SIP/4444-08775ed0'
[Nov 28 19:15:05] WARNING[4495]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found
    -- Hungup 'Zap/pseudo-1353088816'
  == Spawn extension (demo1, 112, 2) exited non-zero on 'SIP/4442-08792de8'
debian4*CLI>
debian4*CLI>
debian4*CLI> quit
/dev/pts/1
18:11:56
#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
=========================================================================
...
[Nov 28 19:14:43] WARNING[4495]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found
    -- Executing [112@demo1:1] Wait("SIP/4444-08775ed0", "1") in new stack
    -- Executing [112@demo1:2] MeetMe("SIP/4444-08775ed0", "1|dM") in new stack
  == Spawn extension (demo1, 112, 2) exited non-zero on 'SIP/4444-08775ed0'
[Nov 28 19:15:05] WARNING[4495]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found
    -- Hungup 'Zap/pseudo-1353088816'
  == Spawn extension (demo1, 112, 2) exited non-zero on 'SIP/4442-08792de8'
debian4*CLI>
debian4*CLI>
debian4*CLI> quit
/dev/pts/3
18:18:26
#ls
01 - Vrooom.mp3
18:18:27
#pwd
/root
прошло 16 минут
/dev/pts/0
18:35:14
#screen
/dev/pts/1
18:35:14
#screen
/dev/pts/6
18:35:15
#apt-get install sox mpg1243
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package mpg1243
18:35:26
#apt-get install sox mpg123
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libmpg123-0 libsamplerate0 libsox-fmt-alsa libsox-fmt-base libsox0
Suggested packages:
  libsox-fmt-all libartsc0
The following NEW packages will be installed:
  libmpg123-0 libsamplerate0 libsox-fmt-alsa libsox-fmt-base libsox0 mpg123
  sox
...
Selecting previously deselected package sox.
Unpacking sox (from .../sox_14.0.1-2+b1_i386.deb) ...
Processing triggers for man-db ...
Setting up libmpg123-0 (1.4.3-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 mpg123 (1.4.3-4) ...
Setting up sox (14.0.1-2+b1) ...
18:35:45
#ls
01 - Vrooom.mp3
18:35:55
#mpg123 -w vroom.wav 01\ -\ Vrooom.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: 01 - Vrooom.mp3 ...
Title:   Vrooom                          Artist: King Crimson
Comment:                                 Album:  Vrooom
Year:    1994                            Genre:  Unknown
MPEG 1.0 layer III, 192 kbit/s, 44100 Hz joint-stereo
[7:35] Decoding of 01 - Vrooom.mp3 finished.
18:36:45
#apt-cache search gsm
asn1c - ASN.1 compiler for C
dirmngr - server for managing certificate revocation lists
gpe-soundbite - voice memo player/recorder for GPE
gpgsm - GNU privacy guard - S/MIME version
gsm-utils - GSM mobile phone access applications
gsmc - Smith Chart calculator for impedance matching
kandy - KDE mobile phone utility
kannel - WAP and SMS gateway
kannel-dev - WAP and SMS gateway headers and development files
kannel-docs - WAP and SMS gateway documentation
...
libsox-fmt-gsm - SoX GSM format library
obexftp - file transfer utility for devices that use the OBEX protocol
skyutils-dev - Many useful functions for the web like smssend (development)
skyutils2 - Many useful functions for the web like smssend
slang-gsl - GNU Scientific Library binding for S-Lang
sms-pl - Send SMs via Polish GSM operators
smstools - SMS server tools for GSM modems
sox - Swiss army knife of sound processing
sweep - An editor for sound samples
twinkle - Voice over Internet Protocol (VoIP) SIP Phone
18:41:15
#apt-get install libsox-fmt-gsm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libsox-fmt-gsm
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 34.9kB of archives.
After this operation, 53.2kB of additional disk space will be used.
Get:1 http://10.0.35.1 lenny/main libsox-fmt-gsm 14.0.1-2+b1 [34.9kB]
Fetched 34.9kB in 0s (97.3kB/s)
Selecting previously deselected package libsox-fmt-gsm.
(Reading database ... 102117 files and directories currently installed.)
Unpacking libsox-fmt-gsm (from .../libsox-fmt-gsm_14.0.1-2+b1_i386.deb) ...
Setting up libsox-fmt-gsm (14.0.1-2+b1) ...
18:43:13
#ls /usr/lib/asterisk/
modules
18:46:59
#ls /usr/lib/asterisk/modules/
app_adsiprog.so               app_sms.so             format_jpeg.so
app_alarmreceiver.so          app_softhangup.so      format_ogg_vorbis.so
app_amd.so                    app_speech_utils.so    format_pcm.so
app_authenticate.so           app_stack.so           format_sln.so
app_cdr.so                    app_system.so          format_vox.so
app_chanisavail.so            app_talkdetect.so      format_wav_gsm.so
app_channelredirect.so        app_test.so            format_wav.so
app_chanspy.so                app_transfer.so        func_base64.so
app_controlplayback.so        app_url.so             func_callerid.so
app_db.so                     app_userevent.so       func_cdr.so
...
app_read.so                   codec_speex.so         res_indications.so
app_realtime.so               codec_ulaw.so          res_jabber.so
app_record.so                 codec_zap.so           res_monitor.so
app_sayunixtime.so            format_g723.so         res_musiconhold.so
app_segfault.so               format_g726.so         res_odbc.so
app_senddtmf.so               format_g729.so         res_smdi.so
app_sendtext.so               format_gsm.so          res_snmp.so
app_setcallerid.so            format_h263.so         res_speech.so
app_setcdruserfield.so        format_h264.so         res_watchdog.so
app_settransfercapability.so  format_ilbc.so
18:47:01
#. /etc/bash_completion

18:47:17
#dpkg -L asterisk-sounds-main
/.
/usr
/usr/share
/usr/share/asterisk
/usr/share/asterisk/sounds
/usr/share/asterisk/sounds/es
/usr/share/asterisk/sounds/fr
/usr/share/asterisk/sounds/CHANGES-asterisk-core-en-1.4.9
/usr/share/asterisk/sounds/CREDITS-asterisk-core-en-1.4.9
/usr/share/asterisk/sounds/agent-alreadyon.gsm
...
/usr/share/asterisk/moh
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/asterisk-sounds-main
/usr/share/doc
/usr/share/doc/asterisk-sounds-main
/usr/share/doc/asterisk-sounds-main/copyright
/usr/share/doc/asterisk-sounds-main/NEWS.Debian.gz
/usr/share/doc/asterisk-sounds-main/changelog.gz
/usr/share/doc/asterisk-sounds-main/changelog.Debian.gz
18:47:22
#cp vroom.gsm /usr/share/asterisk/sounds/

18:47:40
#vi /etc/asterisk/extensions.
18:47:54
#~
exten => _9XX,1,Dial(SIP/2xxx/${EXTEN},60)
exten => _4XXX,1,Dial(SIP/${EXTEN},60)
exten => _4XXX,n,Hangup
exten => 112,1,Wait(1)
exten => 112,n,MeetMe(1,dM)
exten => 112,n,Hangup
exten => 112,n,MusicOnHold(vroom)
               MeetMe(1,dM)
                                                              28,28         85%
"/etc/asterisk/extensions.conf" 30L, 613C written
18:48:28
#man asterisk
18:48:37
#asterisk -x dialplan reload
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.
18:48:45
#asterisk -r -x dialplan reload
No such command 'dialplan' (type 'help dialplan' for other possible commands)
18:48:50
#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
=========================================================================
...
[Nov 28 19:49:11] WARNING[5111]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'vroom' not found
[Nov 28 19:49:11] WARNING[5111]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found
[Nov 28 19:49:11] WARNING[5111]: res_musiconhold.c:597 moh0_exec: Unable to start music on hold (class 'vroom') on channel SIP/4444-08775ed0
    -- Executing [112@demo1:3] MeetMe("SIP/4444-08775ed0", "1|dM") in new stack
    -- Created MeetMe conference 1023 for conference '1'
    -- <SIP/4444-08775ed0> Playing 'conf-onlyperson' (language 'en')
[Nov 28 19:49:14] WARNING[5111]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found
    -- Hungup 'Zap/pseudo-1991800762'
  == Spawn extension (demo1, 112, 3) exited non-zero on 'SIP/4444-08775ed0'
debian4*CLI> quit
18:49:34
#vi /etc/asterisk/mu
18:49:34
#vi /etc/asterisk/musiconhold.conf
18:50:24
#; =========

18:50:28
#cp vroom.gsm /var/lib/asterisk/moh/

18:51:33
#; without transcoding (same as Playback would do in the dialplan).
exten => _4XXX,1,Dial(SIP/${EXTEN},60)
exten => _4XXX,n,Hangup
exten => 112,1,Wait(1)
exten => 112,n,MusicOnHold(vroom)
exten => 112,n,MeetMe(1,dM)
exten => 112,n,Hangup
;exten => 112,n,MusicOnHold(vroom)                            28,1          Bot
                                                              28,1          Bot
"/etc/asterisk/extensions.conf" 30L, 614C written
18:53:26
#vi /etc/asterisk/extensions.conf
18:55:44
#ls -l /var/lib/asterisk/moh/
total 737
-rw-r--r-- 1 root root 750783 2009-11-28 19:50 vroom.gsm
18:55:50
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
18:56:42
#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 = 5362)
debian4*CLI> quit
18:56:45
#asterisk -rvvv
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
=========================================================================
...
    -- Starting simple switch on 'Zap/1-1'
    -- Hungup 'Zap/1-1'
    -- Starting simple switch on 'Zap/1-1'
    -- Hungup 'Zap/1-1'
    -- Stopped music on hold on SIP/4444-09769a10
    -- Hungup 'Zap/pseudo-2144576766'
  == Spawn extension (demo1, 112, 2) exited non-zero on 'SIP/4444-09769a10'
debian4*CLI>
debian4*CLI> quit
Executing last minute cleanups
19:02:14
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel.
19:02:19
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
19:03:27
#reboot

прошло 13 минут
/dev/pts/0
19:16:53
#less /var/log/asterisk/messages
/dev/pts/1
19:16:53
#less /var/log/asterisk/messages
/dev/pts/0
19:19:05
#vi /etc/asterisk/zapata.conf
/dev/pts/1
19:19:05
#vi /etc/asterisk/zapata.conf
--- /tmp/l3-saved-3315.19274.20268	2009-11-28 20:19:08.000000000 +0200
+++ /etc/asterisk/zapata.conf	2009-11-28 20:19:27.000000000 +0200
@@ -391,7 +391,7 @@
 ; detection parameters.  Relaxing them may make the DTMF detector more likely
 ; to have "talkoff" where DTMF is detected when it shouldn't be.
 ;
-;relaxdtmf=yes
+relaxdtmf=yes
 ;
 ; You may also set the default receive and transmit gains (in dB)
 ;
/dev/pts/0
19:19:31
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/1
19:19:31
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/0
19:22:39
#vim /etc/asterisk/zapata.conf
/dev/pts/1
19:22:39
#vim /etc/asterisk/zapata.conf

Суббота (12/05/09)

/dev/pts/0
10:49:56
#ping ya.ru
^C
10:49:59
#ifconfig
eth0      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
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:202 errors:0 dropped:0 overruns:0 frame:0
          TX packets:202 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:18222 (17.7 KiB)  TX bytes:18222 (17.7 KiB)
10:50:01
#sudo route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.7.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.7.254   0.0.0.0         UG    0      0        0 eth0
10:50:14
#ping 192.168.7.254
PING 192.168.7.254 (192.168.7.254) 56(84) bytes of data.
^C
--- 192.168.7.254 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
10:50:24
#ping 192.168.7.254
PING 192.168.7.254 (192.168.7.254) 56(84) bytes of data.
From 192.168.7.4 icmp_seq=1 Destination Host Unreachable
From 192.168.7.4 icmp_seq=2 Destination Host Unreachable
From 192.168.7.4 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.7.254 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5017ms
, pipe 3
10:52:38
#mii-tool
eth0: no link
SIOCGMIIPHY on 'eth1' failed: Invalid argument
10:52:41
#mii-tool
eth0: no link
SIOCGMIIPHY on 'eth1' failed: Invalid argument
10:53:44
#ping 192.168.7.254
PING 192.168.7.254 (192.168.7.254) 56(84) bytes of data.
^C
--- 192.168.7.254 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms
10:55:43
#mii-tool
eth0: negotiated 1000baseT-FD flow-control, link ok
SIOCGMIIPHY on 'eth1' failed: Invalid argument
10:55:44
#ping 192.168.7.254
PING 192.168.7.254 (192.168.7.254) 56(84) bytes of data.
^C
--- 192.168.7.254 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1012ms
10:55:59
#ping 192.168.7.254
PING 192.168.7.254 (192.168.7.254) 56(84) bytes of data.
^C
--- 192.168.7.254 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 4999ms
10:56:20
#ifconfig
eth0      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:814 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:64265 (62.7 KiB)  TX bytes:7601 (7.4 KiB)
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:210 errors:0 dropped:0 overruns:0 frame:0
          TX packets:210 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:19085 (18.6 KiB)  TX bytes:19085 (18.6 KiB)
10:56:22
#ifconfig eth0:1 10.0.35.23

10:56:30
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data.
64 bytes from 10.0.35.1: icmp_seq=1 ttl=64 time=2.25 ms
^C
--- 10.0.35.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.254/2.254/2.254/0.000 ms
10:56:33
#ping 192.168.7.254
PING 192.168.7.254 (192.168.7.254) 56(84) bytes of data.
^C
--- 192.168.7.254 ping statistics ---
15 packets transmitted, 0 received, 100% packet loss, time 13999ms
10:56:55
#ping 192.168.7.254
PING 192.168.7.254 (192.168.7.254) 56(84) bytes of data.
^C
--- 192.168.7.254 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1014ms
10:57:04
#ping 192.168.7.254
PING 192.168.7.254 (192.168.7.254) 56(84) bytes of data.
^C
--- 192.168.7.254 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4013ms
10:57:26
#ping 192.168.7.3
PING 192.168.7.3 (192.168.7.3) 56(84) bytes of data.
64 bytes from 192.168.7.3: icmp_seq=1 ttl=64 time=3.44 ms
64 bytes from 192.168.7.3: icmp_seq=2 ttl=64 time=0.194 ms
^C
--- 192.168.7.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1006ms
rtt min/avg/max/mdev = 0.194/1.821/3.449/1.628 ms
10:57:39
#ping 192.168.7.30
PING 192.168.7.30 (192.168.7.30) 56(84) bytes of data.
64 bytes from 192.168.7.30: icmp_seq=1 ttl=64 time=2.66 ms
64 bytes from 192.168.7.30: icmp_seq=2 ttl=64 time=0.229 ms
64 bytes from 192.168.7.30: icmp_seq=3 ttl=64 time=0.171 ms
^C
--- 192.168.7.30 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2006ms
rtt min/avg/max/mdev = 0.171/1.022/2.666/1.162 ms
10:57:49
#ping 192.168.7.254
PING 192.168.7.254 (192.168.7.254) 56(84) bytes of data.
^C
--- 192.168.7.254 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1013ms

Статистика

Время первой команды журнала17:44:28 2009-11-28
Время последней команды журнала10:57:49 2009-12- 5
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, %20.79
Процент синтаксически неверно набранных команд, % 0.00
Суммарное время работы с терминалом *, час 1.77
Количество командных строк в единицу времени, команда/мин 0.95
Частота использования команд
ping13|============| 12.50%
vi12|===========| 11.54%
asterisk11|==========| 10.58%
/etc/init.d/asterisk6|=====| 5.77%
/etc/init.d/zaptel5|====| 4.81%
ls5|====| 4.81%
ztcfg4|===| 3.85%
ifconfig3|==| 2.88%
apt-get3|==| 2.88%
mii-tool3|==| 2.88%
ztdiag3|==| 2.88%
screen2|=| 1.92%
cp2|=| 1.92%
Default2|=| 1.92%
zts2|=| 1.92%
channel=>2|=| 1.92%
d-channel2|=| 1.92%
vim2|=| 1.92%
zt2|=| 1.92%
less2|=| 1.92%
12|=| 1.92%
ztmonitor2|=| 1.92%
ztscan2|=| 1.92%
dpkg1|| 0.96%
man1|| 0.96%
mpg1231|| 0.96%
without1|| 0.96%
reboot1|| 0.96%
.1|| 0.96%
~1|| 0.96%
=========1|| 0.96%
sudo1|| 0.96%
pwd1|| 0.96%
route1|| 0.96%
apt-cache1|| 0.96%
____
*) Интервалы неактивности длительностью 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$