/l3/users/igor-public/asterisk/debian2.net.nt/root :1 :2 |
|
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2942.1214.30356 2009-11-28 09:20:16.000000000 -0500 +++ /etc/asterisk/extensions.conf 2009-11-28 09:21:48.000000000 -0500 @@ -234,6 +234,9 @@ exten => _2XXX,1,Dial(SIP/${EXTEN},60) exten => _2XXX,n,Hangup +exten => 2000,1,Answer() +exten => 2000,n,Playback(demo-thanks) +exten => 2000,n,Hangup exten => _1XXX,1,Dial(SIP/1xxx/${EXTEN},60) exten => _1XXX,n,Hangup |
#modprobe zap
zaphfc zaptel |
#modprobe zap
zaphfc zaptel |
#modinfo zaptel
filename: /lib/modules/2.6.26-2-686/misc/zaptel.ko version: 1.4.11 license: GPL description: Zapata Telephony Interface author: Mark Spencer <markster@digium.com> srcversion: 53142A7A0C3B5E6CE3CBA6F depends: crc-ccitt vermagic: 2.6.26-2-686 SMP mod_unload modversions 686 parm: debug:int parm: deftaps:int |
#vi /etc/zaptel.conf
--- /dev/null 2009-11-28 09:06:08.513999603 -0500 +++ /etc/zaptel.conf 2009-11-28 09:37:19.000000000 -0500 @@ -0,0 +1,4 @@ +fxsks=1 +loadzone=no +defaultzone=no + |
#/etc/init.d/asterisk reload
Reloading Asterisk PBX configuration files. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#ping 192.168.7.4
PING 192.168.7.4 (192.168.7.4) 56(84) bytes of data. 64 bytes from 192.168.7.4: icmp_seq=1 ttl=64 time=0.227 ms 64 bytes from 192.168.7.4: icmp_seq=2 ttl=64 time=0.300 ms ^C --- 192.168.7.4 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.227/0.263/0.300/0.039 ms |
#asterisk -rvv
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 ========================================================================= ... Dialplan reloaded. == Parsing '/etc/asterisk/extensions.conf': Found == Setting global variable 'CONSOLE' to 'Console/dsp' == Setting global variable 'IAXINFO' to 'guest' == Setting global variable 'TRUNK' to 'Zap/G2' == Setting global variable 'TRUNKMSD' to '1' == Parsing '/etc/asterisk/users.conf': Found debian2*CLI> debian2*CLI> exit Executing last minute cleanups |
#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 ========================================================================= ... -- Added extension '_2XXX' priority 1 to demo1 -- Added extension '_2XXX' priority 2 to demo1 -- Added extension '2000' priority 1 to demo1 -- Added extension '2000' priority 2 to demo1 -- Added extension '2000' priority 3 to demo1 -- Added extension '_1XXX' priority 1 to demo1 -- Added extension '_1XXX' priority 2 to demo1 == Parsing '/etc/asterisk/users.conf': Found debian2*CLI> exit Executing last minute cleanups |
#~
32 33 " Uncomment the following to have Vim load indentation rules and plugins 34 " according to the detected filetype. 35 if has("autocmd") au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") 36 \| exe "normal! g'\"t | endif endif 37 "endif 38 39 " The following are commented out as they cause vim to behave a lot 40 " differently from regular Vi. They are highly recommended though. 41 "set showcmd " Show (partial) command in status line. 42 "set showmatch " Show matching brackets. "/etc/vim/vimrc" 55L, 2272C writtense insensitive matching |
#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 ========================================================================= ... Name/username Host Dyn Nat ACL Port Status 4xxx (Unspecified) D 0 UNKNOWN 1xxx (Unspecified) D 0 Unmonitored 2111/2111 192.168.7.210 D 2049 Unmonitored 2222/2222 192.168.7.218 D 60068 Unmonitored 4 sip peers [Monitored: 0 online, 1 offline Unmonitored: 2 online, 1 offline] debian2*CLI> debian2*CLI> debian2*CLI> exit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-2942.1859.17199 2009-11-28 09:31:26.000000000 -0500 +++ /etc/asterisk/sip.conf 2009-11-28 09:31:51.000000000 -0500 @@ -610,7 +610,6 @@ context=demo1 host=192.168.7.1 ;callerid="cherep" -host=dynamic ; This device needs to register ;nat=yes ; X-Lite is behind a NAT router canreinvite=no ; Typically set to NO if behind NAT disallow=all @@ -626,7 +625,6 @@ context=demo1 host=192.168.7.4 ;callerid="cherep" -host=dynamic ; This device needs to register ;nat=yes ; X-Lite is behind a NAT router qualify=yes canreinvite=no ; Typically set to NO if behind NAT |
#ztcfg -vv
Notice: Configuration file is /etc/zaptel.conf line 0: Unable to open master device '/dev/zap/ctl' 1 error(s) detected |
#modprobe zaptel
|
#ztcfg -vv
Zaptel Version: 1.4.11 Echo Canceller: MG2 Configuration ====================== Channel map: Channel 01: FXS Kewlstart (Default) (Slaves: 01) 1 channels to configure. ZT_CHANCONFIG failed on channel 1: No such device or address (6) |
#vi /etc/asterisk/zapata.conf
|
#zap
zapconf zaptel_hardware |
#zaptel_hardware
pci:0000:02:02.0 wcte12xp- d161:8001 Wildcard TE122 |
#ztscan
|
# 23 ; d-channel for the trunk.
ztcfg ztmonitor ztscan zttest ztdiag zt_registration ztspeed zttool |
#man ztscan
|
#ztscan 2
|
#ztcfg
ZT_CHANCONFIG failed on channel 1: No such device or address (6) |
#zttool
┌────────────────────┤ Zapata Telephony Interfaces ├─────────────────────┐ Welcome to the Zaptel Tool! |
#man zttool
|
#man ztmonitor
|
#man ztdiag
|
#ztdiag
Usage: ztdiag <channel> |
#man ztdiag
|
#ztdiag 5
ioctl(ZT_CHANDIAG): Invalid argument |
#ztdiag 1
ioctl(ZT_CHANDIAG): Invalid argument |
#ztdiag 0
ioctl(ZT_CHANDIAG): Invalid argument |
#ztdiag 2
ioctl(ZT_CHANDIAG): Invalid argument |
#ztdiag 3
ioctl(ZT_CHANDIAG): Invalid argument |
#ztdiag 4
ioctl(ZT_CHANDIAG): Invalid argument |
#ztdiag 5
ioctl(ZT_CHANDIAG): Invalid argument |
#ztdiag 6
ioctl(ZT_CHANDIAG): Invalid argument |
#lsmod
Module Size Used by zaptel 185060 0 crc_ccitt 2080 1 zaptel i915 25280 2 drm 65288 3 i915 battery 10180 0 ppdev 6468 0 lp 8164 0 speedstep_lib 4516 0 cpufreq_powersave 1856 0 ... scsi_mod 129548 6 ib_iser,iscsi_tcp,libiscsi,scsi_transport_iscsi,sd_mod,libata dock 8304 1 libata ehci_hcd 28428 0 e1000 102624 0 uhci_hcd 18672 0 usbcore 118192 4 usbhid,ehci_hcd,uhci_hcd thermal 15228 0 processor 32576 1 thermal fan 4196 0 thermal_sys 10856 3 thermal,processor,fan |
#rmmod zaptel
|
#modprobe zaptel
|
#modinfo zaptel
filename: /lib/modules/2.6.26-2-686/misc/zaptel.ko version: 1.4.11 license: GPL description: Zapata Telephony Interface author: Mark Spencer <markster@digium.com> srcversion: 53142A7A0C3B5E6CE3CBA6F depends: crc-ccitt vermagic: 2.6.26-2-686 SMP mod_unload modversions 686 parm: debug:int parm: deftaps:int |
#ztcfg -vvvv
Zaptel Version: 1.4.11 Echo Canceller: MG2 Configuration ====================== Channel map: Channel 01: FXS Kewlstart (Default) (Slaves: 01) 1 channels to configure. ZT_CHANCONFIG failed on channel 1: No such device or address (6) |
#less /var/log/messages
|
#ztcfg -vvvv
Zaptel Version: 1.4.11 Echo Canceller: MG2 Configuration ====================== SPAN 1: ESF/B8ZS 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 17: Clear channel (Default) (Slaves: 17) Channel 18: Clear channel (Default) (Slaves: 18) Channel 19: Clear channel (Default) (Slaves: 19) Channel 20: Clear channel (Default) (Slaves: 20) Channel 21: Clear channel (Default) (Slaves: 21) Channel 22: Clear channel (Default) (Slaves: 22) Channel 23: Clear channel (Default) (Slaves: 23) Channel 24: D-channel (Default) (Slaves: 24) 24 channels to configure. ZT_SPANCONFIG failed on span 1: No such device or address (6) |
#vi /etc/zaptel.conf
--- /tmp/l3-saved-3056.20096.14179 2009-11-28 09:46:40.000000000 -0500 +++ /etc/zaptel.conf 2009-11-28 09:49:32.000000000 -0500 @@ -1,3 +1,3 @@ -span=1,1,0,esf,b8zs +span=1,1,0,ccs,hdb3,crc4 bchan=1-23 dchan=24 |
#reboot
|
#ztcfg -vvvv
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 16: Clear channel (Default) (Slaves: 16) Channel 17: Clear channel (Default) (Slaves: 17) Channel 18: Clear channel (Default) (Slaves: 18) Channel 19: Clear channel (Default) (Slaves: 19) Channel 20: Clear channel (Default) (Slaves: 20) Channel 21: Clear channel (Default) (Slaves: 21) Channel 22: Clear channel (Default) (Slaves: 22) Channel 23: Clear channel (Default) (Slaves: 23) Channel 24: D-channel (Default) (Slaves: 24) 24 channels to configure. |
#screen
|
#apt-cache search libpri
libpri-dev - Primary Rate ISDN specification development files libpri1.0 - Primary Rate ISDN specification library libprima-perl - multi-platform GUI development toolkit for Perl libprinterconf-dev - Printer autodetection library libprinterconf0c2a - Printer autodetection library libprintsys - printcap parser, helper for gnulpr's printfilters libprintsys-dev - printcap parser, helper for gnulpr's printfilters, dev files |
#apt-get install libpri1.0
Reading package lists... Done Building dependency tree Reading state information... Done libpri1.0 is already the newest version. libpri1.0 set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#ztscan
[1] active=yes alarms=OK description=Wildcard TE122 Card 0 name=WCT1/0 manufacturer=Digium devicetype=Wildcard TE122 location=PCI Bus 02 Slot 03 basechan=1 totchans=31 irq=17 type=digital-E1 syncsrc=0 lbo=0 db (CSU)/0-133 feet (DSX-1) coding_opts=HDB3 framing_opts=CCS,CRC4 coding=HDB3 framing=CCS |
#ztscan
[1] active=yes alarms=OK description=Wildcard TE122 Card 0 name=WCT1/0 manufacturer=Digium devicetype=Wildcard TE122 location=PCI Bus 02 Slot 03 basechan=1 totchans=31 irq=17 type=digital-E1 syncsrc=0 lbo=0 db (CSU)/0-133 feet (DSX-1) coding_opts=HDB3 framing_opts=CCS,CRC4 coding=HDB3 framing=CCS |
#apt-get install libpri-dev
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libpri-dev 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 156kB of archives. After this operation, 504kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main libpri-dev 1.4.3-2 [156kB] Fetched 156kB in 3s (44.6kB/s) Selecting previously deselected package libpri-dev. (Reading database ... 112969 files and directories currently installed.) Unpacking libpri-dev (from .../libpri-dev_1.4.3-2_i386.deb) ... Setting up libpri-dev (1.4.3-2) ... |
#~
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 16: Clear channel (Default) (Slaves: 16) Channel 17: Clear channel (Default) (Slaves: 17) Channel 18: Clear channel (Default) (Slaves: 18) Channel 19: Clear channel (Default) (Slaves: 19) Channel 20: Clear channel (Default) (Slaves: 20) Channel 21: Clear channel (Default) (Slaves: 21) Channel 22: Clear channel (Default) (Slaves: 22) Channel 23: Clear channel (Default) (Slaves: 23) Channel 24: D-channel (Default) (Slaves: 24) 24 channels to configure. |
#ztscan
[1] active=yes alarms=OK description=Wildcard TE122 Card 0 name=WCT1/0 manufacturer=Digium devicetype=Wildcard TE122 location=PCI Bus 02 Slot 03 basechan=1 totchans=31 irq=17 type=digital-E1 syncsrc=0 lbo=0 db (CSU)/0-133 feet (DSX-1) coding_opts=HDB3 framing_opts=CCS,CRC4 coding=HDB3 framing=CCS |
#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 ========================================================================= ... debian2*CLI> pri show span 1 No PRI running on span 1 debian2*CLI> pri show span 0 Invalid span '0'. Should be a number from 1 to 128 debian2*CLI> pri show sp spans span debian2*CLI> pri show span spans span debian2*CLI> exit Executing last minute cleanups |
#vim /etc/asterisk/zapata.conf
--- /tmp/l3-saved-3300.28530.25096 2009-11-28 10:07:41.000000000 -0500 +++ /etc/asterisk/zapata.conf 2009-11-28 10:11:04.000000000 -0500 @@ -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_ls +signalling=pri_cpe ; ; If you have an outbound signalling format that is different from format ; specified above (but compatible), you can specify outbound signalling format, @@ -680,3 +680,7 @@ ;context=default ;channel => 1 +group=1 +context=demo1 +channel => 1-15 + |
#grep -v ^; /etc/asterisk/zapata.conf | less
|
#grep -v '^;' /etc/asterisk/zapata.conf | less
|
#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 ========================================================================= ... -- Registered channel 15, ISDN PRI signalling -- Automatically generated pseudo channel == Parsing '/etc/asterisk/users.conf': Found [Nov 28 10:12:20] ERROR[3677]: chan_zap.c:10419 start_pri: D-channel 16 is not in HDLC/FCS mode. See /etc/zaptel.conf [Nov 28 10:12:20] ERROR[3677]: chan_zap.c:12745 setup_zap: Unable to start D-channel on span 1 [Nov 28 10:12:20] WARNING[3677]: chan_zap.c:11188 zap_restart: Reload channels from zap config failed! debian2*CLI> pri show spa spans span debian2*CLI> quit Executing last minute cleanups |
#vi /etc/zaptel.conf
--- /tmp/l3-saved-3300.8057.6966 2009-11-28 10:12:45.000000000 -0500 +++ /etc/zaptel.conf 2009-11-28 10:13:04.000000000 -0500 @@ -1,3 +1,3 @@ span=1,1,0,ccs,hdb3,crc4 -bchan=1-23 -dchan=24 +bchan=1-15 +dchan=16 |
#rmmod zaptel
ERROR: Module zaptel is in use by wcte12xp |
#rmmod wcte12xp
ERROR: Module wcte12xp is in use |
#lsmod | less
|
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim /etc/asterisk/zapata.conf
--- /tmp/l3-saved-3300.13188.22271 2009-11-28 10:23:40.000000000 -0500 +++ /etc/asterisk/zapata.conf 2009-11-28 10:25:13.000000000 -0500 @@ -682,5 +682,5 @@ group=1 context=demo1 -channel => 1-15 +channel => 1-2 |
#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 ========================================================================= ... == Parsing '/etc/asterisk/zapata.conf': Found [Nov 28 10:25:37] WARNING[3960]: chan_zap.c:957 zt_open: Unable to specify channel 1: Device or resource busy [Nov 28 10:25:37] ERROR[3960]: chan_zap.c:7414 mkintf: Unable to open channel 1: Device or resource busy here = 0, tmp->channel = 1, channel = 1 [Nov 28 10:25:37] ERROR[3960]: chan_zap.c:11900 build_channels: Unable to register channel '1-2' [Nov 28 10:25:37] WARNING[3960]: chan_zap.c:11188 zap_restart: Reload channels from zap config failed! debian2*CLI> debian2*CLI> debian2*CLI> exit Executing last minute cleanups |
#/etc/init.d/asterisk res
Usage: /etc/init.d/asterisk {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload} |
#/etc/init.d/asterisk rest
Usage: /etc/init.d/asterisk {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload} |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#date
Sat Nov 28 10:29:26 EST 2009 |
#uname -a
Linux debian2 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52 UTC 2009 i686 GNU/Linux |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. 64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=51 time=56.8 ms ^C --- ya.ru ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 56.850/56.850/56.850/0.000 ms |
#vi /etc/asterisk/extensions.conf
|
#top
top - 11:50:17 up 1:57, 6 users, load average: 0.99, 0.37, 0.18 Tasks: 113 total, 3 running, 110 sleeping, 0 stopped, 0 zombie Cpu(s): 69.8%us, 1.3%sy, 0.0%ni, 28.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2059368k total, 518860k used, 1540508k free, 70924k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 3903784k total, 0k used, 3903784k free, 194052k cached 2966 root 20 0 16100 12m 1516 R 41.4 0.6 26:23.24 l3-agent 2845 root 20 0 229m 16m 6864 R 22.9 0.8 4:12.93 Xorg 3127 user 20 0 19292 9.9m 7196 S 4.0 0.5 0:07.24 metacity 3329 user 20 0 40936 17m 9864 S 1.3 0.9 0:24.68 gnome-terminal ... 5 root RT -5 0 0 0 S 0.0 0.0 0:00.04 watchdog/0 6 root 15 -5 0 0 0 S 0.0 0.0 0:00.46 events/0 7 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 39 root 15 -5 0 0 0 S 0.0 0.0 0:00.06 kblockd/0 41 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid 42 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpi_notify 115 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod 148 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush 149 root 20 0 0 0 0 S 0.0 0.0 0:01.62 pdflush 150 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kswapd0 |
#ps aux | grep l3-agent
root 2966 22.9 0.6 16100 12768 ? Rs 09:54 26:44 l3-agent root 4365 0.0 0.0 3120 736 pts/10 S+ 11:50 0:00 grep l3-agent |
#cat /etc/asterisk/extensions.conf
; extensions.conf - the Asterisk dial plan ; ; Static extension configuration file, used by ; the pbx_config module. This is where you configure all your ; inbound and outbound calls in Asterisk. ; ; This configuration file is reloaded ; - With the "dialplan reload" command in the CLI ; - With the "reload" command (that reloads everything) in the CLI ; ... exten => _4XXX,n,Hangup exten => _2XXX,1,Dial(SIP/${EXTEN},60) exten => _2XXX,n,Hangup exten => 2000,1,Answer() exten => 2000,n,Playback(demo-thanks) exten => 2000,n,Hangup exten => _1XXX,1,Dial(SIP/1xxx/${EXTEN},60) exten => _1XXX,n,Hangup exten => _9XX,1,Dial(ZAP/G1/${EXTEN},60) exten => _9XX,n,Hangup |
#pkill l3-agent
|
#ping xgu.ru
PING xgu.ru (212.26.146.51) 56(84) bytes of data. 64 bytes from chub.in (212.26.146.51): icmp_seq=1 ttl=56 time=5.08 ms ^C --- xgu.ru ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 5.087/5.087/5.087/0.000 ms |
#l3-agent
l3-agent is already running: pid=2966; pidfile=/root/.lilalo/l3-agent.pid |
#date
Sat Nov 28 11:52:41 EST 2009 |
#ntpdate ntp.psn.ru
28 Nov 11:53:14 ntpdate[4468]: step time server 194.149.67.130 offset 0.517190 sec |
#date
Sat Nov 28 11:53:17 EST 2009 |
#dpkg-reconfigure tzdata
Package configuration âââââââââââââââââââââ⤠Configuring tzdata ââââââââââââââââââââââ â Please select the time zone corresponding to your location. â â â â Time zone: â â â â Kiev â â â Lisbon â® â â Ljubljana â â â London â® â ... â Minsk st â â â Monaco â â â â â â â <Ok> <Cancel> â â â ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ Current default timezone: 'Europe/Kiev' Local time is now: Sat Nov 28 18:53:35 EET 2009. Universal Time is now: Sat Nov 28 16:53:35 UTC 2009. |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:07:e9:3c:2a:3d inet addr:192.168.7.2 Bcast:192.168.7.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe3c:2a3d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:82 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:120 (120.0 B) TX bytes:9223 (9.0 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:18 errors:0 dropped:0 overruns:0 frame:0 TX packets:18 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5940 (5.8 KiB) TX bytes:5940 (5.8 KiB) |
#dhclient eth0
Internet Systems Consortium DHCP Client V3.1.1 Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Listening on LPF/eth0/00:07:e9:3c:2a:3d Sending on LPF/eth0/00:07:e9:3c:2a:3d Sending on Socket/fallback DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 DHCPOFFER from 192.168.16.254 DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPACK from 192.168.16.254 bound to 192.168.16.212 -- renewal in 273 seconds. |
; extensions.conf - the Asterisk dial plan ; ; Static extension configuration file, used by ; the pbx_config module. This is where you configure all your ; inbound and outbound calls in Asterisk. ; ; This configuration file is reloaded ; - With the "dialplan reload" command in the CLI ; - With the "reload" command (that reloads everything) in the CLI ; ; The "General" category is for certain variables. ; [general] ; ; If static is set to no, or omitted, then the pbx_config will rewrite ; this file when extensions are modified. Remember that all comments ; made in the file will be lost when that happens. ; ; XXX Not yet implemented XXX ; static=yes ; ; if static=yes and writeprotect=no, you can save dialplan by ; CLI command "dialplan save" too ; writeprotect=no ; ; If autofallthrough is set, then if an extension runs out of ; things to do, it will terminate the call with BUSY, CONGESTION ; or HANGUP depending on Asterisk's best guess. This is the default. ; ; If autofallthrough is not set, then if an extension runs out of ; things to do, Asterisk will wait for a new extension to be dialed ; (this is the original behavior of Asterisk 1.0 and earlier). ; ;autofallthrough=no ; ; If clearglobalvars is set, global variables will be cleared ; and reparsed on an extensions reload, or Asterisk reload. ; ; If clearglobalvars is not set, then global variables will persist ; through reloads, and even if deleted from the extensions.conf or ; one of its included files, will remain set to the previous value. ; ; NOTE: A complication sets in, if you put your global variables into ; the AEL file, instead of the extensions.conf file. With clearglobalvars ; set, a "reload" will often leave the globals vars cleared, because it ; is not unusual to have extensions.conf (which will have no globals) ; load after the extensions.ael file (where the global vars are stored). ; So, with "reload" in this particular situation, first the AEL file will ; clear and then set all the global vars, then, later, when the extensions.conf ; file is loaded, the global vars are all cleared, and then not set, because ; they are not stored in the extensions.conf file. ; clearglobalvars=no ; ; If priorityjumping is set to 'yes', then applications that support ; 'jumping' to a different priority based on the result of their operations ; will do so (this is backwards compatible behavior with pre-1.2 releases ; of Asterisk). Individual applications can also be requested to do this ; by passing a 'j' option in their arguments. ; ;priorityjumping=yes ; ; User context is where entries from users.conf are registered. The ; default value is 'default' ; ;userscontext=default ; ; You can include other config files, use the #include command ; (without the ';'). Note that this is different from the "include" command ; that includes contexts within other contexts. The #include command works ; in all asterisk configuration files. ;#include "filename.conf" ; The "Globals" category contains global variables that can be referenced ; in the dialplan with the GLOBAL dialplan function: ; ${GLOBAL(VARIABLE)} ; ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid ; Unix/Linux environmental variables can be reached with the ENV dialplan ; function: ${ENV(VARIABLE)} ; [globals] CONSOLE=Console/dsp ; Console interface for demo ;CONSOLE=Zap/1 ;CONSOLE=Phone/phone0 IAXINFO=guest ; IAXtel username/password ;IAXINFO=myuser:mypass TRUNK=Zap/G2 ; Trunk interface ; ; Note the 'G2' in the TRUNK variable above. It specifies which group (defined ; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in ; the specified group. The four possible options are: ; ; g: select the lowest-numbered non-busy Zap channel ; (aka. ascending sequential hunt group). ; G: select the highest-numbered non-busy Zap channel ; (aka. descending sequential hunt group). ; r: use a round-robin search, starting at the next highest channel than last ; time (aka. ascending rotary hunt group). ; R: use a round-robin search, starting at the next lowest channel than last ; time (aka. descending rotary hunt group). ; TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0) ;TRUNK=IAX2/user:pass@provider ; ; Any category other than "General" and "Globals" represent ; extension contexts, which are collections of extensions. ; ; Extension names may be numbers, letters, or combinations ; thereof. If an extension name is prefixed by a '_' ; character, it is interpreted as a pattern rather than a ; literal. In patterns, some characters have special meanings: ; ; X - any digit from 0-9 ; Z - any digit from 1-9 ; N - any digit from 2-9 ; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9) ; . - wildcard, matches anything remaining (e.g. _9011. matches ; anything starting with 9011 excluding 9011 itself) ; ! - wildcard, causes the matching process to complete as soon as ; it can unambiguously determine that no other matches are possible ; ; For example the extension _NXXXXXX would match normal 7 digit dialings, ; while _1NXXNXXXXXX would represent an area code plus phone number ; preceded by a one. ; ; Each step of an extension is ordered by priority, which must ; always start with 1 to be considered a valid extension. The priority ; "next" or "n" means the previous priority plus one, regardless of whether ; the previous priority was associated with the current extension or not. ; The priority "same" or "s" means the same as the previously specified ; priority, again regardless of whether the previous entry was for the ; same extension. Priorities may be immediately followed by a plus sign ; and another integer to add that amount (most useful with 's' or 'n'). ; Priorities may then also have an alias, or label, in ; parenthesis after their name which can be used in goto situations ; ; Contexts contain several lines, one for each step of each ; extension, which can take one of two forms as listed below, ; with the first form being preferred. ; ;[context] ;exten => someexten,{priority|label{+|-}offset}[(alias)],application(arg1,arg2,...) ;exten => someexten,{priority|label{+|-}offset}[(alias)],application,arg1|arg2... ; ; Included Contexts ; ; One may include another context in the current one as well, optionally with a ; date and time. Included contexts are included in the order ; they are listed. ; The reason a context would include other contexts is for their ; extensions. ; The algorithm to find an extension is recursive, and works in this ; fashion: ; first, given a stack on which to store context references, ; push the context to find the extension onto the stack... ; a) Try to find a matching extension in the context at the top of ; the stack, and, if found, begin executing the priorities ; there in sequence. ; b) If not found, Search the switches, if any declared, in ; sequence. ; c) If still not found, for each include, push that context onto ; the top of the context stack, and recurse to a). ; d) If still not found, pop the entry from the top of the stack; ; if the stack is empty, the search has failed. If it's not, ; continue with the next context in c). ; This is a depth-first traversal, and stops with the first context ; that provides a matching extension. As usual, if more than one ; pattern in a context will match, the 'best' match will win. ; Please note that that extensions found in an included context are ; treated as if they were in the context from which the search began. ; The PBX's notion of the "current context" is not changed. ; Please note that in a context, it does not matter where an include ; directive occurs. Whether at the top, or near the bottom, the effect ; will be the same. The only thing that matters is that if there is ; more than one include directive, they will be searched for extensions ; in order, first to last. ; Also please note that pattern matches (like _9XX) are not treated ; any differently than exact matches (like 987). Also note that the ; order of extensions in a context have no affect on the outcome. ; ; Timing list for includes is ; ; <time range>|<days of week>|<days of month>|<months> ; ; Note that ranges may be specified to wrap around the ends. Also, minutes are ; fine-grained only down to the closest even minute. ; ;include => daytime|9:00-17:00|mon-fri|*|* ;include => weekend|*|sat-sun|*|* ;include => weeknights|17:02-8:58|mon-fri|*|* ; ; ignorepat can be used to instruct drivers to not cancel dialtone upon ; receipt of a particular pattern. The most commonly used example is ; of course '9' like this: ; ;ignorepat => 9 ; ; so that dialtone remains even after dialing a 9. ; ; ; Sample entries for extensions.conf ; ; [dundi-e164-canonical] ; ; List canonical entries here ; ;exten => 12564286000,1,Macro(stdexten,6000,IAX2/foo) ;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7}) [dundi-e164-customers] ; ; If you are an ITSP or Reseller, list your customers here. ; ;exten => _12564286000,1,Dial(SIP/customer1) ;exten => _12564286001,1,Dial(IAX2/customer2) [dundi-e164-via-pstn] ; ; If you are freely delivering calls to the PSTN, list them here ; ;exten => _1256428XXXX,1,Dial(Zap/G2/${EXTEN:7}) ; Expose all of 256-428 ;exten => _1256325XXXX,1,Dial(Zap/G2/${EXTEN:7}) ; Ditto for 256-325 [demo1] exten => _4XXX,1,Dial(SIP/4xxx/${EXTEN},60) exten => _4XXX,n,Hangup exten => _2XXX,1,Dial(SIP/${EXTEN},60) exten => _2XXX,n,Hangup exten => 2000,1,Answer() exten => 2000,n,Playback(demo-thanks) exten => 2000,n,Hangup exten => _1XXX,1,Dial(SIP/1xxx/${EXTEN},60) exten => _1XXX,n,Hangup exten => _9XX,1,Dial(ZAP/G1/${EXTEN},60) exten => _9XX,n,Hangup
Время первой команды журнала | 15:16:42 2009-11-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 17:23:44 2009-12- 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 21.78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.85 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.91 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008