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

Содержание

Журнал

Пятница (05/28/10)

/dev/pts/2
15:15:56
#zap
zapconf          zaptel_hardware
15:15:56
#zapconf

15:16:11
#vim /etc/zaptel.conf
/dev/pts/4
15:16:12
#ztscan
[1]
active=yes
alarms=UNCONFIGURED
description=Wildcard TE121 Card 0
name=WCT1/0
manufacturer=Digium
devicetype=Wildcard TE121
location=PCI Bus 02 Slot 09
basechan=1
totchans=31
irq=16
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=HDB3
framing_opts=CCS,CRC4
coding=
framing=
/dev/pts/6
15:16:27
#screen -x
15:16:30
#screen
/dev/pts/2
15:16:30
# 5,17-3
There is a screen on:
        2805.pts-7.linux4       (05/28/2010 04:16:32 PM)        (Attached)
1 Socket in /var/run/screen/S-root.
/dev/pts/4
15:16:31
#ps ax|grep screen
 2804 pts/7    S+     0:00 screen
 2883 pts/3    S+     0:00 screen -x
 2893 pts/5    S+     0:00 grep screen
/dev/pts/8
15:16:32
#ztscan
[1]
active=yes
alarms=UNCONFIGURED
description=Wildcard TE121 Card 0
name=WCT1/0
manufacturer=Digium
devicetype=Wildcard TE121
location=PCI Bus 02 Slot 09
basechan=1
totchans=31
irq=16
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=HDB3
framing_opts=CCS,CRC4
coding=
framing=
/dev/pts/2
15:16:33
#screen -x
/dev/pts/8
15:16:37
#vim /etc/zaptel.conf
/dev/pts/4
15:16:40
#screen -x
/dev/pts/10
15:17:01
#screen -x
/dev/pts/12
15:17:53
#screen -x
/dev/pts/8
15:22:50
#ztcfg -vvv | less
15:23:04
#vim /etc/zaptel.conf
--- /tmp/l3-saved-2846.31931.7439	2010-05-28 16:23:05.000000000 +0300
+++ /etc/zaptel.conf	2010-05-28 16:23:09.000000000 +0300
@@ -4,7 +4,7 @@
 # This file is parsed by the Zaptel Configurator, ztcfg
 #
 # Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER) 
-span=1,1,0,ccs,hdb3,crc4
+span=1,1,1,ccs,hdb3,crc4
 # termtype: te
 bchan=1-15,17-31
 dchan=16
15:23:45
#vim /etc/zaptel.conf
--- /tmp/l3-saved-2846.21354.21947	2010-05-28 16:23:46.000000000 +0300
+++ /etc/zaptel.conf	2010-05-28 16:25:04.000000000 +0300
@@ -4,12 +4,12 @@
 # This file is parsed by the Zaptel Configurator, ztcfg
 #
 # Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER) 
-span=1,1,1,ccs,hdb3,crc4
+span=1,1,0,ccs,hdb3,crc4
 # termtype: te
 bchan=1-15,17-31
 dchan=16
 
 # Global data
 
-loadzone	= us
-defaultzone	= us
+loadzone	= de
+defaultzone	= de
15:25:04
#ztcfg -vvv
Zaptel Version: 1.4.11
Echo Canceller: MG2
Configuration
======================
SPAN 1: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)
Channel map:
Channel 01: Clear channel (Default) (Slaves: 01)
Channel 02: Clear channel (Default) (Slaves: 02)
Channel 03: Clear channel (Default) (Slaves: 03)
Channel 04: Clear channel (Default) (Slaves: 04)
...
Channel 23: Clear channel (Default) (Slaves: 23)
Channel 24: Clear channel (Default) (Slaves: 24)
Channel 25: Clear channel (Default) (Slaves: 25)
Channel 26: Clear channel (Default) (Slaves: 26)
Channel 27: Clear channel (Default) (Slaves: 27)
Channel 28: Clear channel (Default) (Slaves: 28)
Channel 29: Clear channel (Default) (Slaves: 29)
Channel 30: Clear channel (Default) (Slaves: 30)
Channel 31: Clear channel (Default) (Slaves: 31)
31 channels to configure.
15:25:11
#ztcfg -vvv | less
15:25:18
#vi /etc/asterisk/zapata.conf
--- /tmp/l3-saved-2846.25954.15172	2010-05-28 16:25:30.000000000 +0300
+++ /etc/asterisk/zapata.conf	2010-05-28 16:29:25.000000000 +0300
@@ -59,7 +59,7 @@
 ; ni1:            Old National ISDN 1
 ; qsig:           Q.SIG
 ;
-switchtype=national
+switchtype=euroisdn
 ;
 ; Some switches (AT&T especially) require network specific facility IE
 ; supported values are currently 'none', 'sdn', 'megacom', 'tollfreemegacom', 'accunet'
@@ -210,7 +210,7 @@
 ;                 (2-way)
 ; sf_rxtx:        Same as sf_txrx (for our dyslexic friends)
 ;
-signalling=fxo_ks
+signalling=pri_net
 ;
 ; If you have an outbound signalling format that is different from format
 ; specified above (but compatible), you can specify outbound signalling format,
@@ -610,7 +610,7 @@
 ;
 ;
 ;callerid="Green Phone"<(256) 428-6121>
-channel => 1
+channel => 1-10
 ;callerid="Black Phone"<(256) 428-6122>
 ;channel => 2
 ;callerid="CallerID Phone" <(256) 428-6123>
/dev/pts/14
15:28:30
#screen -x
/dev/pts/8
15:29:25
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:29:34
#ls /var/log/asterisk/
cdr-csv  cdr-custom  event_log  messages  queue_log
15:30:18
#dmesg | tail -50
[    8.050312] agpgart: Detected 7676K stolen memory.
[    8.062264] agpgart: AGP aperture is 256M @ 0xc0000000
[    8.176309] input: Power Button (FF) as /class/input/input0
[    8.205347] ACPI: Power Button (FF) [PWRF]
[    8.205447] input: Power Button (CM) as /class/input/input1
[    8.232885] ACPI: Power Button (CM) [PWRB]
[    8.690341] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    8.709882] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[    8.734852] ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 22 (level, low) -> IRQ 22
[    8.734868] PCI: Setting latency timer of device 0000:00:1b.0 to 64
...
[   26.937422] eth0: no IPv6 routers present
[  475.473009] Registered tone zone 0 (United States / North America)
[  475.473022] wcte12xp: Span configured for CCS/HDB3/CRC4
[  475.519008] wcte12xp: Setting yellow alarm
[  478.635822] wcte12xp: Span configured for CCS/HDB3/CRC4
[  495.702073] wcte12xp: Span configured for CCS/HDB3/CRC4
[  551.442773] wcte12xp: Clearing yellow alarm
[  616.227033] wcte12xp: Span configured for CCS/HDB3/CRC4
[  616.227257] Registered tone zone 29 (Germany)
[  619.068408] wcte12xp: Span configured for CCS/HDB3/CRC4
15:30:23
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
Overlap Dial: 0
T200 Timer: 1000
T203 Timer: 10000
T305 Timer: 30000
T308 Timer: 4000
T309 Timer: -1
T313 Timer: 4000
N200 Counter: 3
linux4*CLI> quit
Executing last minute cleanups
15:34:17
#vim /etc/asterisk/
15:34:17
#vim /etc/asterisk/extensions.conf
--- /dev/null	2010-05-28 16:15:01.501976820 +0300
+++ sip.conf	2010-05-28 16:42:54.000000000 +0300
@@ -0,0 +1,21 @@
+
+[general]
+context=default			; Default context for incoming calls
+language=ru
+
+[567]
+type=friend
+secret=password
+host=dynamic
+context=group3
+pickupgroup=10
+callgroup=10
+
+[568]
+type=friend
+secret=password
+host=dynamic
+context=group2
+pickupgroup=10
+callgroup=10
+
15:39:51
#:q
Russian-Tamara-2.0.2-ulaw  Russian-Tamara-2.0.2-ulaw.tar.gz  s,1,Answer  Yoki.mp3  Yoki.wav
15:39:52
#mv sip.

15:39:57
#cd /etc/asterisk/

15:39:59
#ls
adsi.conf           esel.conf            manager.d         sip.conf
adtranvofr.conf     extconfig.conf       meetme.conf       sip.conf.bak
agents.conf         extensions.ael       mgcp.conf         sip_notify.conf
alarmreceiver.conf  extensions.conf      misdn.conf        skinny.conf
alsa.conf           extensions.conf.bak  modules.conf      sla.conf
amd.conf            features.conf        musiconhold.conf  smdi.conf
asterisk.adsi       festival.conf        muted.conf        telcordia-1.adsi
asterisk.conf       followme.conf        osp.conf          udptl.conf
cdr.conf            func_odbc.conf       oss.conf          users.conf
cdr_custom.conf     gtalk.conf           phone.conf        voicemail.conf
cdr_manager.conf    h323.conf            privacy.conf      vpb.conf
cdr_odbc.conf       http.conf            queues.conf       watchdog.conf
cdr_pgsql.conf      iax.conf             res_odbc.conf     zapata-channels.conf
cdr_tds.conf        iaxprov.conf         res_pgsql.conf    zapata-channels.conf.bak
codecs.conf         indications.conf     res_snmp.conf     zapata.conf
dnsmgr.conf         jabber.conf          rpt.conf
dundi.conf          logger.conf          rtp.conf
enum.conf           manager.conf         say.conf
15:40:00
#-

15:40:01
#mv sip.conf sip.conf.SAVE

15:40:13
#mv extensions.conf extensions.conf.SAVE

15:40:27
#ls
adsi.conf           esel.conf             manager.d         sip.conf.bak
adtranvofr.conf     extconfig.conf        meetme.conf       sip.conf.SAVE
agents.conf         extensions.ael        mgcp.conf         sip_notify.conf
alarmreceiver.conf  extensions.conf.bak   misdn.conf        skinny.conf
alsa.conf           extensions.conf.SAVE  modules.conf      sla.conf
amd.conf            features.conf         musiconhold.conf  smdi.conf
asterisk.adsi       festival.conf         muted.conf        telcordia-1.adsi
asterisk.conf       followme.conf         osp.conf          udptl.conf
cdr.conf            func_odbc.conf        oss.conf          users.conf
cdr_custom.conf     gtalk.conf            phone.conf        voicemail.conf
cdr_manager.conf    h323.conf             privacy.conf      vpb.conf
cdr_odbc.conf       http.conf             queues.conf       watchdog.conf
cdr_pgsql.conf      iax.conf              res_odbc.conf     zapata-channels.conf
cdr_tds.conf        iaxprov.conf          res_pgsql.conf    zapata-channels.conf.bak
codecs.conf         indications.conf      res_snmp.conf     zapata.conf
dnsmgr.conf         jabber.conf           rpt.conf
dundi.conf          logger.conf           rtp.conf
enum.conf           manager.conf          say.conf
15:40:28
#vim sip
--- /dev/null	2010-05-28 16:15:01.501976820 +0300
+++ extensions.conf.	2010-05-28 16:46:15.000000000 +0300
@@ -0,0 +1,3 @@
+[default]
+
+exten => _XXX,Dial(SIP/${EXTEN})
15:40:30
#vim sip.conf
--- /tmp/l3-saved-2846.10004.4256	2010-05-28 16:47:50.000000000 +0300
+++ sip.conf	2010-05-28 16:47:57.000000000 +0300
@@ -1,4 +1,3 @@
-
 [general]
 context=default			; Default context for incoming calls
 language=ru
15:42:57
#host=dynamic

15:43:00
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:43:07
#asterisk -rvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
568/568                    192.168.4.12     D          5061     Unmonitored
567/567                    192.168.4.11     D          5060     Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
linux4*CLI>
linux4*CLI>
linux4*CLI>
linux4*CLI>
linux4*CLI>
linux4*CLI> quit
Executing last minute cleanups
15:44:30
#vim extensions.conf.
--- /tmp/l3-saved-2846.16439.802	2010-05-28 16:50:00.000000000 +0300
+++ extensions.conf	2010-05-28 16:50:11.000000000 +0300
@@ -1,3 +1,4 @@
 [default]
 
 exten => _XXX,Dial(SIP/${EXTEN})
+
15:46:16
#asterisk -rvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
linux4*CLI> dial
dialplan  dial
linux4*CLI> dialplan
No such command 'dialplan ' (type 'help dialplan' for other possible commands)
linux4*CLI> dialplan
No such command 'dialplan' (type 'help dialplan' for other possible commands)
linux4*CLI>
linux4*CLI>
linux4*CLI> quit
Executing last minute cleanups
15:46:44
#fg
exten => 820,1,Record(/var/tmp/menu:gsm)
exten => 821,1,Record(/var/tmp/goaway-stranger:gsm)
exten => 822,1,Record(/var/tmp/welcome-master:gsm)
exten => 823,1,Record(/var/tmp/bye:gsm)
         830,1,Dial(SIP/kiev/201&SIP/odessa/301)
;exten => _5XX,1,Dial(SIP/${EXTEN})
exten => _4XX,1,Macro(call_in)
[corp]=
exten => _2XX,1,Dial(SIP/kiev/${EXTEN})
exten => _3XX,1,Dial(SIP/odessa/${EXTEN})${EXTEN}))
...
          14,1,Queue(cc1)
          15,1,Set(CALLFILENAME=${EXTEN-record-${EPOCH}})
          15,n,Monitor(wav,${CALLFILEMANE},m)
exten => 820,1,Record(/var/tmp/menu:gsm)
exten => 821,1,Record(/var/tmp/goaway-stranger:gsm)
         823,1,Record(/var/tmp/bye:gsm)
exten => 822,1,Record(/var/tmp/welcome-master:gsm)
;exten => _5XX,1,Dial(SIP/${EXTEN})
extensions.conf.
:q
15:47:20
#exten => _4XX,1,Macro(call_in)
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:47:23
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
    -- B-channel 0/9 restarted on span 1
    -- B-channel 0/8 successfully restarted on span 1
    -- B-channel 0/10 restarted on span 1
    -- B-channel 0/9 successfully restarted on span 1
    -- B-channel 0/10 successfully restarted on span 1
linux4*CLI>
linux4*CLI>
linux4*CLI> dialplan reload
No such command 'dialplan reload' (type 'help dialplan reload' for other possible commands)
linux4*CLI> dialplan reload
15:47:47
#vim sip.conf
15:48:50
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:49:08
#less /etc/asterisk/ext
15:49:08
#less /etc/asterisk/ext
15:49:18
#ls
adsi.conf           esel.conf             manager.conf      say.conf
adtranvofr.conf     extconfig.conf        manager.d         sip.conf
agents.conf         extensions.ael        meetme.conf       sip.conf.bak
alarmreceiver.conf  extensions.conf.      mgcp.conf         sip.conf.SAVE
alsa.conf           extensions.conf.bak   misdn.conf        sip_notify.conf
amd.conf            extensions.conf.SAVE  modules.conf      skinny.conf
asterisk.adsi       features.conf         musiconhold.conf  sla.conf
asterisk.conf       festival.conf         muted.conf        smdi.conf
cdr.conf            followme.conf         osp.conf          telcordia-1.adsi
cdr_custom.conf     func_odbc.conf        oss.conf          udptl.conf
cdr_manager.conf    gtalk.conf            phone.conf        users.conf
cdr_odbc.conf       h323.conf             privacy.conf      voicemail.conf
cdr_pgsql.conf      http.conf             queues.conf       vpb.conf
cdr_tds.conf        iax.conf              res_odbc.conf     watchdog.conf
codecs.conf         iaxprov.conf          res_pgsql.conf    zapata-channels.conf
dnsmgr.conf         indications.conf      res_snmp.conf     zapata-channels.conf.bak
dundi.conf          jabber.conf           rpt.conf          zapata.conf
enum.conf           logger.conf           rtp.conf
15:49:19
#mv extensions.conf. extensions.conf

15:49:28
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:49:31
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
    -- B-channel 0/7 successfully restarted on span 1
    -- B-channel 0/8 restarted on span 1
    -- B-channel 0/8 successfully restarted on span 1
    -- B-channel 0/9 restarted on span 1
    -- B-channel 0/9 successfully restarted on span 1
    -- B-channel 0/10 restarted on span 1
    -- B-channel 0/10 successfully restarted on span 1
[May 28 16:49:46] NOTICE[4118]: chan_sip.c:14441 handle_request_invite: Call from '' to extension '567' rejected because extension not found.
linux4*CLI> quit
Executing last minute cleanups
15:49:55
#vim extensions.conf
--- /tmp/l3-saved-2846.7489.23317	2010-05-28 16:51:01.000000000 +0300
+++ sip.conf	2010-05-28 16:51:09.000000000 +0300
@@ -6,7 +6,6 @@
 type=friend
 secret=password
 host=dynamic
-context=group3
 pickupgroup=10
 callgroup=10
 
@@ -14,7 +13,6 @@
 type=friend
 secret=password
 host=dynamic
-context=group2
 pickupgroup=10
 callgroup=10
 
15:50:12
# EXTEN}
[568]
type=friend
secret=password 260C
host=dynamic
context=group2
~
~
~
~
~
~
~
~
15:50:53
#vim sip.conf
15:51:09
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:51:11
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
    -- B-channel 0/6 successfully restarted on span 1
    -- B-channel 0/8 restarted on span 1
    -- B-channel 0/7 successfully restarted on span 1
    -- B-channel 0/9 restarted on span 1
    -- B-channel 0/8 successfully restarted on span 1
    -- B-channel 0/10 restarted on span 1
    -- B-channel 0/9 successfully restarted on span 1
    -- B-channel 0/10 successfully restarted on span 1
linux4*CLI> quit
Executing last minute cleanups
15:51:28
#vim extensions.conf
15:52:31
#vim sip.conf
--- /tmp/l3-saved-2846.20245.8461	2010-05-28 16:53:48.000000000 +0300
+++ extensions.conf	2010-05-28 16:54:05.000000000 +0300
@@ -1,4 +1,4 @@
 [default]
 
-exten => _XXX,Dial(SIP/${EXTEN})
+exten => _XXX,1,Dial(SIP/${EXTEN})
 
15:52:54
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
Name/username              Host            Dyn Nat ACL Port     Status
568/568                    192.168.4.12     D          5061     Unmonitored
567/567                    192.168.4.11     D          5060     Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
linux4*CLI>
linux4*CLI>
linux4*CLI>
[May 28 16:53:17] NOTICE[4306]: chan_sip.c:14441 handle_request_invite: Call from '' to extension '567' rejected because extension not found.
linux4*CLI> quit
Executing last minute cleanups
15:53:26
#cat extensions.conf
[default]
exten => _XXX,Dial(SIP/${EXTEN})
15:53:38
#vi extensions.conf
15:54:05
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
[May 28 16:54:53] NOTICE[4306]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: (null)
linux4*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
568/568                    192.168.4.12     D          5061     Unmonitored
567/567                    192.168.4.11     D          5060     Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
linux4*CLI>
linux4*CLI>
linux4*CLI> quit
Executing last minute cleanups
15:55:16
#less sip.conf
/dev/pts/16
15:55:30
#mc
15:55:32
#na
named              named-checkzone    namei              nano
named-checkconf    named-compilezone  nameif             nawk
/dev/pts/8
15:55:55
#less extensions.conf
15:56:05
#less extensions.conf.SAVE
15:56:13
#vim sip.conf
15:56:45
#vim sip.conf
--- /tmp/l3-saved-2846.25465.16265	2010-05-28 16:57:09.000000000 +0300
+++ extensions.conf	2010-05-28 16:57:36.000000000 +0300
@@ -1,4 +1,5 @@
 [default]
 
+exten => 800,1,Playback()
 exten => _XXX,1,Dial(SIP/${EXTEN})
 
15:57:36
#vim extensions.conf
--- /tmp/l3-saved-2846.28281.19430	2010-05-28 16:57:38.000000000 +0300
+++ extensions.conf	2010-05-28 16:58:14.000000000 +0300
@@ -1,5 +1,5 @@
 [default]
 
-exten => 800,1,Playback()
+exten => 800,1,Playback(/var/tmp/vybor)
 exten => _XXX,1,Dial(SIP/${EXTEN})
 
15:58:14
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
linux4*CLI>
    -- Executing [568@default:1] Dial("SIP/567-b67177c8", "SIP/568") in new stack
    -- Called 568
    -- SIP/568-081bc468 is ringing
  == Spawn extension (default, 568, 1) exited non-zero on 'SIP/567-b67177c8'
linux4*CLI>
linux4*CLI>
linux4*CLI>
linux4*CLI> quit
Executing last minute cleanups
16:04:39
#vim extensions.conf
--- /tmp/l3-saved-2846.19388.30322	2010-05-28 17:04:57.000000000 +0300
+++ extensions.conf	2010-05-28 17:06:34.000000000 +0300
@@ -1,5 +1,6 @@
 [default]
 
 exten => 800,1,Playback(/var/tmp/vybor)
+exten => _57X,1,Dial(Zap/G1/${EXTEN:2})
 exten => _XXX,1,Dial(SIP/${EXTEN})
 
16:06:57
#ssh 192.168.1.1
root@192.168.1.1's password:
Linux linux1.unix.nt 2.6.26-2-686 #1 SMP Wed May 12 21:56:10 UTC 2010 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri May 28 16:55:08 2010
l3-agent is already running: pid=2558; pidfile=/root/.lilalo/l3-agent.pid
16:07:07
#cd /etc/asterisk/

16:07:09
#ls
adsi.conf           enum.conf             logger.conf       rpt.conf
adtranvofr.conf     esel.conf             manager.conf      rtp.conf
agents.conf         extconfig.conf        manager.d         Russian-Tamara-2.0.2-ulaw
alarmreceiver.conf  extensions.ael        meetme.conf       say.conf
alsa.conf           extensions.conf       mgcp.conf         sip.conf
amd.conf            extensions.conf.save  misdn.conf        sip.conf.save
asterisk.adsi       features.conf         modules.conf      sip_notify.conf
asterisk.conf       festival.conf         musiconhold.conf  skinny.conf
cdr.conf            followme.conf         muted.conf        sla.conf
cdr_custom.conf     func_odbc.conf        osp.conf          smdi.conf
cdr_manager.conf    gtalk.conf            oss.conf          telcordia-1.adsi
cdr_odbc.conf       h323.conf             phone.conf        udptl.conf
cdr_pgsql.conf      http.conf             privacy.conf      users.conf
cdr_tds.conf        iax.conf              queues.conf       voicemail.conf
codecs.conf         iaxprov.conf          res_odbc.conf     vpb.conf
dnsmgr.conf         indications.conf      res_pgsql.conf    watchdog.conf
dundi.conf          jabber.conf           res_snmp.conf     zapata.conf
16:07:09
#vim extensions.conf
16:07:43
#vim extensions.conf
/dev/pts/0
16:12:18
#vim zapata.conf
/dev/pts/8
16:12:37
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
    -- Added extension 's' priority 6 to macro-incoming
  == Parsing '/etc/asterisk/users.conf': Found
linux1*CLI>
linux1*CLI>
linux1*CLI>
linux1*CLI>
linux1*CLI>
[May 28 17:13:35] NOTICE[3707]: chan_sip.c:14441 handle_request_invite: Call from '701' to extension '34567' rejected because extension not found.
linux1*CLI> quit
Executing last minute cleanups
16:14:26
#exten => _34
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf': Found
  == Parsing '/etc/asterisk/extconfig.conf': Found
Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux1 (pid = 3685)
Verbosity is at least 3
linux1*CLI> quit
Executing last minute cleanups
16:14:35
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
    -- Added extension 's' priority 6 to macro-incoming
  == Parsing '/etc/asterisk/users.conf': Found
linux1*CLI>
linux1*CLI>
linux1*CLI>
linux1*CLI>
linux1*CLI>
[May 28 17:15:22] NOTICE[3707]: chan_sip.c:14441 handle_request_invite: Call from '701' to extension '34567' rejected because extension not found.
linux1*CLI> quit
Executing last minute cleanups
16:15:48
#vim extensions.conf
16:17:45
#vim extensions.conf
16:19:22
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/0
16:26:09
#vim extensions.conf
/dev/pts/8
16:27:13
#vim extensions.conf
16:29:23
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
    -- Sent into invalid extension 's' in context 'submenu' on SIP/dnepr-081deb20
    -- Executing [i@submenu:1] BackGround("SIP/dnepr-081deb20", "/var/tmp/wrong") in new stack
    -- <SIP/dnepr-081deb20> Playing '/var/tmp/wrong' (language 'en')
  == CDR updated on SIP/dnepr-081deb20
    -- Executing [3@submenu:1] Dial("SIP/dnepr-081deb20", "SIP/odessa/301") in new stack
    -- Called odessa/301
    -- SIP/odessa-081e6a38 is ringing
  == Spawn extension (submenu, 3, 1) exited non-zero on 'SIP/dnepr-081deb20'
linux1*CLI> quit
Executing last minute cleanups
16:32:45
#vim extensions.conf
16:33:10
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
linux1*CLI>
linux1*CLI>
[May 29 09:38:37] NOTICE[4823]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 702
[May 29 09:41:37] NOTICE[4823]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 702
[May 29 09:44:37] NOTICE[4823]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 702
[May 29 09:47:37] NOTICE[4823]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 702
[May 29 09:50:37] NOTICE[4823]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 702
[May 29 09:53:37] NOTICE[4823]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 702
linux1*CLI> quit
Executing last minute cleanups

Суббота (05/29/10)

/dev/pts/0
08:35:22
#screen -ls
08:35:27
#screen -x
/dev/pts/2
08:35:31
#vim /etc/asterisk/sip.conf
/dev/pts/4
08:35:38
#screen -x
прошло 20 минут
/dev/pts/8
08:56:30
#exit
Connection to 192.168.1.1 closed.
08:56:34
#shutdown -h now

/dev/pts/0
09:03:21
#dmesg |grep -i Zapt
[    8.330716] Zaptel Version: 1.4.11
[    8.330718] Zaptel Echo Canceller: MG2
09:03:29
#zap
zapconf          zaptel_hardware
09:03:29
#zt
ztcfg            ztmonitor        ztscan           zttest
ztdiag           zt_registration  ztspeed          zttool
09:03:29
#zts
ztscan   ztspeed

Файлы

  • extensions.conf
  • extensions.conf
    >
    [default]
    exten => _XXX,Dial(SIP/${EXTEN})
    

    Статистика

    Время первой команды журнала15:15:56 2010- 5-28
    Время последней команды журнала09:03:29 2010- 5-29
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %20.79
    Процент синтаксически неверно набранных команд, % 1.98
    Суммарное время работы с терминалом *, час 1.76
    Количество командных строк в единицу времени, команда/мин 0.96
    Частота использования команд
    vim27|=========================| 25.00%
    asterisk13|============| 12.04%
    screen10|=========| 9.26%
    less7|======| 6.48%
    /etc/init.d/asterisk6|=====| 5.56%
    ls5|====| 4.63%
    mv4|===| 3.70%
    ztcfg3|==| 2.78%
    cd2|=| 1.85%
    dmesg2|=| 1.85%
    vi2|=| 1.85%
    grep2|=| 1.85%
    zap2|=| 1.85%
    exten2|=| 1.85%
    ztscan2|=| 1.85%
    na1|| 0.93%
    fg1|| 0.93%
    _341|| 0.93%
    5,17-31|| 0.93%
    zapconf1|| 0.93%
    zts1|| 0.93%
    cat1|| 0.93%
    EXTEN}1|| 0.93%
    -1|| 0.93%
    ps1|| 0.93%
    _4XX,1,Macro(call_in)1|| 0.93%
    :q1|| 0.93%
    host=dynamic1|| 0.93%
    tail1|| 0.93%
    shutdown1|| 0.93%
    zt1|| 0.93%
    ssh1|| 0.93%
    exit1|| 0.93%
    mc1|| 0.93%
    ____
    *) Интервалы неактивности длительностью 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$