/l3/users/mugiwara/asterisk/linux1.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 |
|
#mcedit features.conf
features.conf [----] 18 L:[ 1+ 6 7/ 99] *(145 /5301b)= . 9 0x09 ; ; Sample Call Features (parking, transfer, etc) configuration ; <------><------><------><------>; numeric, as Asterisk starts from the start pos <------><------><------><------>; and increments with one for the next parked ca context => parkedcalls<><------>; Which context parked calls are in ;parkingtime => 45<----><------>; Number of seconds a call can be parked for. <------><------><------><------>; (default is 45 seconds) [ 901-902<----><------>; What extensions to park calls oÐ¡Ð¾Ñ ÑаниÑÑ Ñайл ââââââââââââââââ ><------><------>; and increments with one for theâ 45<----><------>; Number of seconds a call can beâââââââââââââââââââââââââââââââ <------><------><------><------>; one of: parked, caller, both (default is call <------><------><------><------>; using Set(CHANNEL(musicclass)=whatever) in the |
#mcedit /etc/asterisk/extensions.conf
|
#mcedit sip.conf
sip.conf [BM--] 0 L:[ 27+19 46/ 84] *(709 /1177b)= t 116 0x74 Команда Настройка pickupgroup=1 ;type=friend ;secret=password ;host=dynamic ;canreinvite=no ;callerid="NoteBookPhone" [kiev] [kiev] secret=password ... callerid="Odessa Phone" context=gr2 pickupgroup=1 [kharkov] [kharkov] secret=password host=dynamic username=dnepr canreinvite=no type=friend |
#mcedit features.conf
|
#mcedit features.conf
; <------><------><------><------>; numeric, as Asterisk starts from the start pos <------><------><------><------>; and increments with one for the next parked ca context => parkedcalls<><------>; Which context parked calls are in ;parkingtime => 45<----><------>; Number of seconds a call can be parked for. <------><------><------><------>; (default is 45 seconds) ;parkedplay = caller<--><------>; Who to play the courtesy tone to when picking <------><------><------><------>; one of: parked, caller, both (default is call ;adsipark = yes><------><------>; if you want ADSI parking announcements ;findslot => next<-----><------>; Continue to the 'next' free parking space.. <------><------><------><------>; as long as the class is not set on the channel <------><------><------><------>; using Set(CHANNEL(musicclass)=whatever) in the 1Помощь 2Сохрани3Блок 4Замена 5Копия 6Перемес7Поиск 8Удалить9МенюMC 10Выход |
#mcedit sip.conf
|
#mcedit /etc/asterisk/extensions.conf
|
#mcedit /etc/asterisk/extensions.conf
[default] context=gr1 [local] exten => _88XXX,1,Dpickup(${EXTEN:1}) exten => _9XX,1,ParkedCall(9${EXTEN:1}) exten => 732,1,Queue(q1) > _88XXX,1,Dpickup(${EXTEN:2}) |
#lspci
00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82G965 Integrated Graphics Controller (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02) 00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02) ... 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2) 00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02) 01:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03) 02:08.0 Ethernet controller: Digium, Inc. Device 8000 (rev 11) 03:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller 04:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0) 05:01.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02) |
#dm
dmesg dmidecode |
#dmesg
[ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 2.6.26-2-686 (Debian 2.6.26-22lenny1) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Wed May 12 21:56:10 UTC 2010 [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) [ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 00000000bf790000 (usable) [ 0.000000] BIOS-e820: 00000000bf790000 - 00000000bf79e000 (ACPI data) [ 0.000000] BIOS-e820: 00000000bf79e000 - 00000000bf7e0000 (ACPI NVS) ... [ 25.981122] EXT3 FS on sda5, internal journal [ 25.981127] EXT3-fs: mounted filesystem with ordered data mode. [ 25.981122] kjournald starting. Commit interval 5 seconds [ 25.987206] EXT3 FS on sda6, internal journal [ 25.987210] EXT3-fs: mounted filesystem with ordered data mode. [ 26.762313] atl1 0000:04:00.0: eth0 link is up 100 Mbps full duplex [ 26.762313] atl1 0000:04:00.0: eth0 link is up 1000 Mbps full duplex [ 27.226630] NET: Registered protocol family 10 [ 27.226630] lo: Disabled Privacy Extensions [ 39.745122] eth0: no IPv6 routers present |
#ssh 192.168.2.1
root@192.168.2.1's password: Linux linux2.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 14:24:08 2010 from 192.168.4.1 l3-agent is already running: pid=2204; pidfile=/root/.lilalo/l3-agent.pid |
#una
unalias uname |
#uname -a
Linux linux1.unix.nt 2.6.26-2-686 #1 SMP Wed May 12 21:56:10 UTC 2010 i686 GNU/Linux |
#zts
ztscan ztspeed |
#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= |
#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= |
#ztcfg -vvvv
Notice: Configuration file is /etc/zaptel.conf line 0: Unable to open configuration file '/etc/zaptel.conf' 1 error(s) detected |
#ztcfg -vvvv
Notice: Configuration file is /etc/zaptel.conf line 0: Unable to open configuration file '/etc/zaptel.conf' 1 error(s) detected |
#ztcfg -vvv
Notice: Configuration file is /etc/zaptel.conf line 0: Unable to open configuration file '/etc/zaptel.conf' 1 error(s) detected |
#mcedit /etc/zaptel.conf
|
#ls /etc |grep zap
|
#ls /etc |grep za
|
#ls /etc |grep z
timezone |
#cd /etc/asterisk/
|
#zap
zapconf zaptel_hardware |
#zap
zapconf zaptel_hardware |
#zap
zapconf zaptel_hardware |
#sc
scp screendump script scriptreplay |
#scr
screendump script scriptreplay |
#apt-get install s
Display all 1216 possibilities? (y or n) |
#apt-get install scree
screem screenie screenlets-doc screentest screen screenlets screenruler |
#apt-get install screen
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово НОВЫЕ пакеты, которые будут установлены: screen обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 604kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 1008kB. Получено:1 http://ftp.ua.debian.org lenny/main screen 4.0.3-11+lenny1 [604kB] Получено 604kБ за 0s (608kБ/c) Выбор ранее не выбранного пакета screen. (Чтение базы данных... на данный момент установлено 39261 файлов и каталогов.) Распаковывается пакет screen (из файла .../screen_4.0.3-11+lenny1_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет screen (4.0.3-11+lenny1) ... |
#screen -x
|
#exit
exit Connection to 192.168.2.1 closed. |
#ssh 192.168.2.1
root@192.168.2.1's password: Linux linux2.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 15:54:44 2010 from 192.168.1.1 l3-agent is already running: pid=2204; pidfile=/root/.lilalo/l3-agent.pid |
#sc
scp screendump script scriptreplay |
#sc
scp screendump script scriptreplay |
#sc
scp screendump script scriptreplay |
#sc
scp screendump script scriptreplay |
#exit
exit Connection to 192.168.2.1 closed. |
#ssh 192.168.4.1
root@192.168.4.1's password: Linux linux4.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 14:23:32 2010 from 192.168.2.1 l3-agent is already running: pid=2472; pidfile=/root/.lilalo/l3-agent.pid |
#screen -x
|
#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= |
#ztcfg -vvv
Zaptel Version: 1.4.11 Echo Canceller: MG2 Configuration ====================== Channel map: 0 channels to configure. |
#mcedit zapata.conf
; national:<---> National ISDN 182+ 0 182 5737 ; 59 0x3B ; pri_net: PRI signalling, Network side ; gr303fxoks_net: GR-303 Signalling, FXO Loopstart, Network side ; gr303fxsks_cpe: GR-303 Signalling, FXS Loopstart, CPE side ; sf:<-> SF (Inband Tone) Signalling ; sf_w:> SF Wink ; sf_featd: SF Feature Group D (The fake, Adtran style, DTMF) ; sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US)) ; sf_featb: SF Feature Group B (MF (domestic, US)) ; e911: E911 (MF) style signalling ... ; sf_featd: SF Feature Group D (The fake, Adtran style, DTMF) ; sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US)) ; sf_featb: SF Feature Group B (MF (domestic, US)) ; e911: E911 (MF) style signalling ; ; The following are used for Radio interfaces: ; fxs_rx: Receive audio/COR on an FXS kewlstart interface (FXO at the ; channel bank) ; fxs_tx: Transmit audio/PTT on an FXS loopstart interface (FXO at the ; channel bank) |
#lspci
00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82G965 Integrated Graphics Controller (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02) 00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02) ... 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2) 00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02) 01:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03) 02:08.0 Ethernet controller: Digium, Inc. Device 8000 (rev 11) 03:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller 04:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0) 05:01.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02) |
#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 ========================================================================= == 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 |
#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= |
#man zaptel.conf
|
#man z
|
#man zap
|
#man zapconf
|
#ztcfg -vvv
Notice: Configuration file is /etc/zaptel.conf line 3: Unknown keyword 'bcchan' 1 error(s) detected |
#ztcfg -vvv
Notice: Configuration file is /etc/zaptel.conf line 3: Unknown keyword 'bcchan' 1 error(s) detected |
#mcedit /etc/zaptel.conf
|
#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) ... Changing signalling on channel 22 from Unused to Clear channel Changing signalling on channel 23 from Unused to Clear channel Changing signalling on channel 24 from Unused to Clear channel Changing signalling on channel 25 from Unused to Clear channel Changing signalling on channel 26 from Unused to Clear channel Changing signalling on channel 27 from Unused to Clear channel Changing signalling on channel 28 from Unused to Clear channel Changing signalling on channel 29 from Unused to Clear channel Changing signalling on channel 30 from Unused to Clear channel Changing signalling on channel 31 from Unused to Clear channel |
#mcedit /etc/zaptel.conf
|
#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. |
#mcedit /etc/asterisk/zapata.conf
;<-----><------>but not aM--] 12igura56+ 0 56ons are.1377/24195 32 0x20 ; 5ess:> Lucent 5ESS ; euroisdn: EuroISDN ; ni1: Old National ISDN 1 ; qsig: Q.SIG ; pridialaping=national ; ; Some switches (AT&T especially) require network specific facility IE ; supported values are currently 'none', 'sdn', 'megacom', 'tollfreemegacom', 'a ... ; the transfer to the ISDN switch, since it sent in a FACILITY ; message. ; transfer=yes ; ; Allow call parking ; ('canpark=no' is overridden by 'transfer=yes') ; canpark=yes ; sf_txrx: Receive audio/COR AND Transmit audio/PTT on an SF interface |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#ls /var/l
lib/ local/ lock/ log/ lost+found/ |
#ls /var/lo
local/ lock/ log/ lost+found/ |
#ls /var/log/messages
/var/log/messages |
#le /var/log/messages
less lessecho lessfile lesskey lesspipe let lexgrog |
#less /var/log/messages
|
#less /var/log/messages | grep asterisk.
|
#less /var/log/messages | grep asterisk
|
#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 linux1*CLI> quit Executing last minute cleanups |
#mcedit /etc/asterisk/ext
extconfig.conf extensions.conf extensions.ael extensions.conf.save |
#mcedit /etc/asterisk/extensions.conf
|
#mcedit /etc/asterisk/sip.conf
callerid="SoftPhone" 0 1 3 4 70 ; 59 0x3B ] [general] context=default register => dnepr:password@192.168.2.1/kiev ;register => dnepr:password@192.168.3.1/odessa register => dnepr:password@192.168.4.1/kharkov register => dnepr:password@192.168.5.1/crimea ;register => dnepr:password@192.168.6.1/lvov ] ... callerid="Dnepr Phone" pickupgroup=10 [702] context=gr2 type=friend secret=password ] ┌────────────────── Выход ──────────────────┐ │ │ └───────────────────────────────────────────┘ |
#mcedit /etc/asterisk/sip.conf
;callerid="NoteBookPhone" 1 45 49 757 s 115 0x73 [702] [odessa] type=friend type=friend secret=password secret=password hlimitonpeers=yes hcall-limit=1 1Помощь 2Сохрани3Блок 4Замена 5Копия 6Перемес7Поиск 8Удалить9МенюMC 10Выход username=dnepr canreinvite=no canreinvite=no callerid="Kiev Phone" pickupgroup=2 [odessa] |
#mcedit /etc/asterisk/extensions.conf
14 5 0 5 170 X 88 0x58 exten => _XXXXXX,n,Hangup exten => _XXXXXX,n(welcome),Playback(/var/tmp/welcome-master) exten => _XXXXXX,n,System(date >> /tmp/master-was-here) exten => _XXXXXX,n,Hangup exten => s,1,Background(/var/tmp/greetengs) exten => s,n(main),Background(/var/tmp/menu) exten => 1,1,Goto(submenu,s,1) exten => 9,1,Goto(s,main) exten => 0,1,Playback(/var/tmp/goodbue) ... _801,n,Record(/var/tmp/welcome:gsm,3) exten => _800,1,Answer _800,n,Wait(1) exten => _800,n,Playback(/tmp/music) 03,1,VoicemailMain() exten => 827,1,Record(/var/tmp/menu:gsm) exten => 828,1,Record(/var/tmp/greetengs:gsm) [corp] exten => 829,1,Record(/var/tmp/goodbuy:gsm) ;exten => _5XX,1,Dial(Sip/crimea/${EXTEN}) |
#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 [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. -- Remote UNIX connection disconnected -- Extension '1' in context 'default' from '567' does not exist. Rejecting call on channel 0/10, span 1 -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes Disconnected from Asterisk server Executing last minute cleanups |
#mcedit /etc/asterisk/sip.conf
[crimea] 9 0 9 256 . 10 0x0A [701] context=gr2 type=friend secret=password host=dynamic canreinvite=no callerid="Dnepr Phone" pickupgroup=10 ] ... context=gr2 secret=passc canreinvitenepr Phone" pickupgroup context=gr2 type=friend secret=password host=dynamic canreinvite=no callerid="SoftPhone" |
#na
named named-checkzone namei nano named-checkconf named-compilezone nameif nawk |
#nano /etc/asterisk/sip.conf
|
#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 |
#vim extensions.conf
|
#vim extensions.conf
--- /tmp/l3-saved-4181.24221.23022 2010-05-28 17:08:15.000000000 +0300 +++ extensions.conf 2010-05-28 17:10:37.000000000 +0300 @@ -1,86 +1,17 @@ -[command] -exten => s,1,Playback(/var/tmp/password) -exten => s,n,WaitExten(10) -exten => _XXXXXX,1,GotoIf($[${EXTEN}=${DB(password/master)}]?welcome:goaway) -exten => _XXXXXX,n(goaway),PlayBack(/var/tmp/goaway-stranger) -exten => _XXXXXX,n,Hangup -exten => _XXXXXX,n(welcome),Playback(/var/tmp/welcome-master) -exten => _XXXXXX,n,System(date >> /tmp/master-was-here) -exten => _XXXXXX,n,Hangup - - -[menu] -exten => s,1,Background(/var/tmp/greetengs) -exten => s,n(main),Background(/var/tmp/menu) -exten => 1,1,Goto(submenu,s,1) -exten => 9,1,Goto(s,main) -exten => 0,1,Playback(/var/tmp/goodbue) -exten => 0,n,Hangup -exten => s,n,WaitExten(5) -exten => i,1,Background(/var/tmp/wrong) -exten => i,n,Goto(start) -exten => t,1,Background(/var/tmp/vybor) -exten => t,n,WaitExten(5) -exten => t,n,Playback(/var/tmp/do-svidaniya-timeout) -exten => t,n,Hangup - - - -[submenu] -exten => s(start),1,Background(/var/tmp/submenu) -exten => s,n,WaitExten(5) -exten => 1,1,Dial(SIP/dnepr/701) -exten => 2,1,Dial(SIP/kiev/201) -exten => 3,1,Dial(SIP/odessa/301) -exten => 4,1,Dial(SIP/kharkov/401) -exten => 5,1,Dial(SIP/crimea/501) -exten => 0,1,Goto(start,1) -exten => i,1,Background(/var/tmp/wrong) -exten => i,n,Goto(start,1) -exten => t,1,Background(/var/tmp/vybor) -exten => t,n,WaitExten(2) -exten => t,n,Background(/var/tmp/do-svidaniya-timeout) -exten => t,n,Hangup - - -;[macro-m1] -;exten => s,1,Set(CALLERID(number)=7${ARG1}) -;exten => s,n,GotoIf($[${ARG1}=3301]?end) -;exten => s,n,Dial(SIP/${ARG2}/${MACRO_EXTEN:1}) -;exten => s,n,(end),Hangup - -[macro-incoming] -;exten => s,1,GotoIf($[${CALLERID(number)}=3301]?end) -;exten => s,1,GotoIf($[${BLACKLIST()}=1]?end) -exten => s,1,Set(CALLFILENAME=from-${CALLERID(number)}-to-${MACRO_EXTEN}-${STRFTIME(${EPOCH},EUROPE/kiev,"%Y-%m-%d-%H:%M:%S")}) -exten => s,n,Monitor(wav,${CALLFILENAME},m) -exten => s,n,Dial(SIP/${MACRO_EXTEN},10) -;exten => s,n,GotoIf($[${ISNULL(${DB(mobile/${MACRO_EXTEN})})}]?end) -;exten => s,n,Dial(SIP/odessa/${DB(mobile/${MACRO_EXTEN})}) -;exten => s,n,GotoIf($[${DIALSTATUS}cro-test]=BUSY]?busy) -;exten => s,n(busy),Playback(/var/tmp/busy) -exten => s,n,VoiceMail(${MACRO_EXTEN}@default) -exten => s,n(busy),Playback(/var/tmp/busy) -exten => s,n(end),Hangup - - [default] -context=gr1 - - [local] +exten => _34XXX,1,Dial(ZAP/G1/${EXTEN:2}) + exten => _88XXX,1,Dpickup(${EXTEN:2}) exten => _9XX,1,ParkedCall(9${EXTEN:1}) exten => 732,1,Queue(q1) - exten => 811,1,Goto(command,s,1) exten => 730,1,Goto(menu,s,1) - exten => 820,1,Record(/var/tmp/submenu:gsm) exten => 821,1,Record(/var/tmp/wrong:gsm) exten => 822,1,Record(/var/tmp/vybor:gsm) @@ -112,7 +43,6 @@ [corp] - exten => _2XXX,1,Set(CALLERID(number)=5${CALLERID(number)}) exten => _2XXX,n,Dial(Sip/kiev/${EXTEN:1}) exten => _4XXX,1,Set(CALLERID(number)=5${CALLERID(number)}) @@ -126,7 +56,6 @@ ;exten => -2323,n,Dial(Sip/sipnet/${EXTEN}) exten => 731,1,Dial(Sip/701&Sip/702) - ;exten => _4XX,1,Dial(Sip/kharkov/${EXTEN}) ;exten => _2XX,1,Dial(Sip/kiev/${EXTEN}) ;exten => _3XX,1,Dial(Sip/odessa/${EXTEN}) @@ -146,3 +75,69 @@ include => local include => corp include => world + +[command] +exten => s,1,Playback(/var/tmp/password) +exten => s,n,WaitExten(10) +exten => _XXXXXX,1,GotoIf($[${EXTEN}=${DB(password/master)}]?welcome:goaway) +exten => _XXXXXX,n(goaway),PlayBack(/var/tmp/goaway-stranger) +exten => _XXXXXX,n,Hangup +exten => _XXXXXX,n(welcome),Playback(/var/tmp/welcome-master) +exten => _XXXXXX,n,System(date >> /tmp/master-was-here) +exten => _XXXXXX,n,Hangup + + +[menu] +exten => s,1,Background(/var/tmp/greetengs) +exten => s,n(main),Background(/var/tmp/menu) +exten => 1,1,Goto(submenu,s,1) +exten => 9,1,Goto(s,main) +exten => 0,1,Playback(/var/tmp/goodbue) +exten => 0,n,Hangup +exten => s,n,WaitExten(5) +exten => i,1,Background(/var/tmp/wrong) +exten => i,n,Goto(start) +exten => t,1,Background(/var/tmp/vybor) +exten => t,n,WaitExten(5) +exten => t,n,Playback(/var/tmp/do-svidaniya-timeout) +exten => t,n,Hangup + + + +[submenu] +exten => s(start),1,Background(/var/tmp/submenu) +exten => s,n,WaitExten(5) +exten => 1,1,Dial(SIP/dnepr/701) +exten => 2,1,Dial(SIP/kiev/201) +exten => 3,1,Dial(SIP/odessa/301) +exten => 4,1,Dial(SIP/kharkov/401) +exten => 5,1,Dial(SIP/crimea/501) +exten => 0,1,Goto(start,1) +exten => i,1,Background(/var/tmp/wrong) +exten => i,n,Goto(start,1) +exten => t,1,Background(/var/tmp/vybor) +exten => t,n,WaitExten(2) +exten => t,n,Background(/var/tmp/do-svidaniya-timeout) +exten => t,n,Hangup + + +;[macro-m1] +;exten => s,1,Set(CALLERID(number)=7${ARG1}) +;exten => s,n,GotoIf($[${ARG1}=3301]?end) +;exten => s,n,Dial(SIP/${ARG2}/${MACRO_EXTEN:1}) +;exten => s,n,(end),Hangup + +[macro-incoming] +;exten => s,1,GotoIf($[${CALLERID(number)}=3301]?end) +;exten => s,1,GotoIf($[${BLACKLIST()}=1]?end) +exten => s,1,Set(CALLFILENAME=from-${CALLERID(number)}-to-${MACRO_EXTEN}-${STRFTIME(${EPOCH},EUROPE/kiev,"%Y-%m-%d-%H:%M:%S")}) +exten => s,n,Monitor(wav,${CALLFILENAME},m) +exten => s,n,Dial(SIP/${MACRO_EXTEN},10) +;exten => s,n,GotoIf($[${ISNULL(${DB(mobile/${MACRO_EXTEN})})}]?end) +;exten => s,n,Dial(SIP/odessa/${DB(mobile/${MACRO_EXTEN})}) +;exten => s,n,GotoIf($[${DIALSTATUS}cro-test]=BUSY]?busy) +;exten => s,n(busy),Playback(/var/tmp/busy) +exten => s,n,VoiceMail(${MACRO_EXTEN}@default) +exten => s,n(busy),Playback(/var/tmp/busy) +exten => s,n(end),Hangup + |
#mcedit /etc/asterisk/extensions.conf
[macro-incoming] ;exten => s,1,GotoIf($[${BLACKLIST()}=1]?end) exten => s,n,Monitor(wav,${CALLFILENAME},m) ;exten => s,n,GotoIf($[${ISNULL(${DB(mobile/${MACRO_EXTEN})})}]?end) ;exten => s,n,GotoIf($[${DIALSTATUS}cro-test]=BUSY]?busy) exten => s,n,VoiceMail(${MACRO_EXTEN}@default) |
#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 |
#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 |
#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 |
#vim extensions.conf
|
#se
sed sensible-browser setleds see sensible-editor setlogcons select sensible-mda setmetamode select-default-ispell sensible-pager setpci select-default-iwrap seq setsid select-default-wordlist set setterm sendmail setarch setupcon sendmailconfig sethdlc-new setvesablank sendmail-msp setkeycodes sendmail-mta set-language-env |
Время первой команды журнала | 11:13:47 2010- 5-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:16:26 2010- 5-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 14.85 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.96 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.82 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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