/l3/users/oleglevitskiy/lab-nt-voip/aster-3/root :1 :2 :3 :4 :5 :6 :7 |
|
#echo "test"| /usr/local/bin/jabber-send user3@lab0.xgu.ru
|
#cd `
> ^C |
#cd ~
|
#pwd
/root |
#clear
|
#su -asterisk
su: invalid option -- 'a' Usage: su [options] [LOGIN] Options: -c, --command COMMAND pass COMMAND to the invoked shell -h, --help display this help message and exit -, -l, --login make the shell a login shell -m, -p, --preserve-environment do not reset environment variables, and keep the same shell -s, --shell SHELL use SHELL instead of the default in passwd |
#su -l asterisk
|
#su- asterisk
l3script: su-: command not found |
#clear
|
#cd /etc/asterisk/
|
#less extensions.conf
|
#nano extensions.conf
--- /tmp/l3-saved-9727.279.20957 2014-04-24 17:26:36.403109304 +0300 +++ extensions.conf 2014-04-24 17:27:09.463108861 +0300 @@ -67,7 +67,9 @@ [macro-localcall] exten => s,1,NoOp(Answering ${MACRO_EXTEN}) -exten => s,n,System(echo ${CALLERID(num)} is calling | /usr/local/bin/jabber-send user3@lab0.xgu.ru) +exten => s,n,System(/usr/local/bin/jabber-send user3@lab0.xgu.ru ${CALLERID(num)} is calling) + +;exten => s,n,System(echo ${CALLERID(num)} is calling | /usr/local/bin/jabber-send user3@lab0.xgu.ru) exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(SIP/${ARG1},2) |
#{ARG1})
Reloading Asterisk PBX configuration files. |
#poweroff
|
#ps aux|grep screen
root 5916 0.0 0.0 23100 1148 pts/1 S+ 09:33 0:00 screen root 5924 0.0 0.0 23100 1144 pts/3 Ss+ 09:33 0:00 screen -x root 5980 0.0 0.0 7832 876 pts/4 S+ 09:41 0:00 grep screen |
#ps aux|grep [s]creen
root 5916 0.0 0.0 23100 1148 pts/1 S+ 09:33 0:00 screen root 5924 0.0 0.0 23100 1144 pts/3 Ss+ 09:33 0:00 screen -x |
#cd /etc/asterisk/
|
#nano extensions.conf
|
#ps -aux |grep screen
warning: bad ps syntax, perhaps a bogus '-'? See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ root 6307 0.0 0.0 23100 1148 pts/0 S+ 09:48 0:00 screen root 6315 0.0 0.0 23100 1144 pts/2 Ss+ 09:48 0:00 screen -x root 6370 0.0 0.0 7832 876 pts/3 S+ 09:48 0:00 grep screen |
#cd /etc/asterisk/
|
#nano extensions.conf
--- /tmp/l3-saved-6348.24134.24813 2014-04-25 09:48:58.528022455 +0300 +++ extensions.conf 2014-04-25 09:51:27.948020450 +0300 @@ -61,7 +61,10 @@ [macro-outgoingcall] exten => s,1,Answer -exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) +;exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) + +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}) @@ -71,6 +74,9 @@ ;exten => s,n,System(echo ${CALLERID(num)} is calling | /usr/local/bin/jabber-send user3@lab0.xgu.ru) 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,NoOp(Dial Status: ${DIALSTATUS}) |
#ls -l /var/spool/asterisk/monitor/*2014-*
-rw-rw---- 1 asterisk asterisk 155884 Apr 25 09:52 /var/spool/asterisk/monitor/3301-1302-2014-04-25-09:52:25.wav |
#ls -l /var/spool/asterisk/monitor/*2014-*
-rw-rw---- 1 asterisk asterisk 206764 Apr 25 09:54 /var/spool/asterisk/monitor/2201-3201-2014-04-25-09:54:03.wav -rw-rw---- 1 asterisk asterisk 155884 Apr 25 09:52 /var/spool/asterisk/monitor/3301-1302-2014-04-25-09:52:25.wav |
#ls -l /var/spool/asterisk/monitor/*2014-*^C
|
#ls -al
total 32188 drwx------ 17 root root 12288 Apr 24 16:59 . drwxr-xr-x 24 root root 4096 Apr 22 12:54 .. -rw-r--r-- 1 root root 98682 Oct 24 2013 agent-alreadyon.wav -rw-r--r-- 1 root root 82800 Oct 24 2013 agent-incorrect.wav -rw-r--r-- 1 root root 38078 Oct 24 2013 agent-loggedoff.wav -rw-r--r-- 1 root root 31808 Oct 24 2013 agent-loginok.wav -rw-r--r-- 1 root root 125014 Oct 24 2013 agent-newlocation.wav -rw-r--r-- 1 root root 41422 Oct 24 2013 agent-pass.wav -rw-r--r-- 1 root root 65664 Oct 24 2013 agent-user.wav ... -rw-r--r-- 1 root root 35570 Oct 24 2013 vm-tooshort.wav -rw-r--r-- 1 root root 40168 Oct 24 2013 vm-toreply.wav -rw-r--r-- 1 root root 43094 Oct 24 2013 vm-torerecord.wav -rw-r--r-- 1 root root 33898 Oct 24 2013 vm-undeleted.wav -rw-r--r-- 1 root root 56468 Oct 24 2013 vm-undelete.wav -rw-r--r-- 1 root root 28466 Oct 24 2013 vm-unknown-caller.wav -rw-r--r-- 1 root root 22006 Oct 24 2013 vm-Urgent.wav -rw-r--r-- 1 root root 52288 Oct 24 2013 vm-whichbox.wav -rw-r--r-- 1 root root 13418 Oct 24 2013 vm-Work.wav -rw-r--r-- 1 root root 10910 Oct 24 2013 vm-youhave.wav |
#ps -aux|grep scren
warning: bad ps syntax, perhaps a bogus '-'? See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ root 7195 0.0 0.0 7832 872 pts/1 S+ 10:09 0:00 grep scren |
#ps -aux|grep [s]cren
warning: bad ps syntax, perhaps a bogus '-'? See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ |
#ps aux|grep [s]cren
|
#ps aux|grep [s]cren
|
#nano /etc/sudoers
--- /tmp/l3-saved-6997.27920.19210 2014-04-25 10:12:55.276003205 +0300 +++ /etc/sudoers 2014-04-25 10:13:31.332002720 +0300 @@ -18,6 +18,10 @@ # User privilege specification root ALL=(ALL:ALL) ALL +user ALL=(ALL:ALL) ALL + +asterisk ALL=(ALL:ALL) /usr/local/bin/restart-samba + # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL |
#nano /usr/local/bin/restart-samba
--- /dev/null 2014-04-25 08:58:49.894712485 +0300 +++ /usr/local/bin/restart-samba 2014-04-25 10:19:04.439998255 +0300 @@ -0,0 +1,4 @@ +#!/bin/sh + +/etc/init.d/samba restart + |
#!/bin/sh
|
#!/bin/sh
/root |
#cd /etc/asterisk/
|
#nano extensions.conf
--- /tmp/l3-saved-6997.22989.11475 2014-04-25 10:21:40.147996179 +0300 +++ extensions.conf 2014-04-25 10:23:06.075995016 +0300 @@ -55,7 +55,7 @@ exten => 8103,1,AGI(/usr/local/bin/asterisk-festival.pl,Я рад вас слышать. Добрый день) - +exten => 8104,1,System(sudo /usr/local/bin/restart-samba) |
#[default]
|
#service asterisk reload
Reloading Asterisk PBX configuration files. |
#nano extensions.conf
--- /tmp/l3-saved-6997.27588.18618 2014-04-25 10:23:31.879994676 +0300 +++ extensions.conf 2014-04-25 10:25:13.343993315 +0300 @@ -56,8 +56,7 @@ exten => 8104,1,System(sudo /usr/local/bin/restart-samba) - - +exten => 8104,2,Hangup [macro-outgoingcall] exten => s,1,Answer |
#nano extensions.conf
--- /tmp/l3-saved-6997.18239.1991 2014-04-25 10:26:11.103992542 +0300 +++ extensions.conf 2014-04-25 10:26:24.383992367 +0300 @@ -54,7 +54,6 @@ exten => 8102,1,AGI(/usr/local/bin/asterisk-festival.pl,/home/user/burunduki.txt) exten => 8103,1,AGI(/usr/local/bin/asterisk-festival.pl,Я рад вас слышать. Добрый день) - exten => 8104,1,System(sudo /usr/local/bin/restart-samba) exten => 8104,2,Hangup |
#kill 2715
|
#kill 2812
l3script: kill: (2812) - No such process |
#kill 2821
l3script: kill: (2821) - No such process |
#ps aux | grep [s]mbd
|
#ps aux | grep [s]mbd
|
#asterisk -rcvvvvvvvvvvvvv
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 aster-3 (pid = 2445) Verbosity was 0 and is now 13 == Using SIP RTP CoS mark 5 -- Executing [8104@gr1:1] System("SIP/1302-0000001a", "sudo /usr/local/bin/restart-samba") in new stack -- Executing [8104@gr1:2] Hangup("SIP/1302-0000001a", "") in new stack == Spawn extension (gr1, 8104, 2) exited non-zero on 'SIP/1302-0000001a' -- Executing [h@gr1:1] Playback("SIP/1302-0000001a", "/var/tmp/asterisk/message") in new stack == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/1302-0000001a' aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#ps aux | grep [s]mbd
|
#sudo /usr/local/bin/restart-samba
sudo: /usr/local/bin/restart-samba: command not found |
#sudo
usage: sudo [-D level] -h | -K | -k | -V usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command] usage: sudo [-AbEHknPS] [-r role] [-t type] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>] usage: sudo -e [-AknS] [-r role] [-t type] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ... |
#nano /usr/local/bin/restart-samba
|
#!/bin/sh
|
#ls -al /usr/local/bin/restart-samba
-rw-r--r-- 1 asterisk asterisk 135 Apr 25 10:20 /usr/local/bin/restart-samba |
#!/bin/sh
root 15901 0.0 0.0 99964 3372 ? Ss 10:39 0:00 /usr/sbin/smbd -D root 15904 0.0 0.0 100480 1324 ? S 10:39 0:00 /usr/sbin/smbd -D |
#nano /usr/local/bin/restart-samba
|
#[default]
|
#[default] 8100,n,Set(CHANNEL(language)=ru)es)
|
#service asterisk reload
Reloading Asterisk PBX configuration files. |
#nano extensions.conf
|
#nano extensions.conf
--- /tmp/l3-saved-6997.11454.8031 2014-04-25 11:54:50.295921276 +0300 +++ extensions.conf 2014-04-25 11:55:30.191920744 +0300 @@ -63,8 +63,7 @@ exten => 8105,n,Read(ORDER_ID,/var/tmp/asterisk/message20) exten => 8105,n,Playback(/var/tmp/asterisk/message21) exten => 8105,n,SayDigits(${ORDER_ID}) -exten => 8105,n,Playback(/var/tmp/asterisk/message24) - +exten => 8105,n,Playback(/var/tmp/asterisk/message2${DB(order/${ORDER_ID})}) |
#nano extensions.conf
--- /tmp/l3-saved-6997.6300.15859 2014-04-25 12:00:10.259916989 +0300 +++ extensions.conf 2014-04-25 12:00:33.331916680 +0300 @@ -63,8 +63,11 @@ exten => 8105,n,Read(ORDER_ID,/var/tmp/asterisk/message20) exten => 8105,n,Playback(/var/tmp/asterisk/message21) exten => 8105,n,SayDigits(${ORDER_ID}) +exten => 8105,n,GotoIf($[${DB(order/${ORDER_ID})}=""]?not_found) exten => 8105,n,Playback(/var/tmp/asterisk/message2${DB(order/${ORDER_ID})}) - +exten => 8105,n,Hangup +exten => 8105,n(not_found),Playback(/var/tmp/asterisk/message25) +exten => 8105,n,Hangup |
#nano extensions.conf
|
#[default]
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 aster-3 (pid = 2445) ... -- Executing [8105@gr1:7] Hangup("SIP/1302-00000030", "") in new stack == Spawn extension (gr1, 8105, 7) exited non-zero on 'SIP/1302-00000030' -- Executing [h@gr1:1] Playback("SIP/1302-00000030", "/var/tmp/asterisk/message") in new stack [Apr 25 12:04:12] WARNING[5838]: file.c:766 ast_readaudio_callback: Failed to write frame -- <SIP/1302-00000030> Playing '/var/tmp/asterisk/message.gsm' (language 'ru') [Apr 25 12:04:12] WARNING[5838]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/1302-00000030 for /var/tmp/asterisk/message aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#nano extensions.conf
--- /tmp/l3-saved-6997.19277.12694 2014-04-25 12:06:10.787912160 +0300 +++ extensions.conf 2014-04-25 12:06:34.487911844 +0300 @@ -63,7 +63,8 @@ exten => 8105,n,Read(ORDER_ID,/var/tmp/asterisk/message20) exten => 8105,n,Playback(/var/tmp/asterisk/message21) exten => 8105,n,SayDigits(${ORDER_ID}) -exten => 8105,n,GotoIf($[${DB(order/${ORDER_ID})}=""]?not_found) +;exten => 8105,n,GotoIf($[${DB(order/${ORDER_ID})}=""]?not_found) +exten => 8105,n,GotoIf($[${DB(order/${ORDER_ID})}z=z]?not_found) exten => 8105,n,Playback(/var/tmp/asterisk/message2${DB(order/${ORDER_ID})}) exten => 8105,n,Hangup exten => 8105,n(not_found),Playback(/var/tmp/asterisk/message25) |
#[default]
Reloading Asterisk PBX configuration files. |
#nano extensions.conf
--- /tmp/l3-saved-6997.6860.1545 2014-04-25 12:07:29.635911102 +0300 +++ extensions.conf 2014-04-25 12:07:52.263910802 +0300 @@ -63,7 +63,6 @@ exten => 8105,n,Read(ORDER_ID,/var/tmp/asterisk/message20) exten => 8105,n,Playback(/var/tmp/asterisk/message21) exten => 8105,n,SayDigits(${ORDER_ID}) -;exten => 8105,n,GotoIf($[${DB(order/${ORDER_ID})}=""]?not_found) exten => 8105,n,GotoIf($[${DB(order/${ORDER_ID})}z=z]?not_found) exten => 8105,n,Playback(/var/tmp/asterisk/message2${DB(order/${ORDER_ID})}) exten => 8105,n,Hangup |
#for i in {5..9}; do asterisk -rx "database put order 110$i $[2+RANDOM%3]" ; done
Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully |
#asterisk -rcvvvvvvvvvvvvv
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 aster-3 (pid = 2445) ... [Apr 25 12:48:15] NOTICE[2699]: chan_sip.c:13189 sip_reg_timeout: -- Registration for 'berlin@192.168.12.2' timed out, trying again (Attempt #47) [Apr 25 12:48:20] NOTICE[2699]: chan_sip.c:13189 sip_reg_timeout: -- Registration for 'berlin@192.168.12.6' timed out, trying again (Attempt #21) -- Registered SIP 'frankfurt' at 192.168.12.6:5060 [Apr 25 12:48:25] NOTICE[2699]: chan_sip.c:13189 sip_reg_timeout: -- Registration for 'berlin@192.168.12.5' timed out, trying again (Attempt #37) [Apr 25 12:48:35] NOTICE[2699]: chan_sip.c:13189 sip_reg_timeout: -- Registration for 'berlin@192.168.12.2' timed out, trying again (Attempt #48) [Apr 25 12:48:45] NOTICE[2699]: chan_sip.c:13189 sip_reg_timeout: -- Registration for 'berlin@192.168.12.5' timed out, trying again (Attempt #38) aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#nano extensions.conf
|
#[default] 8100,n,Set(CHANNEL(language)=ru)
|
#[local] |
|
#[macro-outgoingcall]
|
#{DB(order/${ORDER_ID})})
Reloading Asterisk PBX configuration files. |
#asterisk -rcvvvvvvvvvvvvv
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 aster-3 (pid = 2445) ... -- Executing [8125@gr1:1] Goto("SIP/1302-0000003f", "menu") in new stack [Apr 25 14:06:17] NOTICE[6175]: pbx.c:4530 pbx_extension_helper: No such label 'menu' in extension '8125' in context 'gr1' [Apr 25 14:06:17] WARNING[6175]: pbx.c:10836 pbx_parseable_goto: Priority 'menu' must be a number > 0, or valid label == Spawn extension (gr1, 8125, 1) exited non-zero on 'SIP/1302-0000003f' -- Executing [h@gr1:1] Playback("SIP/1302-0000003f", "/var/tmp/asterisk/message") in new stack == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/1302-0000003f' aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#nano extensions.conf
--- /tmp/l3-saved-6997.23149.32104 2014-04-25 14:06:33.315815396 +0300 +++ extensions.conf 2014-04-25 14:07:05.299814972 +0300 @@ -78,7 +78,7 @@ exten => 8106,n,Playback(/var/tmp/asterisk/message28) exten => 8106,n,SayDigits(${DB(mobile/${CALLERID(num)})}) -exten => 8125,1,Goto(menu) +exten => 8125,1,Goto(s,menu) [menu] |
#;exten => 8100,n,Set(CHANNEL(language)=ru)
Reloading Asterisk PBX configuration files. |
#asterisk -rcvvvvvvvvvvvvv
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 aster-3 (pid = 2445) ... -- Executing [8125@gr1:1] Goto("SIP/1302-00000040", "s,menu") in new stack [Apr 25 14:07:19] NOTICE[6499]: pbx.c:4530 pbx_extension_helper: No such label 'menu' in extension 's' in context 'gr1' [Apr 25 14:07:19] WARNING[6499]: pbx.c:10836 pbx_parseable_goto: Priority 'menu' must be a number > 0, or valid label == Spawn extension (gr1, 8125, 1) exited non-zero on 'SIP/1302-00000040' -- Executing [h@gr1:1] Playback("SIP/1302-00000040", "/var/tmp/asterisk/message") in new stack == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/1302-00000040' aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#nano extensions.conf
--- /tmp/l3-saved-6997.28428.17495 2014-04-25 14:07:53.535814321 +0300 +++ extensions.conf 2014-04-25 14:08:22.663813931 +0300 @@ -78,7 +78,7 @@ exten => 8106,n,Playback(/var/tmp/asterisk/message28) exten => 8106,n,SayDigits(${DB(mobile/${CALLERID(num)})}) -exten => 8125,1,Goto(s,menu) +exten => 8200,1,Goto(menu,s,1) [menu] |
#[default]
Reloading Asterisk PBX configuration files. |
#nano extensions.conf
|
#[default]
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 aster-3 (pid = 2445) ... -- <SIP/1302-00000043> Playing '/var/tmp/asterisk/message03.gsm' (language 'ru') -- Executing [s@menu:7] WaitExten("SIP/1302-00000043", "3") in new stack == CDR updated on SIP/1302-00000043 -- Executing [1@menu:1] AGI("SIP/1302-00000043", "/usr/local/bin/asterisk-festival.pl /home/user/belka.txt") in new stack [Apr 25 14:10:34] WARNING[7328]: res_agi.c:1621 launch_script: Failed to execute '/usr/local/bin/asterisk-festival.pl /home/user/belka.txt': File does not exist. -- Auto fallthrough, channel 'SIP/1302-00000043' status is 'UNKNOWN' aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#nano extensions.conf
--- /tmp/l3-saved-6997.25115.11162 2014-04-25 14:11:41.763811264 +0300 +++ extensions.conf 2014-04-25 14:12:00.543811013 +0300 @@ -96,9 +96,9 @@ exten => i,n,WaitExten(1) exten => i,n,Goto(s,menu) -exten => 1,1,AGI(/usr/local/bin/asterisk-festival.pl /home/user/belka.txt) +exten => 1,1,AGI(/usr/local/bin/asterisk-festival.pl,/home/user/belka.txt) -exten => 2,1,AGI(/usr/local/bin/asterisk-festival.pl /home/user/burunduki.txt) +exten => 2,1,AGI(/usr/local/bin/asterisk-festival.pl,/home/user/burunduki.txt) exten => 3,1,Answer exten => 3,n,Read(ORDER_ID,/var/tmp/asterisk/message20) |
#[default]
Reloading Asterisk PBX configuration files. |
#nano extensions.conf
|
#{DB(order/${ORDER_ID})})
Reloading Asterisk PBX configuration files. |
#nano extensions.conf
--- /tmp/l3-saved-6997.10952.31727 2014-04-25 14:25:04.783800506 +0300 +++ extensions.conf 2014-04-25 14:25:28.115800209 +0300 @@ -110,6 +110,8 @@ exten => 3,n(not_found),Playback(/var/tmp/asterisk/message25) exten => 3,n,Hangup +exten => 4,1,Goto(submenu1,s,1) + exten => 9,1,Goto(s,menu) |
#[default]
|
#[default]
Reloading Asterisk PBX configuration files. |
#asterisk -rcvvvvvvvvvvvvv
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 aster-3 (pid = 2445) ... -- <SIP/1302-0000004b> Playing '/var/tmp/asterisk/message06.gsm' (language 'ru') -- Executing [s@submenu1:3] WaitExten("SIP/1302-0000004b", "3") in new stack -- Timeout on SIP/1302-0000004b, continuing... -- Executing [s@submenu1:4] BackGround("SIP/1302-0000004b", "/var/tmp/asterisk/message03") in new stack -- <SIP/1302-0000004b> Playing '/var/tmp/asterisk/message03.gsm' (language 'ru') [Apr 25 14:33:51] WARNING[8918]: pbx.c:5417 __ast_pbx_run: Invalid extension '2', but no rule 'i' or 'e' in context 'submenu1' aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#apt-get istall sox
E: Invalid operation istall |
#apt-get install sox
Reading package lists... Done Building dependency tree Reading state information... Done sox is already the newest version. sox set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#apt-get install libsox-fmt-base
Reading package lists... Done Building dependency tree Reading state information... Done libsox-fmt-base is already the newest version. libsox-fmt-base set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#cd /home/
|
#ls
1.txt 1.wav 2.wav asterisk-core-sounds-ru-gsm-current.tar.gz belka.wav burunduki.wav music_tone.mp3 user |
#sox music_tone.mp3 -r 8000 -c 1 music_tone.mp3
sox FAIL formats: no handler for file extension `mp3' |
#sox music_tone.mp3 -r 8000 -c 1 music_tone.gsm
sox FAIL formats: no handler for file extension `mp3' |
#sox music_tone.mp3 -r 8000 -c 1 music_tone.gsm^C
|
#apt-get install libsox-fmt-mp3
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libid3tag0 The following NEW packages will be installed: libid3tag0 libsox-fmt-mp3 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 97.3 kB of archives. After this operation, 272 kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://192.168.12.254/debian/ wheezy/main libid3tag0 amd64 0.15.1b-10 [40.4 kB] Get:2 http://192.168.12.254/debian/ wheezy/main libsox-fmt-mp3 amd64 14.4.0-3 [56.9 kB] Fetched 97.3 kB in 0s (5,063 kB/s) Selecting previously unselected package libid3tag0. (Reading database ... 141421 files and directories currently installed.) Unpacking libid3tag0 (from .../libid3tag0_0.15.1b-10_amd64.deb) ... Selecting previously unselected package libsox-fmt-mp3. Unpacking libsox-fmt-mp3 (from .../libsox-fmt-mp3_14.4.0-3_amd64.deb) ... Setting up libid3tag0 (0.15.1b-10) ... Setting up libsox-fmt-mp3 (14.4.0-3) ... |
#cp music_tone.gsm /var/lib/asterisk/moh/
|
#cd /var/lib/asterisk/moh/
|
#ls
music_tone.gsm |
Время первой команды журнала | 16:02:17 2014- 4-24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:00:46 2014- 4-25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 15.84 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.96 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.42 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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