/l3/users/maxim/ais-voip-2011-jun/linux2.unix.ais/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#ls -l /tmp/
итого 36 -rw-r--r-- 1 asterisk asterisk 49 Июл 1 11:20 1.call -rw-r--r-- 1 root root 213 Июл 1 11:27 genfiles.txt drwx------ 2 user user 4096 Июл 1 10:07 keyring-e7OLSK -rw-r--r-- 1 root root 212 Июл 1 11:27 make-calls drwx------ 2 Debian-gdm Debian-gdm 4096 Июл 1 10:07 orbit-Debian-gdm drwx------ 2 user user 4096 Июл 1 11:03 orbit-user drwx------ 2 user user 4096 Июл 1 10:07 seahorse-kVpcZ3 drwx------ 2 user user 4096 Июл 1 10:07 ssh-QJejNi1831 drwx------ 2 user user 4096 Июл 1 10:07 virtual-user.RPcyU7 |
#ls -l /tmp/
итого 36 -rw-r--r-- 1 asterisk asterisk 49 Июл 1 11:20 1.call -rw-r--r-- 1 root root 213 Июл 1 11:27 genfiles.txt drwx------ 2 user user 4096 Июл 1 10:07 keyring-e7OLSK -rw-r--r-- 1 root root 212 Июл 1 11:27 make-calls drwx------ 2 Debian-gdm Debian-gdm 4096 Июл 1 10:07 orbit-Debian-gdm drwx------ 2 user user 4096 Июл 1 11:03 orbit-user drwx------ 2 user user 4096 Июл 1 10:07 seahorse-kVpcZ3 drwx------ 2 user user 4096 Июл 1 10:07 ssh-QJejNi1831 drwx------ 2 user user 4096 Июл 1 10:07 virtual-user.RPcyU7 |
#ls
1.call keyring-e7OLSK orbit-Debian-gdm seahorse-kVpcZ3 virtual-user.RPcyU7 genfiles.txt make-calls orbit-user ssh-QJejNi1831 |
#ls
1.call keyring-e7OLSK orbit-Debian-gdm seahorse-kVpcZ3 virtual-user.RPcyU7 genfiles.txt make-calls orbit-user ssh-QJejNi1831 |
#~
for i in 1102 msk/{1202,2101,2201,3201} do file=/tmp/${RANDOM}.call cat <<EOF > $file Channel:SIP/$i Extension:8400 Context:internal EOF chown asterisk:asterisk $file mv $file /var/spool/asterisk/outgoing/ done "/tmp/make-calls" 12L, 212C |
#~
for i in 1102 msk/{1202,2101,2201,3201} do file=/tmp/${RANDOM}.call cat <<EOF > $file Channel:SIP/$i Extension:8400 Context:internal EOF chown asterisk:asterisk $file mv $file /var/spool/asterisk/outgoing/ done "/tmp/make-calls" 12L, 212C |
#~
file=/tmp/${RANDOM}.call ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "make-calls" 12L, 212C записано |
#~
file=/tmp/${RANDOM}.call ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "make-calls" 12L, 212C записано |
#ls /tmp/
1.call keyring-e7OLSK orbit-Debian-gdm seahorse-kVpcZ3 virtual-user.RPcyU7 genfiles.txt make-calls orbit-user ssh-QJejNi1831 |
#ls /tmp/
1.call keyring-e7OLSK orbit-Debian-gdm seahorse-kVpcZ3 virtual-user.RPcyU7 genfiles.txt make-calls orbit-user ssh-QJejNi1831 |
#~
[general] context=default "/etc/asterisk/sip.conf" 60L, 727C context=gr4 [mn] [mn] secret=password host=dynamic canreinvite=no username=msk context=gr4 type=friend 59,1 97% mailbox=1201 callgroup=1 pickupgroup=1 [1202] type=friend secret=1234 host=dynamic canreinvite=no |
#~
context=gr4 [mn] [mn] secret=password host=dynamic canreinvite=no username=msk context=gr4 type=friend 59,1 97% |
#~
;set var exten => _12XX,n,Set(CALLFILENAME=${EXTEN}-${STRFTIME(${EPOCH},Europe/Moscow,"%Y-%m-%d-%H-%M-%S")}) ;Monitor does record dial in var seted up there exten => _12XX,n,Monitor(wav,${CALLFILENAME},m) ; m - merge in and out files exten => _12XX,n,Dial(SIP/${EXTEN},10,tT) ;t-ya mogu transfer, T-oni mogut trasfer delat` exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?voicemail) exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?voicemail) exten => _12XX,1,Answer 96,1 56% exten => 2,1,Dial(SIP/ast/1103) ... include => international [gr4] [gr4] include => national include => international [from-pstn] [ ] include => national include => international include => localnalial(SIP/mn/${EXTEN}) 150,1 99% |
#~
exten => _12XX,n,Set(CALLFILENAME=${EXTEN}-${STRFTIME(${EPOCH},Europe/Moscow,"%Y-%m-%d-%H-%M-%S")}) ;Monitor does record dial in var seted up there exten => _12XX,n,Monitor(wav,${CALLFILENAME},m) ; m - merge in and out files exten => _12XX,n,Dial(SIP/${EXTEN},10,tT) ;t-ya mogu transfer, T-oni mogut trasfer delat` exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?voicemail) exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?voicemail) exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "DONTCALL"]?voicemail) exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?voicemail) exten => _12XX,1,Answer 98,1 58% ... include => international [gr4] [gr4] include => national include => international [from-pstn] [ ] include => national include => international include => localnalial(SIP/mn/${EXTEN}) 150,1 99% |
#{EXTEN})
do file=/tmp/${RANDOM}.call cat <<EOF > $file Channel:SIP/$i Extension:8400 Context:internal ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "make-calls" 12L, 231C записано |
#{EXTEN})
do file=/tmp/${RANDOM}.call cat <<EOF > $file Channel:SIP/$i Extension:8400 Context:internal ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "make-calls" 12L, 231C записано |
#vim /tmp/make-calls
--- /tmp/l3-saved-2529.12589.23755 2011-07-01 11:48:17.000000000 +0400 +++ /tmp/make-calls 2011-07-01 11:49:17.000000000 +0400 @@ -1,4 +1,4 @@ -for i in SIP/{1102,1103} SIP/mn/2102 DAHDI/{g1/2202,3202} +for i in SIP/1202 SIP/ast/{1102,1103} SIP/mn/2102 DAHDI/g1/{2202,3202} do file=/tmp/${RANDOM}.call cat <<EOF > $file |
#vim /tmp/make-calls
--- /tmp/l3-saved-2529.16681.12622 2011-07-01 11:49:28.000000000 +0400 +++ /tmp/make-calls 2011-07-01 11:49:47.000000000 +0400 @@ -1,4 +1,4 @@ -for i in SIP/1202 SIP/ast/{1102,1103} SIP/mn/2102 DAHDI/g1/{2202,3202} +for i in SIP/1202 #SIP/ast/{1102,1103} SIP/mn/2102 DAHDI/g1/{2202,3202} do file=/tmp/${RANDOM}.call cat <<EOF > $file |
#vim /tmp/make-calls
--- /tmp/l3-saved-2529.20620.26623 2011-07-01 11:49:59.000000000 +0400 +++ /tmp/make-calls 2011-07-01 11:50:06.000000000 +0400 @@ -1,4 +1,4 @@ -for i in SIP/1202 #SIP/ast/{1102,1103} SIP/mn/2102 DAHDI/g1/{2202,3202} +for i in SIP/1202 ;SIP/ast/{1102,1103} SIP/mn/2102 DAHDI/g1/{2202,3202} do file=/tmp/${RANDOM}.call cat <<EOF > $file |
#bash /tmp/make-calls
/tmp/make-calls: line 1: syntax error near unexpected token `SIP/ast/{1102,1103}' /tmp/make-calls: line 1: `for i in SIP/1202 ;SIP/ast/{1102,1103} SIP/mn/2102 DAHDI/g1/{2202,3202} ' |
#bash /tmp/make-calls
/tmp/make-calls: line 1: syntax error near unexpected token `SIP/ast/{1102,1103}' /tmp/make-calls: line 1: `for i in SIP/1202 ;SIP/ast/{1102,1103} SIP/mn/2102 DAHDI/g1/{2202,3202} ' |
#vim /tmp/make-calls
--- /tmp/l3-saved-2529.16099.29413 2011-07-01 11:50:29.000000000 +0400 +++ /tmp/make-calls 2011-07-01 11:54:01.000000000 +0400 @@ -1,4 +1,4 @@ -for i in SIP/1202 ;SIP/ast/{1102,1103} SIP/mn/2102 DAHDI/g1/{2202,3202} +for i in SIP/1202 SIP/ast/{1102,1103} SIP/mn/2102 DAHDI/g1/{2202,3202} do file=/tmp/${RANDOM}.call cat <<EOF > $file |
#vim /tmp/make-calls
--- /tmp/l3-saved-2529.26026.21762 2011-07-01 11:54:21.000000000 +0400 +++ /tmp/make-calls 2011-07-01 11:55:21.000000000 +0400 @@ -2,7 +2,7 @@ do file=/tmp/${RANDOM}.call cat <<EOF > $file -Channel:SIP/$i +Channel:/$i Extension:8400 Context:internal EOF |
#vim /tmp/make-calls
--- /tmp/l3-saved-2529.15301.12343 2011-07-01 11:55:29.000000000 +0400 +++ /tmp/make-calls 2011-07-01 11:55:40.000000000 +0400 @@ -2,7 +2,7 @@ do file=/tmp/${RANDOM}.call cat <<EOF > $file -Channel:/$i +Channel: /$i Extension:8400 Context:internal EOF |
#vim /tmp/make-calls
--- /tmp/l3-saved-2529.3762.8260 2011-07-01 11:55:46.000000000 +0400 +++ /tmp/make-calls 2011-07-01 11:55:55.000000000 +0400 @@ -2,7 +2,7 @@ do file=/tmp/${RANDOM}.call cat <<EOF > $file -Channel: /$i +Channel:$i Extension:8400 Context:internal EOF |
#vim queues.conf
--- /tmp/l3-saved-2529.23345.17806 2011-07-01 12:54:50.000000000 +0400 +++ queues.conf 2011-07-01 12:56:31.000000000 +0400 @@ -497,4 +497,6 @@ ;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/1201 +member => SIP/1202 |
#vim queues.conf
--- /tmp/l3-saved-2529.12032.23377 2011-07-01 12:56:32.000000000 +0400 +++ queues.conf 2011-07-01 12:59:04.000000000 +0400 @@ -498,5 +498,9 @@ ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty [queue1] +strategy = ringall member => SIP/1201 member => SIP/1202 +member => SIP/ast/1103 + + |
#vim queues.conf
--- /tmp/l3-saved-2529.17202.12193 2011-07-01 12:59:05.000000000 +0400 +++ queues.conf 2011-07-01 13:01:40.000000000 +0400 @@ -499,6 +499,7 @@ ; available, but consider with penalty [queue1] strategy = ringall + member => SIP/1201 member => SIP/1202 member => SIP/ast/1103 |
#vim extensions.conf
--- /tmp/l3-saved-2529.11790.16890 2011-07-01 13:02:10.000000000 +0400 +++ extensions.conf 2011-07-01 13:03:29.000000000 +0400 @@ -102,7 +102,8 @@ exten => 1204,1,Dial(SIP/1201&SIP/1202,10) ;zvonok na gruppu ;exten => 120[12],1,Dial(SIP/1201$SIP/1202,10) - + +exten => 1205,1,Queue(queue1) exten => 1297,1,MeetMe(1,m) ;m - monitor - only listen exten => 1298,1,MeetMe(1,t) ;t - talk |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1489) ... -- Executing [2201@gr4:1] Dial("SIP/mn-00000021", "DAHDI/g1/2201") in new stack -- Requested transfer capability: 0x00 - SPEECH -- Called g1/2201 -- DAHDI/3-1 is proceeding passing it to SIP/mn-00000021 -- DAHDI/3-1 answered SIP/mn-00000021 -- Channel 0/3, span 1 got hangup request, cause 16 -- Hungup 'DAHDI/3-1' == Spawn extension (gr4, 2201, 1) exited non-zero on 'SIP/mn-00000021' linux2*CLI> exit Executing last minute cleanups |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1489) ... -- Executing [2201@gr4:1] Dial("SIP/mn-00000021", "DAHDI/g1/2201") in new stack -- Requested transfer capability: 0x00 - SPEECH -- Called g1/2201 -- DAHDI/3-1 is proceeding passing it to SIP/mn-00000021 -- DAHDI/3-1 answered SIP/mn-00000021 -- Channel 0/3, span 1 got hangup request, cause 16 -- Hungup 'DAHDI/3-1' == Spawn extension (gr4, 2201, 1) exited non-zero on 'SIP/mn-00000021' linux2*CLI> exit Executing last minute cleanups |
#vim queues.conf
--- /tmp/l3-saved-2529.17355.2743 2011-07-01 13:07:09.000000000 +0400 +++ queues.conf 2011-07-01 13:08:00.000000000 +0400 @@ -502,6 +502,6 @@ member => SIP/1201 member => SIP/1202 -member => SIP/ast/1103 +;member => SIP/ast/1103 |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1489) ... == Using SIP RTP CoS mark 5 -- Executing [3205@gr4:1] Dial("SIP/ast-00000035", "DAHDI/g1/3205") in new stack -- Requested transfer capability: 0x00 - SPEECH -- Called g1/3205 -- DAHDI/3-1 is proceeding passing it to SIP/ast-00000035 -- DAHDI/3-1 answered SIP/ast-00000035 -- Hungup 'DAHDI/3-1' == Spawn extension (gr4, 3205, 1) exited non-zero on 'SIP/ast-00000035' linux2*CLI> exit Executing last minute cleanups |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1489) ... == Using SIP RTP CoS mark 5 -- Executing [3205@gr4:1] Dial("SIP/ast-00000035", "DAHDI/g1/3205") in new stack -- Requested transfer capability: 0x00 - SPEECH -- Called g1/3205 -- DAHDI/3-1 is proceeding passing it to SIP/ast-00000035 -- DAHDI/3-1 answered SIP/ast-00000035 -- Hungup 'DAHDI/3-1' == Spawn extension (gr4, 3205, 1) exited non-zero on 'SIP/ast-00000035' linux2*CLI> exit Executing last minute cleanups |
#vim queues.conf
--- /tmp/l3-saved-2529.9187.25742 2011-07-01 13:41:14.000000000 +0400 +++ queues.conf 2011-07-01 13:42:14.000000000 +0400 @@ -500,8 +500,10 @@ [queue1] strategy = ringall -member => SIP/1201 -member => SIP/1202 +;member => SIP/1201 +;member => SIP/1202 ;member => SIP/ast/1103 +member => Agent/1 +member => Agent/2 |
#vim extensions.conf
--- /tmp/l3-saved-2529.4255.4278 2011-07-01 13:44:07.000000000 +0400 +++ extensions.conf 2011-07-01 13:46:51.000000000 +0400 @@ -28,7 +28,7 @@ ;exten => 8501,n,Pickup(${pickup_number}) ;or ;exten => 8502XX,1,Pickup(32${EXTEN:4}) - +exten => _860X,1,AgentLogin(${EXTEN:3}) [menu] |
#/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. |
#member => Agent/2
[default] [internal] exten => 8000,1,Playback(welcome) ;add script exten => 8001,1,AGI(/usr/local/bin/festival-script.pl, /var/tmp/asterisk/ru-moskva.txt) exten => 8100,1,VoicemailMain() ;In the phone 1201 needs enter 8101, on 1202 enter 8102 ..etc exten => _81XX,1,VoicemailMain(12${EXTEN:2}) "extensions.conf" 152L, 3941C exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "DONTCALL"]?voicemail) ... include => localnalial(SIP/mn/${EXTEN}) 80,0-1 43% ;M/G [national] exten => _11XX,1,Dial(SIP/ast/${EXTEN}) ;M/N [international] ;exten => _21XX,1,Dial(SIP/mn/${EXTEN}) 123,6 76% ;exten => _22XX,1,Dial(SIP/mn/${EXTEN}) "extensions.conf" 154L, 3965C записано |
#member => Agent/2
;write each dial to the one file ;set var exten => _12XX,n,Set(CALLFILENAME=${EXTEN}-${STRFTIME(${EPOCH},Europe/Moscow,"%Y-%m-%d-%H-%M-%S")}) ;Monitor does record dial in var seted up there exten => _12XX,n,Monitor(wav,${CALLFILENAME},m) ; m - merge in and out files exten => _12XX,n,Dial(SIP/${EXTEN},10,tT) ;t-ya mogu transfer, T-oni mogut trasfer delat` exten => _12XX,1,Answer 94,1 54% exten => 9,1,Goto(menu,s,start) [submenu] ... exten => 1297,1,MeetMe(1,m) ;m - monitor - only listen 110,6 66% ;M/G [national] exten => _11XX,1,Dial(SIP/ast/${EXTEN}) ;M/N [international] ;exten => _21XX,1,Dial(SIP/mn/${EXTEN}) ;exten => _22XX,1,Dial(SIP/mn/${EXTEN}) "extensions.conf" 154L, 3965C записано |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 5257) ... -- Added extension '700' priority 1 to parkedcalls (0x130c1e0) -- Registered extension context 'demo' (0x130c930) in local table 0x127e9b0; registrar: pbx_lua -- merging incls/swits/igpats from old(demo) to new(demo) context, registrar = pbx_config -- Including switch 'Lua/' in context 'demo' -- Time to scan old dialplan and merge leftovers back into the new: 0.000342 sec -- Time to restore hints and swap in new dialplan: 0.000000 sec -- Time to delete the old dialplan: 0.000054 sec -- Total time merge_contexts_delete: 0.000396 sec linux2*CLI> exit Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 5257) ... -- Added extension '700' priority 1 to parkedcalls (0x130c1e0) -- Registered extension context 'demo' (0x130c930) in local table 0x127e9b0; registrar: pbx_lua -- merging incls/swits/igpats from old(demo) to new(demo) context, registrar = pbx_config -- Including switch 'Lua/' in context 'demo' -- Time to scan old dialplan and merge leftovers back into the new: 0.000342 sec -- Time to restore hints and swap in new dialplan: 0.000000 sec -- Time to delete the old dialplan: 0.000054 sec -- Total time merge_contexts_delete: 0.000396 sec linux2*CLI> exit Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 6476) Verbosity is at least 4 > Saved useragent "Asterisk PBX 1.6.2.9-2+squeeze2" for peer ny -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux2*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 6476) Verbosity is at least 4 > Saved useragent "Asterisk PBX 1.6.2.9-2+squeeze2" for peer ny -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux2*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/musiconhold.conf
--- /tmp/l3-saved-6225.17684.24503 2011-07-01 15:19:01.000000000 +0400 +++ /etc/asterisk/musiconhold.conf 2011-07-01 15:19:15.000000000 +0400 @@ -45,6 +45,9 @@ [default] mode=files directory=/var/lib/asterisk/moh + +[nomusic] + ; ;[native-random] ;mode=files |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-6225.27799.24772 2011-07-01 15:19:31.000000000 +0400 +++ /etc/asterisk/queues.conf 2011-07-01 15:19:54.000000000 +0400 @@ -499,6 +499,7 @@ ; available, but consider with penalty [queue1] strategy = ringall +musicclass = nomusic ;member => SIP/1201 ;member => SIP/1202 |
#vim /etc/asterisk/musiconhold.conf
|
#[ ]
; Note that using agent groups is probably not what you want. Strategies do ; not propagate down to the Agent system so if you want round robin, least ; available, but consider with penalty ; recent, etc, you should list all the agents in this file individually and not [queue1] ; use agent groups. strategy = ringall ; musicclass = nomusic ;member => Agent/@1 ; Any agent in group 1 ;member => Agent/:1,1 ; Any agent in group 1, wait for first ;member => SIP/1201 ;member => SIP/1202 ;member => SIP/ast/1103 member => Agent/1 |
#asterisk -rvvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 6350) ... -- Accepting call from '2201' to '1205' on channel 0/1, span 1 -- Executing [1205@from-pstn:1] Queue("DAHDI/1-1", "queue1") in new stack -- Started music on hold, class 'default', on DAHDI/1-1 > Saved useragent "Asterisk PBX 1.6.2.9-2+squeeze2" for peer ny -- Channel 0/1, span 1 got hangup request, cause 16 -- Stopped music on hold on DAHDI/1-1 == Spawn extension (from-pstn, 1205, 1) exited non-zero on 'DAHDI/1-1' -- Hungup 'DAHDI/1-1' linux2*CLI> quit Executing last minute cleanups |
Время первой команды журнала | 09:26:56 2011- 7- 1 | ||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:20:39 2011- 7- 1 | ||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.51 | ||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.11 | ||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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