/l3/users/roman-sidorenko/asterisk/debian4/root :1 :2 :3 :4 :5 :6 :7 |
|
#ztcfg -vvv
Zaptel Version: 1.4.11 Echo Canceller: MG2 Configuration ====================== Channel map: Channel 01: FXO Kewlstart (Default) (Slaves: 01) Channel 02: FXO Kewlstart (Default) (Slaves: 02) Channel 03: FXO Kewlstart (Default) (Slaves: 03) Channel 04: FXO Kewlstart (Default) (Slaves: 04) 4 channels to configure. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim extensions.conf
--- /tmp/l3-saved-2969.20857.2282 2009-12-08 05:19:10.000000000 -1000 +++ extensions.conf 2009-12-08 05:24:45.000000000 -1000 @@ -10,6 +10,9 @@ ;exten => 202,n,Playback(demo-congrats) exten => 202,n,Hangup +exten => 221,1,Answer +exten => 221,n,Dial(ZAP/G1) + exten => _2XX,1,Set(CALLERID(number)=5${CALLERID(number)}) exten => _2XX,n,Dial(SIP/${EXTEN}) |
#asterisk -rvvvv
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 ========================================================================= ... [Dec 8 05:28:35] WARNING[4423]: chan_zap.c:957 zt_open: Unable to specify channel 1: Device or resource busy [Dec 8 05:28:35] ERROR[4423]: chan_zap.c:7414 mkintf: Unable to open channel 1: Device or resource busy here = 0, tmp->channel = 1, channel = 1 [Dec 8 05:28:35] ERROR[4423]: chan_zap.c:11900 build_channels: Unable to register channel '1' [Dec 8 05:28:35] WARNING[4423]: chan_zap.c:11188 zap_restart: Reload channels from zap config failed! -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes Disconnected from Asterisk server Executing last minute cleanups |
#minicom
rule 4 /^\(133155[1,2]1[1,2]..\)/ /\1/ rule 5 /^1[2-9]..[2-9]....../ /111/ ! voice translation-rule 222 rule 1 /^911/ /222/ rule 2 /^011.*/ /222/ rule 3 /^\([2-9]..\)[2-9]....../ /222/ rule 4 /^\(15[2,3][1,2][2-9]......\)/ /\1/ rule 5 /^1[2-9]..[2-9]....../ /222/ ! ... *Dec 9 08:02:06.396: %ISDN-6-LAYER2UP: Layer 2 for Interface Se0/1/0:15, TEI 0 changed to up --More-- *Dec 9 08:02:08.388: %LINK-3-UPDOWN: Interface Serial0/1/0:15, changed state to up --More-- *Dec 9 08:04:44.296: %ISDN-6-CONNECT: Interface Serial0/1/0:1 is now connected to 101 N/A --More-- *Dec 9 08:04:50.292: %ISDN-6-CONNECT: Interface Serial0/1/0:1 is now connected to 101 N/A --More-- *Dec 9 08:04:59.680: %ISDN-6-DISCONNECT: Interface Serial0/1/0:1 disconnected from 101 , call lasted 15 seconds CTRL-A Z for help | 9600 8N1 | NOR | Minicom 2.3 | VT102 | Offline |
#strings /usr/lib/asterisk/modules/chan_sip.so | fgrep .conf
|
#vim ../zaptel.conf
|
#asterisk -rv
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 ========================================================================= ... [Dec 8 05:31:25] WARNING[4182]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 8 05:31:30] WARNING[4182]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 8 05:31:35] WARNING[4182]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 8 05:31:40] WARNING[4182]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 8 05:31:45] WARNING[4182]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 8 05:31:50] WARNING[4182]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 8 05:31:55] WARNING[4182]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 8 05:32:00] WARNING[4182]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! debian3*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim extensions.conf
--- /tmp/l3-saved-2969.7963.24323 2009-12-08 05:29:11.000000000 -1000 +++ extensions.conf 2009-12-08 05:29:25.000000000 -1000 @@ -11,7 +11,7 @@ exten => 202,n,Hangup exten => 221,1,Answer -exten => 221,n,Dial(ZAP/G1) +exten => 221,n,Dial(ZAP/G1/${EXTEN}) exten => _2XX,1,Set(CALLERID(number)=5${CALLERID(number)}) exten => _2XX,n,Dial(SIP/${EXTEN}) |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Executing [221@default:2] Dial("SIP/201-0a1cab60", "ZAP/G1/221") in new stack [Dec 8 05:29:35] WARNING[4609]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'ZAP' (cause 34 - Circuit/channel congestion) == Everyone is busy/congested at this time (1:0/1/0) == Auto fallthrough, channel 'SIP/201-0a1cab60' status is 'CONGESTION' -- Saved useragent "Asterisk PBX" for peer poltava -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes Disconnected from Asterisk server Executing last minute cleanups |
#ztcfg -vvv
Zaptel Version: 1.4.11 Echo Canceller: MG2 Configuration ====================== Channel map: Channel 01: FXO Kewlstart (Default) (Slaves: 01) Channel 02: FXO Kewlstart (Default) (Slaves: 02) Channel 03: FXO Kewlstart (Default) (Slaves: 03) Channel 04: FXO Kewlstart (Default) (Slaves: 04) 4 channels to configure. |
#ztscan
[1] active=yes alarms=OK description=Wildcard TDM410P Board 1 name=WCTDM/0 manufacturer=Digium devicetype=Wildcard TDM410P location=PCI Bus 03 Slot 01 basechan=1 totchans=4 irq=20 type=analog port=1,FXS port=2,none port=3,none port=4,none |
#vim zapata.conf
--- /tmp/l3-saved-2969.21829.24324 2009-12-08 05:30:48.000000000 -1000 +++ zapata.conf 2009-12-08 05:31:47.000000000 -1000 @@ -678,6 +678,6 @@ ;dring2context=internal2 ; If no pattern is matched here is where we go. context=default -channel => 1 group=1 +channel => 1 |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#ssh 192.168.101.3
root@192.168.101.3's password: Linux debian3 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 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: Tue Dec 8 05:18:03 2009 from 192.168.7.101 l3-agent is already running: pid=2605; pidfile=/root/.lilalo/l3-agent.pid |
#;callerid="Cortelco 2500" <(256) 428-6126>
[trunkgroups] [channels] context=default rxwink=300 ; Atlas seems to use long (250ms) winks ; where the ring cadence is changed *after* the callerid spill. usecallerid=yes hidecallerid=no callwaiting=yes usecallingpres=yes callwaitingcallerid=yes ... channel => 1-2 ; and programs. Defaults to 1000. ; channel. Two implementations are currently available - "fixed" ; (with size always equals to jbmax-size) and "adaptive" (with ; variable size, actually the new jb of IAX2). Defaults to fixed. switchtype = euroisdn signalling = pri_pce context=default group=1 channel => 1-2 |
#less /mnt/etc/asterisk/zapata.conf
|
#less /mnt/etc/zaptel.conf
|
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel. |
#asterisk -rv
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 ========================================================================= ... 1 > [ 02 01 7f ] 1 > Unnumbered frame: 1 > SAPI: 00 C/R: 1 EA: 0 > TEI: 000 EA: 1 1 > M3: 3 P/F: 1 M2: 3 11: 3 [ SABME (set asynchronous balanced mode extended) ] > 0 bytes of data quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#less /var/log/asterisk/messages
|
#vi /etc/asterisk/zapata.conf
|
#less /etc/zaptel.conf
|
#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 |
#cat /etc/asterisk/sip.conf
[general] context=default register => poltava:1234@192.168.102.1/kiev ; register => nt:1234@xgu.ru/vpoltava [101] username=phone type=friend host=dynamic secret=123 callerid="gib-snom" ... host=dynamic secret=1234 ; call-limit=1 ; limitonpeers=yes [vpoltava] username=nt nat=yes type=friend host=xgu.ru secret=1234 |
#exit
Connection to 192.168.101.3 closed. |
#cat sip.conf
[general] context=default register => kiev:1234@192.168.101.3/poltava register => nt:1234@xgu.ru/vkiev [201] type=friend host=dynamic secret=1234 callerid="Roman Sidorenko-MegaPhone" [203] ... secret=1234 ;call-limit=1 ;limitonpeers=yes usecallerid=no [vkiev] type=friend host=xgu.ru ;secret=1234 username=nt nat=yes |
#cat extensions.conf
[default] exten => s,1,Answer exten => s,n,Wait(1) exten => s,n,Background(alba) exten => 202,1,Answer exten => 202,n,Wait(1) exten => 202,n,Playback(alba) ;exten => 202,n,Playback(demo-congrats) exten => 202,n,Hangup exten => 221,1,Answer ... ;exten => _1XX,1,Dial(IAX2/poltava/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo exten => 999,n,Hangup exten => 291,1,Dial(SIP/201,10) exten => 291,n,Dial(SIP/vkiev/380674074085,10) exten => 291,n,Hangup ;exten => 291,n,Wait(1) ;exten => 291,n,Playback(alba) ;exten => 291,n,Playback(demo-congrats) |
#cat sip.conf
[general] context=default register => kiev:1234@192.168.101.3/poltava register => nt:1234@xgu.ru/vkiev [201] type=friend host=dynamic secret=1234 callerid="Roman Sidorenko-MegaPhone" [203] ... secret=1234 ;call-limit=1 ;limitonpeers=yes usecallerid=no [vkiev] type=friend host=xgu.ru ;secret=1234 username=nt nat=yes |
#vim sip.conf
--- /tmp/l3-saved-2909.7287.2878 2009-12-08 23:26:04.000000000 -1000 +++ sip.conf 2009-12-08 23:26:46.000000000 -1000 @@ -2,6 +2,7 @@ context=default register => kiev:1234@192.168.101.3/poltava +register => fromDeb4:123@192.168.102.2/fromDeb4 register => nt:1234@xgu.ru/vkiev [201] |
#asterisk -rvvvvv
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 ========================================================================= ... 203/203 (Unspecified) D 0 Unmonitored 201/201 192.168.102.102 D 2048 Unmonitored 6 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 3 offline] debian4*CLI> sip show registry Host Username Refresh State Reg.Time xgu.ru:5060 nt 105 Registered Tue, 08 Dec 2009 23:28:15 192.168.102.2:5060 fromDeb4 105 Registered Tue, 08 Dec 2009 23:28:15 192.168.101.3:5060 kiev 105 Registered Tue, 08 Dec 2009 23:28:15 debian4*CLI> quit Executing last minute cleanups |
#cat extensions.conf
[default] exten => s,1,Answer exten => s,n,Wait(1) exten => s,n,Background(alba) exten => 202,1,Answer exten => 202,n,Wait(1) exten => 202,n,Playback(alba) ;exten => 202,n,Playback(demo-congrats) exten => 202,n,Hangup exten => 221,1,Answer ... ;exten => _1XX,1,Dial(IAX2/poltava/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo exten => 999,n,Hangup exten => 291,1,Dial(SIP/201,10) exten => 291,n,Dial(SIP/vkiev/380674074085,10) exten => 291,n,Hangup ;exten => 291,n,Wait(1) ;exten => 291,n,Playback(alba) ;exten => 291,n,Playback(demo-congrats) |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Executing [202@default:1] Answer("SIP/kiev-08afecd0", "") in new stack -- Executing [202@default:2] Wait("SIP/kiev-08afecd0", "1") in new stack -- Executing [202@default:3] Playback("SIP/kiev-08afecd0", "alba") in new stack -- <SIP/kiev-08afecd0> Playing 'alba' (language 'en') == Spawn extension (default, 202, 3) exited non-zero on 'SIP/kiev-08afecd0' == Spawn extension (default, 202, 3) exited non-zero on 'SIP/201-08ae6448' == Spawn extension (default, 102, 1) exited non-zero on 'SIP/192.168.102.2-08ad9b28' [Dec 8 23:38:16] NOTICE[4710]: chan_sip.c:14262 handle_request_invite: Unable to create/find SIP channel for this INVITE [Dec 8 23:38:36] WARNING[4710]: chan_sip.c:1950 retrans_pkt: Maximum retries exceeded on transmission 00ff6e265199dbfd4a7808ac2a2ae414@192.168.102.2 for seqno 104 (Critical Response) debian4*CLI> |
#vim extensions.conf
--- /tmp/l3-saved-5621.1696.9306 2009-12-09 00:50:08.000000000 -1000 +++ extensions.conf 2009-12-09 00:50:30.000000000 -1000 @@ -23,6 +23,8 @@ exten => _1XX,1,Dial(SIP/poltava/${EXTEN}) ;exten => _1XX,1,Dial(IAX2/poltava/${EXTEN}) +exten => _3XX,1,Dial(SIP/poltava/${EXTEN}) + exten => 999,1,Answer exten => 999,n,Echo exten => 999,n,Hangup |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Starting simple switch on 'Zap/1-1' -- Executing [301@default:1] Dial("Zap/1-1", "SIP/poltava/301") in new stack -- Called poltava/301 -- SIP/poltava-08af9068 is making progress passing it to Zap/1-1 -- SIP/poltava-08af9068 is ringing -- SIP/poltava-08af9068 answered Zap/1-1 == Spawn extension (default, 301, 1) exited non-zero on 'Zap/1-1' -- Hungup 'Zap/1-1' quit Executing last minute cleanups |
#vim extensions.conf
--- /tmp/l3-saved-5621.6072.21512 2009-12-09 00:51:47.000000000 -1000 +++ extensions.conf 2009-12-09 00:52:23.000000000 -1000 @@ -23,7 +23,8 @@ exten => _1XX,1,Dial(SIP/poltava/${EXTEN}) ;exten => _1XX,1,Dial(IAX2/poltava/${EXTEN}) -exten => _3XX,1,Dial(SIP/poltava/${EXTEN}) +exten => _3XX,1,Set(CALLERID(number)=${CALLERID(number)}) +exten => _3XX,n,Dial(SIP/poltava/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo |
#asterisk -rvvvv
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/asterisk.conf': Found == Parsing '/etc/asterisk/extconfig.conf': Found Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian4 (pid = 4684) Verbosity is at least 5 debian4*CLI> quit Executing last minute cleanups |
#vim extensions.conf
--- /tmp/l3-saved-5621.6564.9135 2009-12-09 00:52:31.000000000 -1000 +++ extensions.conf 2009-12-09 00:52:58.000000000 -1000 @@ -23,8 +23,8 @@ exten => _1XX,1,Dial(SIP/poltava/${EXTEN}) ;exten => _1XX,1,Dial(IAX2/poltava/${EXTEN}) -exten => _3XX,1,Set(CALLERID(number)=${CALLERID(number)}) -exten => _3XX,n,Dial(SIP/poltava/${EXTEN}) +;exten => _3XX,1,Set(CALLERID(number)=${CALLERID(number)}) +exten => _3XX,1,Dial(SIP/poltava/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo |
#vim zapata.conf
--- /tmp/l3-saved-5621.31232.748 2009-12-09 00:53:04.000000000 -1000 +++ zapata.conf 2009-12-09 00:58:30.000000000 -1000 @@ -679,5 +679,6 @@ ; If no pattern is matched here is where we go. context=default group=1 -channel => 1 +channel => 1 +callerid="Igor ChubIN<204> |
#vim extensions.conf
--- /tmp/l3-saved-5621.28943.568 2009-12-09 00:58:38.000000000 -1000 +++ extensions.conf 2009-12-09 01:01:06.000000000 -1000 @@ -11,7 +11,9 @@ exten => 202,n,Hangup exten => 221,1,Answer +exten => 221,1,Wait(2) exten => 221,n,Dial(ZAP/G1) +exten => 221,1,Hangup exten => _2XX,1,Set(CALLERID(number)=5${CALLERID(number)}) exten => _2XX,n,Dial(SIP/${EXTEN}) |
#vim zapata.conf
--- /tmp/l3-saved-5621.8356.4412 2009-12-09 01:01:09.000000000 -1000 +++ zapata.conf 2009-12-09 01:01:23.000000000 -1000 @@ -679,6 +679,6 @@ ; If no pattern is matched here is where we go. context=default group=1 +callerid="Igor ChubIN<221> channel => 1 -callerid="Igor ChubIN<204> |
#asterisk -rvvvv
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 ========================================================================= ... Destroying channels and reloading zaptel configuration. == Parsing '/etc/asterisk/zapata.conf': Found -- Registered channel 1, FXO Kewlstart signalling -- Automatically generated pseudo channel == Parsing '/etc/asterisk/users.conf': Found -- Starting simple switch on 'Zap/1-1' -- Hungup 'Zap/1-1' [Dec 9 01:02:36] WARNING[4703]: chan_zap.c:1684 zt_set_hook: zt hook failed: Device or resource busy debian4*CLI> quit Executing last minute cleanups |
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel. |
#asterisk -rvvvv
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 ========================================================================= ... -- Hungup 'Zap/1-1' debian4*CLI> debian4*CLI> debian4*CLI> debian4*CLI> 3quit debian4*CLI> debian4*CLI> debian4*CLI> debian4*CLI> quit Executing last minute cleanups |
#quit
bash: quit: command not found |
#dfl',sd;lb;sdl
> > > > > > > q > > > > > > > > > > sd;fmbv'sdkl;fmb bash: dfl,sd;lb;sdl q sd;fmbvsdkl: command not found bash: fmb: command not found |
#sd
bash: sd: command not found |
#bsdfk;bmasd
bash: bsdfk: command not found bash: bmasd: command not found |
#fb;sdb
bash: fb: command not found bash: sdb: command not found |
#cat iax
iax.conf iax.conf.SAVED iaxprov.conf |
#cat iax.conf
[general] context=default register => kiev:1234@192.168.101.3 [poltava] type=friend host=dynamic ; 192.168.101.3 secret=1234 ;call-limit=1 ;limitonpeers=yes deny=0.0.0.0/0.0.0.0 permit=192.168.101.3/255.255.255.255 trunk=yes |
#vim iax.conf
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim extensions.conf
|
#{EXTEN})
exten => s,1,Answer exten => s,n,Wait(1) exten => s,n,Background(alba) exten => 202,1,Answer ;exten => _1XX,1,Dial(IAX2/poltava/${EXTEN}) exten => 202,n,Wait(1) exten => 202,n,Playback(alba) ;exten => _3XX,1,Set(CALLERID(number)=${CALLERID(number)}) ;exten => 202,n,Playback(demo-congrats) exten => _3XX,1,Dial(SIP/poltava/${EXTEN}) ... exten => 4000,1,Dial(SIP/vkiev/${EXTEN}) [internal] exten => 221,1,Hangup [inbound] include => internal exten => 221,1 [white] include => internal include => internal "extensions.conf" 54L, 1035C written |
#vim sip.conf
--- /tmp/l3-saved-5621.6296.26783 2009-12-09 03:47:10.000000000 -1000 +++ sip.conf 2009-12-09 03:47:42.000000000 -1000 @@ -10,6 +10,7 @@ host=dynamic secret=1234 callerid="Roman Sidorenko-MegaPhone" +context=black [203] type=friend |
#vim zapata.conf
--- /tmp/l3-saved-5621.29294.27594 2009-12-09 03:47:48.000000000 -1000 +++ zapata.conf 2009-12-09 03:48:03.000000000 -1000 @@ -680,5 +680,5 @@ context=default group=1 callerid="Igor ChubIN<221> - +context=white channel => 1 |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim zapata.conf
|
#; CallerID can be set to "asreceived" or a specific number if you want to
|
#vim extensions.conf
|
#:q
;mohinterpret=default ; ; when this channel places the peer on hold. It may be specified globally or on ; This option specifies which music on hold class to suggest to the peer channel ; want to create a single "group" for all channels of the PRI. ; ; switchtype = national ; signalling = pri_cpe ; group = 2 ; and they will be printed on the console when an inbound call comes in. ; ;dring1=95,0,0 ;dring1context=internal1 ;dring2context=internal2X patterns is to set any one of the dringXcontext fields ~ "zapata.conf" 683L, 24225C written context=default group=1 callerid="Igor ChubIN<221> context=white channel => 1 |
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvvv
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 ========================================================================= ... == Everyone is busy/congested at this time (1:0/0/1) == Auto fallthrough, channel 'SIP/201-094828b0' status is 'CHANUNAVAIL' -- Executing [202@black:1] Set("SIP/201-09477548", "CALLERID(number)=5201") in new stack -- Executing [202@black:2] Dial("SIP/201-09477548", "SIP/202") in new stack [Dec 9 03:53:11] WARNING[6703]: chan_sip.c:2921 create_addr: No such host: 202 [Dec 9 03:53:11] WARNING[6703]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) == Everyone is busy/congested at this time (1:0/0/1) == Auto fallthrough, channel 'SIP/201-09477548' status is 'CHANUNAVAIL' quit Executing last minute cleanups |
#vim sip.conf
--- /tmp/l3-saved-5621.1338.32042 2009-12-09 03:53:37.000000000 -1000 +++ sip.conf 2009-12-09 03:54:11.000000000 -1000 @@ -1,5 +1,5 @@ [general] -context=default +context=internal register => kiev:1234@192.168.101.3/poltava register => fromDeb4:123@192.168.102.2/fromDeb4 |
#asterisk -rvvvv
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/users.conf': Found == Parsing '/etc/asterisk/sip_notify.conf': Found -- Executing [202@black:1] Set("SIP/201-09485890", "CALLERID(number)=5201") in new stack -- Executing [202@black:2] Dial("SIP/201-09485890", "SIP/202") in new stack [Dec 9 03:54:24] WARNING[6730]: chan_sip.c:2921 create_addr: No such host: 202 [Dec 9 03:54:24] WARNING[6730]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) == Everyone is busy/congested at this time (1:0/0/1) == Auto fallthrough, channel 'SIP/201-09485890' status is 'CHANUNAVAIL' quit Executing last minute cleanups |
#vim extensions..co
|
#~
exten => _3XX,1,Dial(SIP/poltava/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo exten => 999,n,Hangup exten => 291,1,Dial(SIP/201,10) exten => 291,n,Dial(SIP/vkiev/380674074085,10) exten => 291,n,Hangup ;exten => 291,n,Wait(1) exten => _380XXXXXXXXX,1,Dial(SIP/vkiev/${EXTEN}) [inbound] exten => 202,1,Answer exten => 202,n,Wait(1) exten => 202,n,Playback(alba) ;exten => 202,n,Playback(demo-congrats) include => internal exten => 202,n,Hangup [white] include => internal include => outbound "extensions.conf" 55L, 1036C written |
#asterisk -rvvvv
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 ========================================================================= ... == Spawn extension (internal, 202, 3) exited non-zero on 'SIP/kiev-09481f38' == Spawn extension (black, 202, 3) exited non-zero on 'SIP/201-09477548' [Dec 9 03:56:55] NOTICE[6658]: chan_sip.c:14035 handle_request_invite: Call from '201' to extension '4000' rejected because extension not found. -- Starting simple switch on 'Zap/1-1' -- Hungup 'Zap/1-1' -- Starting simple switch on 'Zap/1-1' -- Hungup 'Zap/1-1' [Dec 9 03:57:17] WARNING[6651]: chan_zap.c:1684 zt_set_hook: zt hook failed: Device or resource busy debian4*CLI> quit Executing last minute cleanups |
#vim zapata.conf
--- /tmp/l3-saved-5621.28098.22221 2009-12-09 03:57:59.000000000 -1000 +++ zapata.conf 2009-12-09 03:58:25.000000000 -1000 @@ -677,7 +677,7 @@ ;dring2=325,95,0 ;dring2context=internal2 ; If no pattern is matched here is where we go. +context=white group=1 callerid="Igor ChubIN<221> -context=white channel => 1 |
#top
top - 03:58:13 up 23:15, 7 users, load average: 0.00, 0.02, 0.00 Tasks: 87 total, 1 running, 86 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.8%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 3099904k total, 219924k used, 2879980k free, 103804k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 996020k total, 0k used, 996020k free, 54104k cached 1 root 20 0 2100 724 624 S 0 0.0 0:01.40 init 2 root 15 -5 0 0 0 S 0 0.0 0:00.00 kthreadd 3 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/0 4 root 15 -5 0 0 0 S 0 0.0 0:00.22 ksoftirqd/0 ... 592 root 15 -5 0 0 0 S 0 0.0 0:00.00 ksuspend_usbd 594 root 15 -5 0 0 0 S 0 0.0 0:00.00 khubd 856 root 15 -5 0 0 0 S 0 0.0 0:00.00 ata/0 857 root 15 -5 0 0 0 S 0 0.0 0:00.00 ata/1 858 root 15 -5 0 0 0 S 0 0.0 0:00.00 ata_aux 898 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_0 899 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_1 900 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_2 901 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_3 980 root 15 -5 0 0 0 S 0 0.0 0:09.62 kjournald |
#/etc/init.d/
acpid ifupdown-clean rcS alsa-utils keymap.sh reboot asterisk killprocs rmnologin atd lpd rsyslog bootlogd module-init-tools screen-cleanup bootmisc.sh mountall-bootclean.sh sendsigs checkfs.sh mountall.sh single checkroot.sh mountdevsubfs.sh ssh console-screen.sh mountkernfs.sh stop-bootlogd cron mountnfs-bootclean.sh stop-bootlogd-single dbus mountnfs.sh udev dhcp3-server mountoverflowtmp udev-mtab exim4 mtab.sh umountfs glibc.sh networking umountnfs.sh hal nfs-common umountroot halt openbsd-inetd urandom hostname.sh portmap x11-common hwclockfirst.sh procps zaptel hwclock.sh rc ifupdown rc.local |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#screen
|
[general] context=default register => poltava:1234@192.168.102.1/kiev ; register => nt:1234@xgu.ru/vpoltava [101] username=phone type=friend host=dynamic secret=123 callerid="gib-snom" [103] type=friend host=dynamic secret=123 callerid="GIB-win" [kiev] type=friend host=dynamic secret=1234 ; call-limit=1 ; limitonpeers=yes [vpoltava] username=nt nat=yes type=friend host=xgu.ru secret=1234
[default] exten => s,1,Answer exten => s,n,Wait(1) exten => s,n,Background(alba) exten => 202,1,Answer exten => 202,n,Wait(1) exten => 202,n,Playback(alba) ;exten => 202,n,Playback(demo-congrats) exten => 202,n,Hangup exten => 221,1,Answer exten => 221,n,Dial(ZAP/G1) exten => _2XX,1,Set(CALLERID(number)=5${CALLERID(number)}) exten => _2XX,n,Dial(SIP/${EXTEN}) exten => 4000,1,Dial(SIP/vkiev/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/vkiev/${EXTEN}) exten => _1XX,1,Dial(SIP/poltava/${EXTEN}) ;exten => _1XX,1,Dial(IAX2/poltava/${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo exten => 999,n,Hangup exten => 291,1,Dial(SIP/201,10) exten => 291,n,Dial(SIP/vkiev/380674074085,10) exten => 291,n,Hangup ;exten => 291,n,Wait(1) ;exten => 291,n,Playback(alba) ;exten => 291,n,Playback(demo-congrats)
[general] context=default register => kiev:1234@192.168.101.3 [poltava] type=friend host=dynamic ; 192.168.101.3 secret=1234 ;call-limit=1 ;limitonpeers=yes deny=0.0.0.0/0.0.0.0 permit=192.168.101.3/255.255.255.255 trunk=yes
[general] context=default register => kiev:1234@192.168.101.3/poltava register => nt:1234@xgu.ru/vkiev [201] type=friend host=dynamic secret=1234 callerid="Roman Sidorenko-MegaPhone" [203] type=friend host=dynamic secret=203 callerid="Roman Sidorenko-softPhone" [204] type=friend host=dynamic secret=204 callerid="Roman Sidorenko-winPhone" [205] type=friend host=dynamic ;secret=205 callerid="Roman Sidorenko-Nokia" [poltava] type=friend host=dynamic ; 192.168.101.3 secret=1234 ;call-limit=1 ;limitonpeers=yes usecallerid=no [vkiev] type=friend host=xgu.ru ;secret=1234 username=nt nat=yes
Время первой команды журнала | 16:18:22 2009-12- 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:01:30 2009-12- 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 3.96 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 7.92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.75 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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