/l3/users/igor-public/nt-voip-2014-apr/teach.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 |
|
#vim /etc/asterisk/sip.conf
![]() --- /tmp/l3-saved-30282.30067.3374 2014-04-25 15:40:14.252160694 +0300 +++ /etc/asterisk/sip.conf 2014-04-25 15:55:27.604148456 +0300 @@ -22,7 +22,7 @@ pickupgroup=1 [1402] -ype=friend +type=friend secret=1234 host=dynamic context=gr1 |
#vim /etc/asterisk/features.conf
![]() --- /tmp/l3-saved-30282.31826.2823 2014-04-25 15:55:32.772148390 +0300 +++ /etc/asterisk/features.conf 2014-04-25 15:56:40.152147487 +0300 @@ -119,10 +119,10 @@ [featuremap] -;blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call! +blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call! ;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call! ;automon => *1 ; One Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w option in the Dial() or Queue() app call! -;atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call! +atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call! ;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call! ;automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call! |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-30282.21773.9056 2014-04-25 15:56:50.560147348 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 16:15:25.412132410 +0300 @@ -11,7 +11,7 @@ exten => s,1,Answer exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => s,n,Monitor(wav,${CALLFILENAME},m) -exten => s,n,Dial(${ARG1}) +exten => s,n,Dial(${ARG1},,tT) [macro-localcall] @@ -22,14 +22,14 @@ exten => s,n,System(/usr/local/bin/jabber-send user0@lab0.xgu.ru ${CALLERID(num)} is calling) exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) -exten => s,n,Dial(SIP/${ARG1},2) +exten => s,n,Dial(SIP/${ARG1},2,tT) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default) -exten => s-CONGESTION,1,Dial(SIP/${mobile/${CALLERID(num)}}) +exten => s-CONGESTION,1,Dial(SIP/${mobile/${CALLERID(num)}},,tT) exten => s-ANSWER,1,Hangup exten => s-BUSY,1,Busy @@ -136,7 +136,7 @@ exten => 8200,1,GotoIfTime(9:00-17:00,mon-fri,*,*?open) exten => 8200,n,Goto(menu,s,1) -exten => 8200,n(open),Dial(SIP/1201) +exten => 8200,n(open),Dial(SIP/1201,,tT) ; ${VARIABLE:start:length} |
#less /etc/asterisk/features.conf
|
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-30282.12010.22163 2014-04-25 16:17:44.288130549 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 16:18:49.292129696 +0300 @@ -11,7 +11,7 @@ exten => s,1,Answer exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => s,n,Monitor(wav,${CALLFILENAME},m) -exten => s,n,Dial(${ARG1},,tT) +exten => s,n,Dial(${ARG1},,tTkK) [macro-localcall] @@ -22,14 +22,14 @@ exten => s,n,System(/usr/local/bin/jabber-send user0@lab0.xgu.ru ${CALLERID(num)} is calling) exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) -exten => s,n,Dial(SIP/${ARG1},2,tT) +exten => s,n,Dial(SIP/${ARG1},2,tTkK) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default) -exten => s-CONGESTION,1,Dial(SIP/${mobile/${CALLERID(num)}},,tT) +exten => s-CONGESTION,1,Dial(SIP/${mobile/${CALLERID(num)}},,tTkK) exten => s-ANSWER,1,Hangup exten => s-BUSY,1,Busy @@ -41,6 +41,8 @@ [internal] +include => parkedcalls + exten => _80XX,1,Answer exten => _80XX,n,Record(/var/tmp/asterisk/message${EXTEN:2}:gsm,2) exten => _80XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2}) @@ -136,7 +138,7 @@ exten => 8200,1,GotoIfTime(9:00-17:00,mon-fri,*,*?open) exten => 8200,n,Goto(menu,s,1) -exten => 8200,n(open),Dial(SIP/1201,,tT) +exten => 8200,n(open),Dial(SIP/1201,,tTkK) ; ${VARIABLE:start:length} |
#vim /etc/asterisk/features.conf
![]() |
#ls -l /etc/asterisk/queues.conf
-rw-r----- 1 asterisk asterisk 23843 Янв 4 03:07 /etc/asterisk/queues.conf |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-30282.13579.1862 2014-04-25 16:50:56.564103860 +0300 +++ /etc/asterisk/queues.conf 2014-04-25 16:52:10.460102867 +0300 @@ -535,3 +535,8 @@ ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty +[queue1] + +member => SIP/1401 +member => SIP/1402 + |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on teach (pid = 24073) Verbosity is at least 4 teach*CLI> queue reload Disconnected from Asterisk server Executing last minute cleanups |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on teach (pid = 24073) Verbosity is at least 4 teach*CLI> sip reload ... cdr cel channel cli config console core data database devstate dialplan dnsmgr dundi event fax features file group gtalk hangup help http iax2 indication jabber jingle keys local logger manager minivm mixmonitor module moh no odbc originate parkedcalls phoneprov pri queue realtime reload rtcp rtp say sip skinny sqlite stun timing udptl ulimit unistim voicemail teach*CLI> quit Executing last minute cleanups |
#cat /etc/asterisk/extensions.conf.local
[local] exten => 1499,1,Dial(SIP/1401&SIP/1402) exten => 1499,n,Hangup exten => 1498,1,Answer exten => 1498,n,Queue(queue1) exten => 1498,n,Hangup exten => _14XX,1,Macro(localcall,${EXTEN}) |
#tail /etc/asterisk/queues.conf
; ;member => Agent/@1 ; Any agent in group 1 ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty [queue1] member => SIP/1401 member => SIP/1402 |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-30282.88.13732 2014-04-25 17:02:12.884094800 +0300 +++ /etc/asterisk/queues.conf 2014-04-25 17:04:22.984093055 +0300 @@ -537,6 +537,8 @@ [queue1] +strategy=linear + member => SIP/1401 member => SIP/1402 |
#asterisk -rvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on teach (pid = 24073) Verbosity is at least 4 teach*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on teach (pid = 17646) Verbosity was 0 and is now 3 teach*CLI> queue show queue1 queue1 has 0 calls (max unlimited) in 'linear' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s Members: SIP/1401 (Unavailable) has taken no calls yet SIP/1402 (Unavailable) has taken no calls yet No Callers teach*CLI> quit Executing last minute cleanups |
#all "tail -5 /etc/asterisk/queues.conf"
1: ;member => Agent/:1,1 ; Any agent in group 1, wait for first 1: ; available, but consider with penalty 1: [gueue1] 1: member => SIP/1101 1: member => SIP/1102 2: 2: 2: 2: member => SIP/1201 2: member => SIP/1202 ... 8: [queue1] 8: strategy=linear 8: member=>SIP/3201 8: member=>SIP/3202 8: member=>SIP/3203 9: ; 9: ;member => Agent/@1 ; Any agent in group 1 9: ;member => Agent/:1,1 ; Any agent in group 1, wait for first 9: ; available, but consider with penalty 9: |
#EFGQ
|
#w
08:34:38 up 4 days, 12:13, 13 users, load average: 0,12, 0,11, 0,10 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user tty7 :0 Пнд20 4days 12:37 26.34s gdm-session-worker [pam/gdm3] root pts/0 p54b8775e.dip0.t 07:28 1:06m 0.00s 0.00s ssh -t 192.168.12.2 screen -x user pts/2 lab0:S.0 Втр10 6.00s 4.49s 4.40s ssh root@192.168.12.254 root pts/3 p54b8775e.dip0.t 07:28 1:06m 0.00s 0.00s ssh -t 192.168.12.4 screen -x root pts/4 p54b8775e.dip0.t 07:28 1:06m 0.01s 0.01s ssh -t 192.168.12.9 screen -x root pts/5 192.168.12.254 Срд18 6.00s 2.35s 1.52s script -f -c l3script -q /root/.lilal root pts/10 p54b8775e.dip0.t 07:28 1:06m 0.00s 0.00s ssh -t 192.168.12.7 screen -x root pts/11 p54b8775e.dip0.t 07:28 1:06m 0.00s 0.00s ssh -t 192.168.12.6 screen -x root pts/12 192.168.12.254 Чтв15 40:42m 0.05s 0.05s -bash root pts/13 p54b8775e.dip0.t 07:28 1:06m 0.01s 0.01s ssh -t 192.168.12.8 screen -x user pts/6 :0 Втр18 3days 0.07s 0.07s bash root pts/25 vilen.local Птн09 22:11m 0.13s 0.13s -bash user pts/1 lab0:S.1 Чтв15 40:42m 0.06s 0.00s ssh root@192.168.12.254 |
#w
08:49:32 up 4 days, 12:28, 14 users, load average: 0,06, 0,11, 0,13 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user tty7 :0 Пнд20 4days 12:40 27.27s gdm-session-worker [pam/gdm3] root pts/0 p54b8775e.dip0.t 07:28 1:21m 0.00s 0.00s ssh -t 192.168.12.2 screen -x user pts/2 lab0:S.0 Втр10 4.00s 4.50s 4.41s ssh root@192.168.12.254 root pts/3 p54b8775e.dip0.t 07:28 1:21m 0.00s 0.00s ssh -t 192.168.12.4 screen -x root pts/4 p54b8775e.dip0.t 07:28 1:21m 0.01s 0.01s ssh -t 192.168.12.9 screen -x root pts/5 192.168.12.254 Срд18 4.00s 2.35s 1.52s script -f -c l3script -q /root/.lilal root pts/10 p54b8775e.dip0.t 07:28 1:21m 0.00s 0.00s ssh -t 192.168.12.7 screen -x root pts/11 p54b8775e.dip0.t 07:28 1:21m 0.00s 0.00s ssh -t 192.168.12.6 screen -x root pts/12 192.168.12.254 Чтв15 40:57m 0.05s 0.05s -bash root pts/13 p54b8775e.dip0.t 07:28 1:21m 0.01s 0.01s ssh -t 192.168.12.8 screen -x user pts/6 :0 Втр18 3days 0.07s 0.07s bash root pts/16 p54b8775e.dip0.t 08:49 1.00s 0.00s 0.00s ssh -t 192.168.12.5 screen -x root pts/25 vilen.local Птн09 22:26m 0.13s 0.13s -bash user pts/1 lab0:S.1 Чтв15 40:57m 0.06s 0.00s ssh root@192.168.12.254 |
#less /etc/asterisk/queues.conf
|
#vim /etc/asterisk/queues.conf
![]() --- /tmp/l3-saved-30282.24055.22938 2014-04-26 08:55:44.263328303 +0300 +++ /etc/asterisk/queues.conf 2014-04-26 09:05:31.967320429 +0300 @@ -542,3 +542,4 @@ member => SIP/1401 member => SIP/1402 +member => Agent/1 |
#vim /etc/asterisk/agents.conf
![]() --- /tmp/l3-saved-30282.16858.7818 2014-04-26 09:05:59.723320057 +0300 +++ /etc/asterisk/agents.conf 2014-04-26 09:07:30.667318839 +0300 @@ -103,3 +103,5 @@ ; ;agent => 1001,4321,Mark Spencer ;agent => 1002,4321,Will Meadows + +agent => 007,1234,James Bond |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-30282.5042.23275 2014-04-26 09:07:44.599318654 +0300 +++ /etc/asterisk/extensions.conf 2014-04-26 09:12:54.907314496 +0300 @@ -144,6 +144,9 @@ exten => 8107,1,Answer exten => 8107,n,Queue(queue1) +exten => _83XX,1,Answer +exten => _83XX,n,AgentLogin(0${EXTEN:2}) + ; ${VARIABLE:start:length} #include "/etc/asterisk/extensions.conf.local" |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on teach (pid = 17646) Verbosity is at least 3 teach*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-30282.18295.11505 2014-04-26 09:13:06.055314348 +0300 +++ /etc/asterisk/extensions.conf 2014-04-26 09:14:33.699313174 +0300 @@ -147,6 +147,11 @@ exten => _83XX,1,Answer exten => _83XX,n,AgentLogin(0${EXTEN:2}) +; exten => 8307,n,AgentLogin(007) +; exten => 8308,n,AgentLogin(008) +; exten => _83XY,n,AgentLogin(0XY) +; XY = ${EXTEN:2} + ; ${VARIABLE:start:length} #include "/etc/asterisk/extensions.conf.local" |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on teach (pid = 32534) Verbosity was 0 and is now 3 teach*CLI> agent show 007 Usage: agent show Provides summary information on agents. teach*CLI> agent show 007 (James Bond) not logged in (musiconhold is 'default') 1 agents configured [0 online , 1 offline] teach*CLI> quit Executing last minute cleanups |
#less /etc/asterisk/agents.conf
|
#less /etc/asterisk/agents.conf
|
#ssh 192.168.12.2
Linux debian2 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 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: Sat Apr 26 07:28:00 2014 from teach.local l3-agent is already running: pid=4787; pidfile=/root/.lilalo/l3-agent.pid root@debian2:~# less /etc/asterisk/queues.conf [general] ... member => SIP/1201 member => SIP/1202 member => Agent/007 ;регится оператор что бы не поднимать трубку, оработка очереди root@debian2:~# root@debian2:~# root@debian2:~# root@debian2:~# exit logout Connection to 192.168.12.2 closed. |
#ssh 192.168.12.7
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 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: Sat Apr 26 07:28:17 2014 from teach.local l3-agent is already running: pid=11943; pidfile=/root/.lilalo/l3-agent.pid root@debian7:~# less /etc/asterisk/queues.conf [general] ... ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty [queue1] member => SIP/3101 member => SIP/3102 member => Agent/007 strategy=linear root@debian7:~# exit logout Connection to 192.168.12.7 closed. |
#exten => s-ANSWER,1,Hangup
![]() [local] exten => 1499,1,Dial(SIP/1401&SIP/1402) exten => 1499,n,Hangup exten => 1498,1,Answer exten => 1498,n,Queue(queue1) exten => 1498,n,Hangup exten => _14XX,1,Macro(localcall,${EXTEN}) "/etc/asterisk/extensions.conf.local" 11L, 194C |
#[local]
Channel: SIP/1201 Extension: 8200 Context: internal |
#cat /tmp/1.call
Channel: SIP/1201 Extension: 8200 Context: internal |
#chown asterisk:asterisk /tmp/1.call
|
#ssh 192.168.12.1
#include dopplan.intrunning: pid=7824; pidfile=/root/.lilalo/l3-agent.pid ; ${ARG1} - outgoing channel + extensionsions.conf ; EPOCH = seconds since 1.01.1970 ; ${FunctionName(...)} ; ${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")} [default] ;exten => _11XX,1,Dial(SIP/${EXTEN}) ;kiev ;exten => _12XX,1,Dial(SIP/kiev/${EXTEN}) ;mG rezervonName(...)} ... "/tmp/1.call" [Новый] 3L, 52C записано root@debian1:~# cat /tmp/1.call Channel: SIP/1101 Extension: 8107 Context: internal root@debian1:~# chown asterisk:asterisk /tmp/1.call root@debian1:~# cp -p /tmp/1.call /var/spool/asterisk/outgoing/ root@debian1:~# сфexit logout Connection to 192.168.12.1 closed. |
#cat > /tmp/1.call
Channel: SIP/1101 Extension: 8107 Context: internal |
#chown asterisk:asterisk /tmp/1.call
|
#vim /usr/local/bin/call-all
![]() --- /dev/null 2014-04-21 23:21:14.526006428 +0300 +++ /usr/local/bin/call-all 2014-04-26 09:41:53.119291207 +0300 @@ -0,0 +1,18 @@ +for N in kiev/{1,2,3}{1,2,3}0{1,2} +do + +N=`echo $N | sed s@kiev/11@11@` +FILENAME=/tmp/$RANDOM$RANDOM.call +echo $N + +# cat <<EOF > $FILENAME +# Channel: $N +# Extension: 8107 +# Context: internal +# EOF +# +# chown asterisk:asterisk $FILENAME +# mv $FILENAME /var/spool/asterisk/outgoing/ + +done + |
#bash /usr/local/bin/call-all
1101 1102 kiev/1201 kiev/1202 kiev/1301 kiev/1302 kiev/2101 kiev/2102 kiev/2201 kiev/2202 kiev/2301 kiev/2302 kiev/3101 kiev/3102 kiev/3201 kiev/3202 kiev/3301 kiev/3302 |
#cat /usr/local/bin/call-all
for N in kiev/{1,2,3}{1,2,3}0{1,2} do N=`echo $N | sed s@kiev/11@11@` FILENAME=/tmp/$RANDOM$RANDOM.call echo $N # cat <<EOF > $FILENAME # Channel: $N # Extension: 8107 # Context: internal # EOF # # chown asterisk:asterisk $FILENAME # mv $FILENAME /var/spool/asterisk/outgoing/ done |
#vim /usr/local/bin/call-all
|
#cpall /usr/local/bin/call-all /usr/local/bin/
call-all 100% 267 0.3KB/s 00:00 call-all 100% 267 0.3KB/s 00:00 call-all 100% 267 0.3KB/s 00:00 call-all 100% 267 0.3KB/s 00:00 call-all 100% 267 0.3KB/s 00:00 call-all 100% 267 0.3KB/s 00:00 /root/.bashrc: line 20: .: /usr/local/bin/l3script: cannot execute binary file call-all 100% 267 0.3KB/s 00:00 call-all 100% 267 0.3KB/s 00:00 call-all 100% 267 0.3KB/s 00:00 |
#ssh 192.168.1.1
![]() The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established. RSA key fingerprint is 86:89:0d:51:32:04:23:99:c5:48:af:32:cd:7b:2b:72. Are you sure you want to continue connecting (yes/no)? n Please type 'yes' or 'no': ^C |
#ssh 192.168.1.1
![]() The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established. RSA key fingerprint is 86:89:0d:51:32:04:23:99:c5:48:af:32:cd:7b:2b:72. Are you sure you want to continue connecting (yes/no)? ^C |
#ssh 192.168.12.1
l3-agent is already running: pid=7824; pidfile=/root/.lilalo/l3-agent.pid root@debian1:~# root@debian1:~# root@debian1:~# chmod +x /usr/local/bin/call-all root@debian1:~# /usr/local/bin/call-all root@debian1:~# tail -f /var/log/asterisk/messages [Apr 26 09:45:45] NOTICE[32349] pbx_spool.c: Call completed to SIP/kiev/2201 [Apr 26 09:45:46] NOTICE[32384] pbx_spool.c: Call completed to SIP/kiev/3102 [Apr 26 09:45:46] NOTICE[32391] pbx_spool.c: Call completed to SIP/kiev/3201 [Apr 26 09:45:46] NOTICE[32398] pbx_spool.c: Call completed to SIP/kiev/3202 [Apr 26 09:45:46] NOTICE[32377] pbx_spool.c: Call completed to SIP/kiev/3101 [Apr 26 09:45:50] NOTICE[32307] pbx_spool.c: Call completed to SIP/kiev/1201 [Apr 26 09:45:51] NOTICE[32300] pbx_spool.c: Call failed to go through, reason (5) Remote end is Busy [Apr 26 09:45:51] NOTICE[32300] pbx_spool.c: Queued call to SIP/1102 expired without completion after 0 attempts [Apr 26 09:46:02] NOTICE[32314] pbx_spool.c: Call failed to go through, reason (5) Remote end is Busy [Apr 26 09:46:02] NOTICE[32314] pbx_spool.c: Queued call to SIP/kiev/1202 expired without completion after 0 attempts ^C root@debian1:~# ls /var/spool/asterisk/outgoing/ root@debian1:~# exit logout Connection to 192.168.12.1 closed. |
#cat /usr/local/bin/call-all
for N in kiev/{1,2,3}{1,2,3}0{1,2} do N=`echo $N | sed s@kiev/11@11@` FILENAME=/tmp/$RANDOM$RANDOM.call cat <<EOF > $FILENAME Channel: SIP/$N Extension: 8107 Context: internal EOF chown asterisk:asterisk $FILENAME mv $FILENAME /var/spool/asterisk/outgoing/ done |
#crontab -l
![]() no crontab for root |
#ssh 192.168.12.1
[Apr 22 14:27:12] NOTICE[15782] pbx_ael.c: AEL load process: checked config file name '/etc/asterisk/extensions.ael'. [Apr 22 14:27:12] NOTICE[15782] pbx_ael.c: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'. [Apr 22 14:27:12] NOTICE[15782] pbx_ael.c: AEL load process: merged config file name '/etc/asterisk/extensions.ael'. [Apr 22 14:27:12] NOTICE[15782] pbx_ael.c: AEL load process: verified config file name '/etc/asterisk/extensions.ael'. [Apr 22 15:01:04] NOTICE[16010] cdr.c: CDR simple logging enabled. [Apr 22 15:01:04] NOTICE[16010] loader.c: 219 modules will be loaded. [Apr 22 15:01:04] NOTICE[16010] res_odbc.c: res_odbc loaded. ...skipping... [Apr 26 09:45:43] NOTICE[32293] pbx_spool.c: Call completed to SIP/1101 [Apr 26 09:45:44] NOTICE[32342] pbx_spool.c: Call completed to SIP/kiev/2102 ... Channel: SIP/$N Extension: 1101 Context: local EOF chown asterisk:asterisk $FILENAME mv $FILENAME /var/spool/asterisk/outgoing/ done root@debian1:~# exit logout Connection to 192.168.12.1 closed. |
#ssh 192.168.12.1
l3-agent is already running: pid=7824; pidfile=/root/.lilalo/l3-agent.pid root@debian1:~# l3script |
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Digium, Inc. Device 800a (rev 02) |
#exit
exit root@debian1:~# exit logout Connection to 192.168.12.1 closed. |
#ssh 192.168.12.2
Linux debian2 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 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: Sat Apr 26 09:22:01 2014 from teach.local l3-agent is already running: pid=4787; pidfile=/root/.lilalo/l3-agent.pid root@debian2:~# lspci 00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) ... 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Digium, Inc. Device 800a (rev 02) root@debian2:~# exit logout Connection to 192.168.12.2 closed. |
#ssh 192.168.12.1
l3-agent is already running: pid=7824; pidfile=/root/.lilalo/l3-agent.pid root@debian1:~# l3script |
#apt-get install dahdi-source
Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Будут установлены следующие дополнительные пакеты: dahdi-linux fxload НОВЫЕ пакеты, которые будут установлены: dahdi-linux dahdi-source fxload обновлено 0, установлено 3 новых пакетов, для удаления отмечено 0 пакетов, и 6 пакетов не обновлено. Необходимо скачать 1 014 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 1 357 kB. ... (Чтение базы данных … на данный момент установлено 139905 файлов и каталогов.) Распаковывается пакет fxload (из файла …/fxload_0.0.20081013-1_amd64.deb) … Выбор ранее не выбранного пакета dahdi-linux. Распаковывается пакет dahdi-linux (из файла …/dahdi-linux_1%3a2.6.1+dfsg2-1_all.deb) … Выбор ранее не выбранного пакета dahdi-source. Распаковывается пакет dahdi-source (из файла …/dahdi-source_1%3a2.6.1+dfsg2-1_all.deb) … Обрабатываются триггеры для man-db … Настраивается пакет fxload (0.0.20081013-1) … Настраивается пакет dahdi-linux (1:2.6.1+dfsg2-1) … Настраивается пакет dahdi-source (1:2.6.1+dfsg2-1) … |
## Zaptel/Zapata (старые версии)
|
## DAHDI (более новые)
|
#m-a a-i dahdi
┌──────────────────┤ Обновление кеша данных о пакетах ├───────────────────┐ │ Чтение результатов работы apt-cache... │ │ │ │ │ │ 100% │ │ │ └─────────────────────────────────────────────────────────────────────────┘ Обновлена информация о 1 пакетах unpack Extracting the package tarball, /usr/src/dahdi.tar.bz2, please wait... "/usr/share/modass/packages/default.sh" build KVERS=3.2.0-4-amd64 KSRC=/lib/modules/3.2.0-4-amd64/build KDREV=3.2.54-2 kdist_image |
## ÑокÑаÑÑÐ½Ð½Ð°Ñ Ð²ÑеÑÑиÑ:
|
#apt-get install dahdi
Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Уже установлена самая новая версия dahdi. обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 6 пакетов не обновлено. |
#apt-get install asterisk-dahdi
Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Будут установлены следующие дополнительные пакеты: libopenr2-3 libpri1.4 libss7-1 НОВЫЕ пакеты, которые будут установлены: asterisk-dahdi libopenr2-3 libpri1.4 libss7-1 обновлено 0, установлено 4 новых пакетов, для удаления отмечено 0 пакетов, и 6 пакетов не обновлено. Необходимо скачать 1 252 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 2 271 kB. ... Выбор ранее не выбранного пакета libpri1.4. Распаковывается пакет libpri1.4 (из файла …/libpri1.4_1.4.12-2_amd64.deb) … Выбор ранее не выбранного пакета libss7-1. Распаковывается пакет libss7-1 (из файла …/libss7-1_1.0.2-3_amd64.deb) … Выбор ранее не выбранного пакета asterisk-dahdi. Распаковывается пакет asterisk-dahdi (из файла …/asterisk-dahdi_1%3a1.8.13.1~dfsg1-3+deb7u3_amd64.deb) … Настраивается пакет libopenr2-3 (1.3.2-1.1) … Настраивается пакет libpri1.4 (1.4.12-2) … Настраивается пакет libss7-1 (1.0.2-3) … Настраивается пакет asterisk-dahdi (1:1.8.13.1~dfsg1-3+deb7u3) … |
#lsmod | less
|
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Digium, Inc. Device 800a (rev 02) |
#reboot
Broadcast message from root@debian1 (pts/3) (Sat Apr 26 10:51:37 2014): The system is going down for reboot NOW! |
#ping 192.168.12.1
PING 192.168.12.1 (192.168.12.1) 56(84) bytes of data. From 192.168.12.254 icmp_seq=22 Destination Host Unreachable From 192.168.12.254 icmp_seq=23 Destination Host Unreachable From 192.168.12.254 icmp_seq=26 Destination Host Unreachable From 192.168.12.254 icmp_seq=29 Destination Host Unreachable From 192.168.12.254 icmp_seq=32 Destination Host Unreachable From 192.168.12.254 icmp_seq=35 Destination Host Unreachable From 192.168.12.254 icmp_seq=38 Destination Host Unreachable From 192.168.12.254 icmp_seq=41 Destination Host Unreachable From 192.168.12.254 icmp_seq=44 Destination Host Unreachable ... 64 bytes from 192.168.12.1: icmp_req=79 ttl=64 time=0.219 ms 64 bytes from 192.168.12.1: icmp_req=80 ttl=64 time=0.240 ms 64 bytes from 192.168.12.1: icmp_req=81 ttl=64 time=0.225 ms 64 bytes from 192.168.12.1: icmp_req=82 ttl=64 time=0.220 ms 64 bytes from 192.168.12.1: icmp_req=83 ttl=64 time=0.256 ms 64 bytes from 192.168.12.1: icmp_req=84 ttl=64 time=0.232 ms ^C --- 192.168.12.1 ping statistics --- 84 packets transmitted, 25 received, +14 errors, 70% packet loss, time 83357ms rtt min/avg/max/mdev = 0.219/0.254/0.524/0.060 ms, pipe 2 |
#ssh 192.168.12.1
root@debian1:~# l3script |
#lsmod
Module Size Used by rfcomm 33700 0 bnep 17567 2 bluetooth 119455 10 bnep,rfcomm dahdi 191056 0 crc_ccitt 12347 1 dahdi binfmt_misc 12957 1 nfsd 216170 2 nfs 308313 0 nfs_acl 12511 2 nfs,nfsd ... cdrom 35401 1 sr_mod crc_t10dif 12348 1 sd_mod ahci 24997 2 libahci 22941 1 ahci libata 140630 2 libahci,ahci scsi_mod 162269 4 libata,sd_mod,sr_mod,sg ehci_hcd 40215 0 usbcore 128741 3 ehci_hcd,usbhid e1000e 120822 0 usb_common 12354 1 usbcore |
#lsmod | less
|
#dahdi_genconf
Empty configuration -- no spans Empty configuration -- no spans |
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Digium, Inc. Device 800a (rev 02) |
#lspci -n
00:00.0 0600: 8086:0100 (rev 09) 00:02.0 0300: 8086:0102 (rev 09) 00:16.0 0780: 8086:1c3a (rev 04) 00:16.3 0700: 8086:1c3d (rev 04) 00:19.0 0200: 8086:1502 (rev 04) 00:1a.0 0c03: 8086:1c2d (rev 04) 00:1b.0 0403: 8086:1c20 (rev 04) 00:1c.0 0604: 8086:1c10 (rev b4) 00:1c.4 0604: 8086:1c18 (rev b4) 00:1c.6 0604: 8086:1c1c (rev b4) 00:1c.7 0604: 8086:1c1e (rev b4) 00:1d.0 0c03: 8086:1c26 (rev 04) 00:1e.0 0604: 8086:244e (rev a4) 00:1f.0 0601: 8086:1c4e (rev 04) 00:1f.2 0104: 8086:2822 (rev 04) 00:1f.3 0c05: 8086:1c22 (rev 04) 02:00.0 0280: d161:800a (rev 02) |
#cd /usr/src/
|
## dahdi source
|
## google dahdi source
|
#ls
dahdi-linux-complete-current.tar.gz linux-headers-3.2.0-4-common dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.54-2_amd64.deb linux-kbuild-3.2 dahdi.tar.bz2 modules linux vpb-driver.tar.bz2 linux-headers-3.2.0-4-amd64 |
#tar xf dahdi-linux-complete-current.tar.gz
|
#cd dahdi-linux-complete-2.9.1.1+2.9.1/
|
#ls
ChangeLog linux Makefile README tools |
#less README
|
#make all
make -C linux all make[1]: Entering directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux' make -C drivers/dahdi/firmware firmware-loaders make[2]: Entering directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/firmware' make[2]: Leaving directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/firmware' make -C /lib/modules/3.2.0-4-amd64/build SUBDIRS=/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m make[2]: Entering directory `/usr/src/linux-headers-3.2.0-4-amd64' CC [M] /usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/dahdi-base.o CC [M] /usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/dahdi-sysfs.o CC [M] /usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/dahdi-sysfs-chan.o ... gcc astribank_is_starting.o -o astribank_is_starting pod2man --section 8 dahdi_registration > dahdi_registration.8 || rm -f dahdi_registration.8 pod2man --section 8 xpp_sync > xpp_sync.8 || rm -f xpp_sync.8 pod2man --section 8 lsdahdi > lsdahdi.8 || rm -f lsdahdi.8 pod2man --section 8 xpp_blink > xpp_blink.8 || rm -f xpp_blink.8 pod2man --section 8 dahdi_genconf > dahdi_genconf.8 || rm -f dahdi_genconf.8 pod2man --section 8 dahdi_hardware > dahdi_hardware.8 || rm -f dahdi_hardware.8 pod2man --section 8 twinstar > twinstar.8 || rm -f twinstar.8 make[2]: Leaving directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/tools/xpp' make[1]: Leaving directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/tools' |
#make install
make -C linux all make[1]: Entering directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux' make -C drivers/dahdi/firmware firmware-loaders make[2]: Entering directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/firmware' make[2]: Leaving directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/firmware' make -C /lib/modules/3.2.0-4-amd64/build SUBDIRS=/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m make[2]: Entering directory `/usr/src/linux-headers-3.2.0-4-amd64' VERSION /usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/xpp/xpp_version.h Building modules, stage 2. MODPOST 35 modules ... /usr/bin/install -c -m 644 tonezone.h /usr/include/dahdi/ ################################################### ### ### DAHDI tools installed successfully. ### If you have not done so before, install init scripts with: ### ### make config ### ################################################### make[1]: Leaving directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/tools' |
##
|
#history
19 asterisk -rvvvvvvvvvvvvv 20 ls /var/spool/asterisk/monitor/ 21 nano /etc/asterisk/extensions.conf 22 asterisk -rvvvvvvvvvvvvv 23 ls /var/spool/asterisk/monitor/ 24 nano /etc/asterisk/extensions.conf 25 asterisk -rvvvvvvvvvvvvv 26 ls /var/spool/asterisk/monitor/ 27 asterisk -rvvvvvvvvvvvvv 28 apt-get install samba ... 509 # google dahdi source 510 ls 511 tar xf dahdi-linux-complete-current.tar.gz 512 cd dahdi-linux-complete-2.9.1.1+2.9.1/ 513 ls 514 less README 515 make all 516 make install 517 # 518 history |
#make config
make -C linux all make[1]: Entering directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux' make -C drivers/dahdi/firmware firmware-loaders make[2]: Entering directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/firmware' make[2]: Leaving directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/firmware' make -C /lib/modules/3.2.0-4-amd64/build SUBDIRS=/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m make[2]: Entering directory `/usr/src/linux-headers-3.2.0-4-amd64' VERSION /usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/linux/drivers/dahdi/xpp/xpp_version.h Building modules, stage 2. MODPOST 35 modules ... /usr/sbin/update-rc.d dahdi defaults 15 30 update-rc.d: using dependency based boot sequencing DAHDI has been configured. List of detected DAHDI devices: pci:0000:02:00.0 wcte13xp- d161:800a Wildcard TE131/TE133 run 'dahdi_genconf modules' to load support for only the DAHDI hardware installed in this system. By default support for all DAHDI hardware is loaded at DAHDI start. make[1]: Leaving directory `/usr/src/dahdi-linux-complete-2.9.1.1+2.9.1/tools' |
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Digium, Inc. Device 800a (rev 02) |
#lsmod | grep wcte13xp
![]() |
#modprobe wcte13xp-
![]() FATAL: Module wcte13xp- not found. |
#modprobe wcte13xp
![]() ERROR: could not insert 'wcte13xp': Invalid argument |
#depmod -a
|
#find /lib/modules/3.2.0-4-amd64/ -name wcte13xp\*
/lib/modules/3.2.0-4-amd64/dahdi/wcte13xp.ko |
#modprobe -r dahdi
|
#modprobe wcte13xp
|
#history
29 smbpasswd -a user 30 nano /etc/samba/smb.conf 31 /etc/init.d/samba restart 32 ls -ld /var/spool/asterisk/monitor/ 33 nano /etc/group 34 /etc/init.d/samba restart 35 nano /etc/samba/smb.conf 36 /etc/init.d/samba restart 37 ls -ld /var/spool/asterisk/monitor/ 38 nano /etc/group ... 519 make config 520 lspci 521 lsmod | grep wcte13xp 522 modprobe wcte13xp- 523 modprobe wcte13xp 524 depmod -a 525 find /lib/modules/3.2.0-4-amd64/ -name wcte13xp\* 526 modprobe -r dahdi 527 modprobe wcte13xp 528 history |
#lsmod | head
Module Size Used by wcte13xp 40794 0 oct612x 150308 1 wcte13xp dahdi 192614 2 oct612x,wcte13xp crc_ccitt 12347 1 dahdi rfcomm 33700 0 bnep 17567 2 bluetooth 119455 10 bnep,rfcomm binfmt_misc 12957 1 nfsd 216170 2 |
#modinfo wcte13xp
filename: /lib/modules/3.2.0-4-amd64/dahdi/wcte13xp.ko license: GPL v2 author: Digium Incorporated <support@digium.com> description: Wildcard Digital Card Driver alias: pci:v0000D161d0000800Bsv*sd*bc*sc*i* alias: pci:v0000D161d0000800Asv*sd*bc*sc*i* depends: oct612x,dahdi vermagic: 3.2.0-4-amd64 SMP mod_unload modversions parm: debug:int parm: default_linemode:"t1"(default), "e1", or "j1". (charp) parm: alarmdebounce:int parm: losalarmdebounce:int parm: aisalarmdebounce:int parm: yelalarmdebounce:int parm: vpmsupport:int parm: force_firmware:int parm: latency:How many milliseconds of audio to buffer between card and host (3ms default). This number will increase during runtime, dynamically, if dahdi detects that it is too small. This is commonly refered to as a "latency bump" (int) parm: max_latency:The maximum amount of latency that the driver will permit. (int) |
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Digium, Inc. Device 800a (rev 02) |
#find /sys -name \*02:00.0\*
/sys/devices/pci0000:00/0000:00:1c.4/0000:02:00.0 /sys/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/pci:0000:02:00.0 /sys/bus/pci/devices/0000:02:00.0 /sys/bus/pci/drivers/wcte13xp/0000:02:00.0 /sys/bus/dahdi_devices/devices/pci:0000:02:00.0 |
#modprobe -r wcte13xp
|
#find /sys -name \*02:00.0\*
/sys/devices/pci0000:00/0000:00:1c.4/0000:02:00.0 /sys/bus/pci/devices/0000:02:00.0 |
[local] exten => 1499,1,Dial(SIP/1401&SIP/1402) exten => 1499,n,Hangup exten => 1498,1,Answer exten => 1498,n,Queue(queue1) exten => 1498,n,Hangup exten => _14XX,1,Macro(localcall,${EXTEN})
Channel: SIP/1101 Extension: 8107 Context: internal
for N in kiev/{1,2,3}{1,2,3}0{1,2} do N=`echo $N | sed s@kiev/11@11@` FILENAME=/tmp/$RANDOM$RANDOM.call cat <<EOF > $FILENAME Channel: SIP/$N Extension: 8107 Context: internal EOF chown asterisk:asterisk $FILENAME mv $FILENAME /var/spool/asterisk/outgoing/ done
Время первой команды журнала | 14:39:30 2014- 4-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:06:51 2014- 4-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 14.85 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.58 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.47 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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