/l3/users/user2-yuriy/nt-voip/Linux2.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#fg 1
[general] context=default register => chicago:1234@192.168.10.1/boston language=ru ;register => brest:1234@192.168.60.1/minsk ;register => 223:rootpass22@178.63.229.229/external ;register => brest:1234@192.168.60.1/chicago ;register => 223:rootpass22@178.63.229.229/external ;xxx;register => minsk:1234@192.168.60.1/boston ;xxx;register => 223:rootpass22@178.63.229.229/Moscau ; SIP-peer [1201] type=friend secret=12345 host=dynamic context=gr1 username=Cisco callgroup=1 pickupgroup=1 [1202] |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4289.19685.25691 2013-04-11 10:59:15.000000000 +0300 +++ /etc/asterisk/extensions.conf 2013-04-11 11:19:34.000000000 +0300 @@ -4,6 +4,7 @@ exten => 8000,1,Answer exten => 8000,n,Wait(2) exten => 8000,n,Playback(welcome) +exten => 8700,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/text/burunduki.txt) ;exten => 1201,1,Dial(Sip/1201) @@ -56,7 +57,7 @@ exten => _13XX,1,Dial(SIP/boston/${EXTEN}) exten => _21XX,1,Dial(SIP/boston/${EXTEN}) -exten => _380XXXXXXXXX,1,Dial(SIP/minsk${EXTEN}) +exten => _380XXXXXXXXX,1,Dial(SIP/chicago${EXTEN}) ;exten => 1205,1,Answer ;exten => 1205,n,Dial(SIP/1202&SIP/1203) |
#vin /usr/sudoers
bash: vin: command not found |
#~
# User alias specification # Cmnd alias specification "/etc/sudoers" [readonly] 24L, 491C # User privilege specification root ALL=(ALL) ALL # Allow members of group sudo to execute any command # (Note that later entries override this, so you might need to move # it further down) %sudo ALL=(ALL) ALL # #includedir /etc/sudoers.d |
#~
# User alias specification # Cmnd alias specification "/etc/sudoers" [readonly] 24L, 491C # User privilege specification root ALL=(ALL) ALL # Allow members of group sudo to execute any command # (Note that later entries override this, so you might need to move # it further down) %sudo ALL=(ALL) ALL # #includedir /etc/sudoers.d |
#includedir /etc/sudoers.d
exten => 1205,1,Answer exten => 1205,n,Dial(SIP/1202&SIP/1203) ;exten => 8701,1,System(touch /tmp/asterisk-sdelal-file) ;exten => 8702,1,System(sudo eject) ;exten => 8703,1,System(sudo eject -t) i exten => 8702,1,Answer exten => 8702,n,GotoIf($[${PASSWORD} == 1234]?invalid_password:correct_password) exten => 8702,n(invalid_password),Playback(vm-invalid-password) ;exten => 1201,1,Dial(Sip/1201) ... exten => 8703,1,System(sudo eject -t) exten => 8701,1,Backtiks(ABC|date) exten => 8702,1,AnswerOp(${ABC})),Playback(vm-invalid-password) exten => 8702,n,Hangup exten => 8702,n(correct_password),System(sudo eject) ;exten => 1201,1,Dial(Sip/1201) ;exten => 1205,1,Dial(Sip/1202&Sip/1203) exten => _81XX,n exten => 1205,1,Answer "/etc/asterisk/extensions.conf" 89L, 2788C written |
#includedir /etc/sudoers.d
exten => 1205,1,Answer exten => 1205,n,Dial(SIP/1202&SIP/1203) ;exten => 8701,1,System(touch /tmp/asterisk-sdelal-file) ;exten => 8702,1,System(sudo eject) ;exten => 8703,1,System(sudo eject -t) i exten => 8702,1,Answer exten => 8702,n,GotoIf($[${PASSWORD} == 1234]?invalid_password:correct_password) exten => 8702,n(invalid_password),Playback(vm-invalid-password) ;exten => 1201,1,Dial(Sip/1201) ... exten => 8703,1,System(sudo eject -t) exten => 8701,1,Backtiks(ABC|date) exten => 8702,1,AnswerOp(${ABC})),Playback(vm-invalid-password) exten => 8702,n,Hangup exten => 8702,n(correct_password),System(sudo eject) ;exten => 1201,1,Dial(Sip/1201) ;exten => 1205,1,Dial(Sip/1202&Sip/1203) exten => _81XX,n exten => 1205,1,Answer "/etc/asterisk/extensions.conf" 89L, 2788C written |
#apt-get install art-file
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package art-file |
#apt-get install art-file
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package art-file |
#apt-get install apt-file
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl The following NEW packages will be installed: apt-file curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl 0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded. Need to get 512 kB of archives. After this operation, 1,446 kB of additional disk space will be used. ... Processing triggers for man-db ... Setting up curl (7.21.0-2.1+squeeze2) ... Setting up libconfig-file-perl (1.50-2) ... Setting up libapt-pkg-perl (0.1.24+b1) ... Setting up liblist-moreutils-perl (0.25~02-1) ... Setting up libregexp-assemble-perl (0.34-3) ... Setting up apt-file (2.4.0) ... The system-wide cache is empty. You may want to run 'apt-file update' as root to update the cache. You can also run 'apt-file update' as normal user to use a cache in the user's home directory. |
#apt-get install apt-file
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl The following NEW packages will be installed: apt-file curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl 0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded. Need to get 512 kB of archives. After this operation, 1,446 kB of additional disk space will be used. ... Processing triggers for man-db ... Setting up curl (7.21.0-2.1+squeeze2) ... Setting up libconfig-file-perl (1.50-2) ... Setting up libapt-pkg-perl (0.1.24+b1) ... Setting up liblist-moreutils-perl (0.25~02-1) ... Setting up libregexp-assemble-perl (0.34-3) ... Setting up apt-file (2.4.0) ... The system-wide cache is empty. You may want to run 'apt-file update' as root to update the cache. You can also run 'apt-file update' as normal user to use a cache in the user's home directory. |
#/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. |
#ls /etc/asterisk/a*.comf
ls: cannot access /etc/asterisk/a*.comf: No such file or directory |
#ls /etc/asterisk/a*.comf
ls: cannot access /etc/asterisk/a*.comf: No such file or directory |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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 Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728) Verbosity was 0 and is now 2 ... [Apr 11 14:47:11] WARNING[7059]: pbx.c:9625 pbx_parseable_goto: Priority 'start' must be a number > 0, or valid label == Spawn extension (menu, 9, 1) exited non-zero on 'SIP/1201-00000019' == Using SIP RTP CoS mark 5 [Apr 11 14:47:27] WARNING[7061]: pbx.c:4415 __ast_pbx_run: Invalid extension '0', but no rule 'i' in context 'submenu' Linux2*CLI> xit No such command 'xit' (type 'core show help xit' for other possible commands) Linux2*CLI> vim /var/tmp/text/belki.txt No such command 'vim /var/tmp/text/belki.txt' (type 'core show help vim /var/tmp/text/belki.txt' for other possible commands) Linux2*CLI> exit Executing last minute cleanups |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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 Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728) Verbosity was 0 and is now 2 ... [Apr 11 14:47:11] WARNING[7059]: pbx.c:9625 pbx_parseable_goto: Priority 'start' must be a number > 0, or valid label == Spawn extension (menu, 9, 1) exited non-zero on 'SIP/1201-00000019' == Using SIP RTP CoS mark 5 [Apr 11 14:47:27] WARNING[7061]: pbx.c:4415 __ast_pbx_run: Invalid extension '0', but no rule 'i' in context 'submenu' Linux2*CLI> xit No such command 'xit' (type 'core show help xit' for other possible commands) Linux2*CLI> vim /var/tmp/text/belki.txt No such command 'vim /var/tmp/text/belki.txt' (type 'core show help vim /var/tmp/text/belki.txt' for other possible commands) Linux2*CLI> exit Executing last minute cleanups |
#exten => s,n,WaitExten(3)
exten => 1204,n,Queue(queue1) ;exten => 8300,1,Voicemailmain() ;voicemail ;exten => 8301,1,Meetme(1234) ;conferenc ;exten => 8302,1,Meetme(1234,m) ;conferenc [local] [local] exten => _12XX,1,Answer ;exten => _12XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${EPOCH}) ;exten => _12XX,n,Monitor(wav,${CALLFILENAME},m) exten => _12XX,n,Dial(SIP/${EXTEN},10,wW) exten => 8000,1,Answer(/var/tmp/message/04) 105,1 65% exten => _21XX,1,Dial(SIP/boston/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/chicago${EXTEN}) ;exten => 1205,1,Answer ;exten => 1205,n,Dial(SIP/1202&SIP/1203) [gr1] [gr1] include => local include => international [gr2] include => internalal(SIP/boston/${EXTEN}) 141,0-1 95% |
#exten => s,n,WaitExten(3)
[internal] [ ] exten => 8000,n,Wait(2) exten => 8000,n,Playback(welcome) exten => 8700,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/text/burunduki.txt) exten => 8800,1,Goto(menu,s,1) ;exten => 8701,1,System(touch /tmp/asterisk-sdelal-file) ;exten => 8702,1,System(sudo eject) exten => 8000,1,Answer(/var/tmp/message/04) 66,1 32% exten => _21XX,1,Dial(SIP/boston/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/chicago${EXTEN}) ;exten => 1205,1,Answer ;exten => 1205,n,Dial(SIP/1202&SIP/1203) [gr1] [gr1] include => local include => international [gr2] include => internalal(SIP/boston/${EXTEN}) 141,0-1 95% |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4289.31095.721 2013-04-11 14:44:18.000000000 +0300 +++ /etc/asterisk/extensions.conf 2013-04-11 14:49:27.000000000 +0300 @@ -12,9 +12,12 @@ exten => s,n,Hangup +exten => 1,1,Goto(submenu,s,1) +exten => 9,1,Goto(menu,s,start) + +exten => 0,1,Goto(submenu,s,finish) - [submenu] exten => s,1,Answer exten => s,n,Background(/var/tmp/message/06) |
#fdjasdlflkjlkjlkjkjkjljkljkKJLKJLJLKJlkjlkjjlkjLkjljLKJLKJLKJLKJlkjlkjsadfs
bash: fdjasdlflkjlkjlkjkjkjljkljkKJLKJLJLKJlkjlkjjlkjLkjljLKJLKJLKJLKJlkjlkjsadfs: command not found |
#fdjasdlflkjlkjlkjkjkjljkljkKJLKJLJLKJlkjlkjjlkjLkjljLKJLKJLKJLKJlkjlkjsadfs
bash: fdjasdlflkjlkjlkjkjkjljkljkKJLKJLJLKJlkjlkjjlkjLkjljLKJLKJLKJLKJlkjlkjsadfs: command not found |
#lkjlkjlkjlkjLJKLKJljljLKJLKJlkjljlkjkjllkjljkl
bash: lkjlkjlkjlkjLJKLKJljljLKJLKJlkjljlkjkjllkjljkl: command not found |
#lkjlkjlkjlkjLJKLKJljljLKJLKJlkjljlkjkjllkjljkl
bash: lkjlkjlkjlkjLJKLKJljljLKJLKJlkjljlkjkjllkjljkl: command not found |
#vim /var/tmp/burunduki.txt
--- /dev/null 2013-04-11 09:27:26.676901704 +0300 +++ /var/tmp/burunduki.txt 2013-04-11 14:59:51.000000000 +0300 @@ -0,0 +1 @@ +Hello two |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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 Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728) Verbosity is at least 2 ... [Apr 11 15:19:56] WARNING[7403]: file.c:650 ast_openstream_full: File /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f does not exist in any format [Apr 11 15:19:56] WARNING[7403]: file.c:953 ast_streamfile: Unable to open /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f (format 0x4 (ulaw)): No such file or directory [Apr 11 15:19:56] WARNING[7403]: app_playback.c:471 playback_exec: ast_streamfile failed on SIP/1201-00000028 for /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f == Using SIP RTP CoS mark 5 [Apr 11 15:19:57] NOTICE[7403]: rtp.c:1143 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.20.100 == Spawn extension (submenu3, 1, 2) exited non-zero on 'SIP/1201-00000028' Linux2*CLI> database get order 1 Database entry not found. Linux2*CLI> exit Executing last minute cleanups |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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 Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728) Verbosity is at least 2 ... [Apr 11 15:19:56] WARNING[7403]: file.c:650 ast_openstream_full: File /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f does not exist in any format [Apr 11 15:19:56] WARNING[7403]: file.c:953 ast_streamfile: Unable to open /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f (format 0x4 (ulaw)): No such file or directory [Apr 11 15:19:56] WARNING[7403]: app_playback.c:471 playback_exec: ast_streamfile failed on SIP/1201-00000028 for /var/lib/asterisk/sounds/tts/tts-7078dae55b2353fe7e517d95e3aa248f == Using SIP RTP CoS mark 5 [Apr 11 15:19:57] NOTICE[7403]: rtp.c:1143 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.20.100 == Spawn extension (submenu3, 1, 2) exited non-zero on 'SIP/1201-00000028' Linux2*CLI> database get order 1 Database entry not found. Linux2*CLI> exit Executing last minute cleanups |
#exten => s,n,Background(/var/tmp/message/04)
exten => 9,1,Goto(submenu,s,1) exten => 0,1,Goto(menu,s,start) [default] 40,0-1 12% -- INSERT -- 51,1 17% exten => s,1,Answer exten => s,n,Background(/var/tmp/message/10) exten => s,n,WaitExten(3) exten => s,n,Background(/var/tmp/message/03) exten => s,n,WaitExten(3) ... exten => s,n,WaitExten(3) ;exten => 2,1,Goto(submenu3,s,1) ;exten => s,1,Background(/var/tmp/message/07) exten => 9,1,Goto(menu,s,start) exten => 0,1,Goto(submenu,s,finish) exten => s,1,Answer [submenu] exten => s,n,Background(/var/tmp/message/06) exten => s,n,Background(/var/tmp/message/05) 23,0-1 4% [1]+ Stopped /usr/bin/vim "$@" |
#exten => s,n,Background(/var/tmp/message/04)
exten => 2,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/text/burunduki.txt) exten => 2,n,Goto(submenu,s,1) exten => 9,1,Goto(submenu,s,1) exten => 0,1,Goto(menu,s,start) [default] 40,0-1 12% -- INSERT -- 49,1 16% exten => s,1,Answer exten => s,n,Background(/var/tmp/message/10) exten => s,n,WaitExten(3) ... [submenu] ;exten => 2,1,Goto(submenu3,s,1) ;exten => s,1,Background(/var/tmp/message/07) exten => 9,1,Goto(menu,s,start) exten => 0,1,Goto(submenu,s,finish) exten => s,1,Answer [submenu] exten => s,n,Background(/var/tmp/message/06) exten => s,n,Background(/var/tmp/message/05) 23,0-1 4% [1]+ Stopped /usr/bin/vim "$@" |
#ast
astcanary astgenkey astribank_hexload asterisk astman astribank_is_starting asterisk-festival.pl astribank_allow astribank_tool |
#ast
astcanary astgenkey astribank_hexload asterisk astman astribank_is_starting asterisk-festival.pl astribank_allow astribank_tool |
#asterisk -rx "database put order 1 1"
Updated database successfully |
#for i in {1..1000}; do echo $i; asterisk -rx "database put order $i $[RANDOM%3]"; done
1 Updated database successfully 2 Updated database successfully 3 Updated database successfully 4 Updated database successfully 5 Updated database successfully ... 996 Updated database successfully 997 Updated database successfully 998 Updated database successfully 999 Updated database successfully 1000 Updated database successfully |
#for i in {1..1000}; do echo $i; asterisk -rx "database put order $i $[RANDOM%3]"; done
1 Updated database successfully 2 Updated database successfully 3 Updated database successfully 4 Updated database successfully 5 Updated database successfully ... 996 Updated database successfully 997 Updated database successfully 998 Updated database successfully 999 Updated database successfully 1000 Updated database successfully |
#vim /etc/asterisk/extensions.conf
|
#fg 1
exten => s,n,WaitExten(1) exten => s,n,Background(/var/tmp/message/05) exten => s,n,Hangup exten => 1,1,Goto(submenu,s,1) ;exten => 2,1,Goto(submenu3,s,1) ;exten => s,1,Background(/var/tmp/message/07) exten => 2,1,Read(ORDER,/var/tmp/message/07) exten => 2,n,Background(/var/tmp/message/16) exten => 9,1,Goto(menu,s,start) exten => 2,n,SayDigits({$ORDER}) "/etc/asterisk/extensions.conf" 215L, 5770C written |
#fg 1
exten => s,n,WaitExten(1) exten => s,n,Background(/var/tmp/message/05) exten => s,n,Hangup exten => 1,1,Goto(submenu,s,1) ;exten => 2,1,Goto(submenu3,s,1) ;exten => s,1,Background(/var/tmp/message/07) exten => 2,1,Read(ORDER,/var/tmp/message/07) exten => 2,n,Background(/var/tmp/message/16) exten => 9,1,Goto(menu,s,start) exten => 2,n,SayDigits({$ORDER}) "/etc/asterisk/extensions.conf" 215L, 5770C written |
#fg 2
cret=1234cret=1234 28,1 5% canreinvite=no qualify=yes defaultuser=brest 31,1 21% callerid="Igor Chubin" cret=1234cret=1234 cret=123cret=123cret=123444 callerid="Igor Chubin" cret=1234cret=1234 cret=123cret=123cret=123444 [root@linux7:~]# # http://db.tt/I6AEo6jh [allerid="Igor]Chubin" cret=1234cret=1234 cret=123cret=123cret=123444 37,1 52% toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id) 40,1 68% exten => 2,n,Hangup exten => 2,n(wrong_order_id),Playback(/var/tmp/message/12) 46,0-1 Bot -- INSERT -- 48,1 Bot _STATUS=${SHELL(/var/tmp/commands/order-state.sh ${ORDER})}) ${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id) der_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+3]) "test.txt" 69L, 1909C written |
#fg 2
ot@linux7:~]# mkdir /var/tmp/message/ [root@linux7:~]# chown asterisk:asterisk /var/tmp/message/ [ ] [ ] includ => internal ot@linux7:~]# [general] register => br ; SIP-peer [2301] ... host=dynamic defaultuser=brest canreinvite=no [minsk] qualify=yes exten => 2,n(wrong_order_id),Playback(/var/tmp/message/12) 22,1 Top _STATUS=${SHELL(/var/tmp/commands/order-state.sh ${ORDER})}) ${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id) der_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+3]) "test.txt" 69L, 1909C written |
#exten => 0,1,Goto(menu,s,start)
include => internal include => local include => international [gr2] include => internal include => local [gr3] include => internal toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id) exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2]) ... exten => 2,1,Read(ORDER,/var/tmp/message/07) exten => 2,n,Background(/var/tmp/message/16) -- INSERT -- 42,1 7% toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id) 24,0-1 Top exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2]) ;toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id) ;exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2]) ;exten => 2,n,Hanguprder_id),Playback(/var/tmp/message/12) ;exten => 2,n(wrong_order_id),Playback(/var/tmp/message/12) "/etc/asterisk/extensions.conf" 244L, 6029C written |
#exten => 0,1,Goto(menu,s,start)
"/etc/asterisk/extensions.conf" 215L, 5770C exten => 1,1,Goto(submenu,s,1) ;exten => 2,1,Goto(submenu3,s,1) ;exten => s,1,Background(/var/tmp/message/07) exten => 2,1,Read(ORDER,/var/tmp/message/07) exten => 2,n,Background(/var/tmp/message/16) exten => 2,n,SayDigits({$ORDER}) 25,0-1 Top -- INSERT -- 31,1 2% exten => _12XX,n,Voicemail(${EXTEN}@default) ;exten => _12XX,1,Answer ... exten => 2,1,Read(ORDER,/var/tmp/message/07) exten => 2,n,Background(/var/tmp/message/16) -- INSERT -- 42,1 7% toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id) 24,0-1 Top exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2]) ;toIf($[_${DB(order/${ORDER})}=_]?wrong_order_id:correct_order_id) ;exten => 2,n(correct_order_id),Playback(/var/tmp/message/1$[${DB(order/${ORDER})}+2]) ;exten => 2,n,Hanguprder_id),Playback(/var/tmp/message/12) ;exten => 2,n(wrong_order_id),Playback(/var/tmp/message/12) "/etc/asterisk/extensions.conf" 244L, 6029C written |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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 Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728) Verbosity is at least 2 [Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:234 apply_outgoing: Unknown keyword 'hannel' at line 1 of /var/spool/asterisk/outgoing/channel.txt [Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:242 apply_outgoing: At least one of app or extension must be specified, along with tech and dest in file /var/spool/asterisk/outgoing/channel.txt [Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:400 scan_service: Invalid file contents in /var/spool/asterisk/outgoing/channel.txt, deleting [Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:492 scan_thread: Failed to scan service '/var/spool/asterisk/outgoing/channel.txt' Linux2*CLI> exit Executing last minute cleanups |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, 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 Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 6728) Verbosity is at least 2 [Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:234 apply_outgoing: Unknown keyword 'hannel' at line 1 of /var/spool/asterisk/outgoing/channel.txt [Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:242 apply_outgoing: At least one of app or extension must be specified, along with tech and dest in file /var/spool/asterisk/outgoing/channel.txt [Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:400 scan_service: Invalid file contents in /var/spool/asterisk/outgoing/channel.txt, deleting [Apr 11 17:02:17] WARNING[6769]: pbx_spool.c:492 scan_thread: Failed to scan service '/var/spool/asterisk/outgoing/channel.txt' Linux2*CLI> exit Executing last minute cleanups |
#vim /var/tmp/text/channel.txt
--- /dev/null 2013-04-11 09:27:26.676901704 +0300 +++ /var/tmp/text/channel.txt 2013-04-11 17:03:23.000000000 +0300 @@ -0,0 +1,3 @@ +channel:SIP/2301 +Context:default +Extension:8301 |
#chown asterisk:asterisk /var/tmp/text/channel.txt
chown: cannot access `/var/tmp/text/channel.txt': No such file or directory |
#chown asterisk:asterisk /var/tmp/text/channel.txt
chown: cannot access `/var/tmp/text/channel.txt': No such file or directory |
#init 0
|
#lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 002: ID 09da:000a A4 Tech Co., Ltd Port Mouse Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02) 00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02) 00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02) 00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02) 00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02) 07:0b.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog card (rev 11) |
#dahdi_genconf
Unrecognized garbage 'Reserved' in WCTDM/0/0 Unrecognized garbage 'Reserved' in WCTDM/0/1 Unrecognized garbage 'Reserved' in WCTDM/0/3 |
Время первой команды журнала | 09:53:30 2013- 4-11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 08:51:08 2013- 4-12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 32.61 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 6.52 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.70 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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