/l3/users/2014-11-nt-voip/nt-voip/debian2/root :1 :2 :3 :4 :5 :6 :7 |
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3989.32027.3257 2014-11-27 14:30:32.667260101 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 14:31:17.439261045 +0200 @@ -22,7 +22,7 @@ exten => 3,n,GotoIf($["${DB(order/${ORDER})}" = ""]?unknown_order) exten => 3,n,Playback(/var/tmp/asterisk/record${DB(order/${ORDER})}) -exten => 3,n,Hangup | +exten => 3,n,Hangup exten => 3,n(unknown_order),Playback(/var/tmp/asterisk/record10) |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3989.23112.21422 2014-11-27 14:33:39.579264032 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 14:33:59.559264452 +0200 @@ -23,7 +23,7 @@ exten => 3,n,GotoIf($["${DB(order/${ORDER})}" = ""]?unknown_order) exten => 3,n,Playback(/var/tmp/asterisk/record${DB(order/${ORDER})}) exten => 3,n,Hangup -exten => 3,n(unknown_order),Playback(/var/tmp/asterisk/record10) +exten => 3,n(unknown_order),Playback(/var/tmp/asterisk/record08) exten => 4,1,Queue(queue1) |
#ls /var/tmp/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 ... -- Executing [3@menu:4] SayDigits("SIP/1201-00000019", "5") in new stack -- <SIP/1201-00000019> Playing 'digits/5.gsm' (language 'ru') -- Executing [3@menu:5] GotoIf("SIP/1201-00000019", "0?unknown_order") in new stack -- Executing [3@menu:6] Playback("SIP/1201-00000019", "/var/tmp/asterisk/record9") in new stack -- <SIP/1201-00000019> Playing '/var/tmp/asterisk/record9.gsm' (language 'ru') -- Executing [3@menu:7] Hangup("SIP/1201-00000019", "") in new stack == Spawn extension (menu, 3, 7) exited non-zero on 'SIP/1201-00000019' debian2*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#ls /var/tmp/asterisk/
exten => s,n,WaitExten(1) exten => s,n,Background(/var/tmp/asterisk/record02) exten => s,n,WaitExten(3) exten => s,n,Background(/var/tmp/asterisk/record03) exten => s,n,WaitExten(3) exten => s,n,Background(/var/tmp/asterisk/record04) exten => s,n,Hangup exten => 1,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/belki.txt) exten => 2,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/burunduki.txt) exten => 3,1,Playback(/var/tmp/asterisk/record05) ... [menu] exten => 0,1,Goto(s,start) exten => i,1,Playback(/var/tmp/asterisk/record06) exten => i,n,WaitExten(2) exten => i,n,Goto(s,start) [internal] include=>parkedcalls exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) "/etc/asterisk/extensions.conf" 102L, 2644C written exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3989.28030.6447 2014-11-27 14:42:05.859274678 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 14:43:40.795276675 +0200 @@ -5,7 +5,7 @@ exten => s,n,Background(/var/tmp/asterisk/record01) exten => s,n,WaitExten(1) exten => s,n,Background(/var/tmp/asterisk/record02) -exten => s,n,WaitExten(3) +exten => s,n,WaitExten(1) exten => s,n,Background(/var/tmp/asterisk/record03) exten => s,n,WaitExten(3) exten => s,n,Background(/var/tmp/asterisk/record04) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3989.28336.5106 2014-11-27 14:47:59.275282109 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 14:48:56.351283309 +0200 @@ -25,7 +25,7 @@ exten => 3,n,Hangup exten => 3,n(unknown_order),Playback(/var/tmp/asterisk/record08) - +exten => 4,1,Answer exten => 4,1,Queue(queue1) exten => 0,1,Goto(s,start) |
#vim /etc/asterisk/extensions.conf
|
#{EXTEN:2})
|
#~
|
#мvi /etc/asterisk/queues.conf
; ; A strategy may be specified. Valid strategies include: ; ; ringall - ring all available channels until one answers (default) ; leastrecent - ring interface which was least recently hung up by this queue ; fewestcalls - ring the one with fewest completed calls from this queue ; random - ring random interface ; rrmemory - round robin with memory, remember where we left off last ring pass ; rrordered - same as rrmemory, except the queue member order from config file ; is preserved ... ; use agent groups. ; ;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]g 537,0-1 Bot [queue1] member => SIP/1201 -- INSERT --recording 540,1 Bot "/etc/asterisk/queues.conf" 540L, 23872C written |
#vi /etc/asterisk/agente.conf
|
#~
|
#~
|
#vi /etc/asterisk/agents.conf
--- /tmp/l3-saved-3989.30589.25079 2014-11-27 15:04:48.739303335 +0200 +++ /etc/asterisk/agents.conf 2014-11-27 15:06:17.443305199 +0200 @@ -103,3 +103,5 @@ ; ;agent => 1001,4321,Mark Spencer ;agent => 1002,4321,Will Meadows + +agent => 007,1234,Bond |
#/parkcall
exten => s,n,Hangup exten => 1,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/belki.txt) exten => 2,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/burunduki.txt) exten => 3,1,Playback(/var/tmp/asterisk/record05) exten => 3,n,Read(ORDER) exten => 3,n,Playback(/var/tmp/asterisk/record07) exten => 3,n,SayDigits(${ORDER}) exten => 3,n,GotoIf($["${DB(order/${ORDER})}" = ""]?unknown_order) exten => 3,n,Playback(/var/tmp/asterisk/record${DB(order/${ORDER})}) exten => 3,n,Hangup ... exten => _83XX,1,VoiceMailMain(12${EXTEN:2}@default) exten => _801X,1,MeetMe(10${EXTEN:3}) exten => 8300,1,System(touch /tmp/someone-called-8300) exten => 8301,1,System(sh -c "echo ${CALLERID(num)} > /tmp/someone-called-8301") exten => 8302,1,System(sudo /etc/init.d/sendmail restart) exten => 8403,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/belki.txt) exten => 8404,1,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/burunduki.txt) exten => 8405,1,Goto(menu,s,1) exten => 8407,1,AgentLogin(007) "/etc/asterisk/extensions.conf" 102L, 2694C written |
#asterisk restart
Privilege escalation protection disabled! See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -r
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 debian2 (pid = 2691) Verbosity is at least 4 debian2*CLI> debian2*CLI> debian2*CLI> Disconnected from Asterisk server |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#дÑÐlspci | grep Digium
|
#all lspci | grep Digium
bash: all: command not found |
#ls /var/tmp/asterisk/
|
#asterisk -rx 'database get order 6'
asterisk -rx 'database get order 6' RANDOM%2+9]" ; done |
#vim /etc/asterisk/extensions.conf
|
#asterisk -rvvv
cat > /tmp/call.call Context: internal Channel: SIP/1101 Extension: 8405 ^C |
#chown asterisk:asterisk /tmp/call.call
|
#cp -p /tmp/call.call /var/spool/asterisk/outgoing/
|
#vim /usr/local/bin/call-all
--- /dev/null 2014-11-27 12:49:21.542549379 +0200 +++ /usr/local/bin/call-all 2014-11-27 16:18:09.591395871 +0200 @@ -0,0 +1,18 @@ + +# наÑа задаÑа пеÑебÑаÑÑ ÑазнÑе ÐºÐ°Ð½Ð°Ð»Ñ +#и оÑпÑавиÑÑ Ð½Ð° каждÑй из Ð½Ð¸Ñ Ð·Ð²Ð¾Ð½Ð¾Ðº + +# ÑейÑÐ°Ñ Ð¿Ð¾ÐºÐ°Ð¶Ñ ÑÑо обознаÑÐ°ÐµÑ ÐºÐ¾Ð½ÑÑÑÑкÑÐ¸Ñ Ñ ÑигÑÑнÑми Ñкобками +for CHANNEL in minsk/{1{1,3},2{1,2,3},3{1,2}} +do +echo $CHANNEL +done + +exit 0 + +cat <<EOF +Context: internal +Extension: 8405 +Channel: SIP/${CHANNEL} +EOF + |
#bash /usr/local/bin/call-all
minsk/11 minsk/13 minsk/21 minsk/22 minsk/23 minsk/31 minsk/32 |
#bash /usr/local/bin/call-all
kiev/1101 kiev/1102 kiev/1301 kiev/1302 kiev/2101 kiev/2102 kiev/2201 kiev/2202 kiev/2301 kiev/2302 kiev/3101 kiev/3102 kiev/3201 kiev/3202 |
## сейчас bash /usr/local/bin/call-all
kiev/1101 kiev/1102 kiev/1301 kiev/1302 kiev/2101 kiev/2102 kiev/2201 kiev/2202 kiev/2301 kiev/2302 kiev/3101 kiev/3102 kiev/3201 kiev/3202 |
#vim /usr/local/bin/call-all
--- /tmp/l3-saved-6606.467.31414 2014-11-27 16:19:40.151397775 +0200 +++ /usr/local/bin/call-all 2014-11-27 16:23:04.119402064 +0200 @@ -3,16 +3,32 @@ #и отправить на каждый из них звонок # сейчас покажу что обозначает констуркция с фигурными скобками -for CHANNEL in kiev/{1{1,3},2{1,2,3},3{1,2}}0{1,2} +for CHANNEL in 1201 1202 kiev/{1{1,3},2{1,2,3},3{1,2}}0{1,2} do -echo $CHANNEL -done -exit 0 +# каналы перебираются правильно +# теперь генерируем звонок + +# имя файла звонка не должно повторяться +# иначе мы перезапишем сами себя +# поэтому делаем случайное имя +# ${RANDOM} это случайное число в диапазоне от 0 до 65567 (2^16-1) -cat <<EOF +FILE=/tmp/${RANDOM}${RANDOM}.call + +# <<EOF означает что копировать всё до EOF в поток вывода +cat <<EOF > $FILE Context: internal Extension: 8405 Channel: SIP/${CHANNEL} EOF +chown asterisk:asterisk $FILE +mv $FILE /var/spool/asterisk/outgoing/chown asterisk:asterisk $FILE + + +done + +exit 0 + + |
#chmod +x /usr/local/bin/call-all
|
#/usr/local/bin/call-all
mv: target `/tmp/2899330244.call' is not a directory mv: target `/tmp/248217076.call' is not a directory mv: target `/tmp/1185719758.call' is not a directory mv: target `/tmp/146429212.call' is not a directory mv: target `/tmp/307509346.call' is not a directory mv: target `/tmp/363930286.call' is not a directory mv: target `/tmp/772030129.call' is not a directory mv: target `/tmp/1470917812.call' is not a directory mv: target `/tmp/3149629100.call' is not a directory mv: target `/tmp/245401870.call' is not a directory mv: target `/tmp/1896028682.call' is not a directory mv: target `/tmp/111879619.call' is not a directory mv: target `/tmp/276223591.call' is not a directory mv: target `/tmp/556114108.call' is not a directory mv: target `/tmp/408513020.call' is not a directory mv: target `/tmp/1642327278.call' is not a directory |
#lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 002: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard Bus 007 Device 003: ID 09da:000a A4 Tech Co., Ltd Optical Mouse Opto 510D Bus 005 Device 002: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem |
#lsusb | grep Hua
Bus 005 Device 002: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem |
#tail /var/log/messages
Nov 27 16:40:09 debian2 kernel: [13853.623898] option 5-2:1.0: GSM modem (1-port) converter detected Nov 27 16:40:09 debian2 kernel: [13853.624267] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB0 Nov 27 16:40:09 debian2 kernel: [13853.624296] option 5-2:1.1: GSM modem (1-port) converter detected Nov 27 16:40:09 debian2 kernel: [13853.624511] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB1 Nov 27 16:40:09 debian2 kernel: [13853.624536] option 5-2:1.2: GSM modem (1-port) converter detected Nov 27 16:40:09 debian2 kernel: [13853.624665] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB2 Nov 27 16:40:09 debian2 kernel: [13853.624694] usbcore: registered new interface driver option Nov 27 16:40:09 debian2 kernel: [13853.624699] option: v0.7.2:USB Driver for GSM modems Nov 27 16:40:38 debian2 dhcpd: DHCPINFORM from 192.168.20.102 via eth0: not authoritative for subnet 192.168.20.0 Nov 27 16:40:41 debian2 dhcpd: DHCPINFORM from 192.168.20.102 via eth0: not authoritative for subnet 192.168.20.0 |
## девайс увиделся на ttyUSB0, ttyUSB1, ttyUSB2
|
#lsmod | head -2
Module Size Used by option 37168 0 |
#lsmod | head -5
Module Size Used by option 37168 0 usb_wwan 17320 1 option usbserial 32061 2 usb_wwan,option usb_storage 43870 0 |
## usb_wwan ÑÑо Ñего дÑайвеÑ
|
#modinfo usb_wwan
filename: /lib/modules/3.2.0-4-amd64/kernel/drivers/usb/serial/usb_wwan.ko license: GPL version: v0.7.2 description: USB Driver for GSM modems author: Matthias Urlichs <smurf@smurf.noris.de> srcversion: EF601762583FF1C87ACB46D depends: usbcore,usbserial intree: Y vermagic: 3.2.0-4-amd64 SMP mod_unload modversions parm: debug:Debug messages (bool) |
## USB Driver for GSM modems
|
#ls -l /dev/ttyUSB*
crw-rw---T 1 root dialout 188, 0 Nov 27 16:40 /dev/ttyUSB0 crw-rw---T 1 root dialout 188, 1 Nov 27 16:40 /dev/ttyUSB1 crw-rw---T 1 root dialout 188, 2 Nov 27 16:40 /dev/ttyUSB2 |
## сейчас 16 40
|
## теперь нужно сделать чтобы астериск тоже его поддерживал
|
## испоьльзуем канал datacard
|
## наÑ
одиÑÑÑÑ ÑеÑез google Ðза одно нажаÑе
|
## тип репозитория subversion
|
#apt-get install subversion
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libsvn1 Suggested packages: subversion-tools The following NEW packages will be installed: libsvn1 subversion 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... Get:2 http://192.168.12.254/debian/ wheezy/main subversion amd64 1.6.17dfsg-4+deb7u6 [1,320 kB] Fetched 2,253 kB in 1s (2,198 kB/s) Selecting previously unselected package libsvn1:amd64. (Reading database ... 144694 files and directories currently installed.) Unpacking libsvn1:amd64 (from .../libsvn1_1.6.17dfsg-4+deb7u6_amd64.deb) ... Selecting previously unselected package subversion. Unpacking subversion (from .../subversion_1.6.17dfsg-4+deb7u6_amd64.deb) ... Processing triggers for man-db ... Setting up libsvn1:amd64 (1.6.17dfsg-4+deb7u6) ... Setting up subversion (1.6.17dfsg-4+deb7u6) ... |
#svn co http://chan-datacard.googlecode.com/svn/trunk/ chan-datacard
A chan-datacard/__helpers.c A chan-datacard/__char_conv.c A chan-datacard/configure A chan-datacard/chan_datacard.h A chan-datacard/Makefile.in A chan-datacard/__cli.c A chan-datacard/COPYRIGHT.txt A chan-datacard/__channel.c A chan-datacard/__manager.c A chan-datacard/__at_fifo_queue.c ... A chan-datacard/__at_response.c A chan-datacard/__ringbuffer.c A chan-datacard/README.txt A chan-datacard/etc A chan-datacard/etc/datacard.conf A chan-datacard/__ringbuffer.h A chan-datacard/chan_datacard.c A chan-datacard/__at_parse.c A chan-datacard/__at_read.c Checked out revision 192. |
## скачали
|
#cd chan-datacard
|
## теперь собираем
|
#apt-get install asterisk-dev
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: asterisk-dev 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 959 kB of archives. After this operation, 2,131 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main asterisk-dev all 1:1.8.13.1~dfsg1-3+deb7u3 [959 kB] Fetched 959 kB in 0s (1,874 kB/s) Selecting previously unselected package asterisk-dev. (Reading database ... 144782 files and directories currently installed.) Unpacking asterisk-dev (from .../asterisk-dev_1%3a1.8.13.1~dfsg1-3+deb7u3_all.deb) ... Setting up asterisk-dev (1:1.8.13.1~dfsg1-3+deb7u3) ... |
## Ð´Ð»Ñ ÑбокÑки Ðиз иÑÑ
одников вÑегда нÑÐ¶Ð½Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²Ð¾ÑнÑе ÑайлÑ
|
## asterisk-dev
|
#./configure
configure complete, now type 'make' |
#make
gcc -Wall -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__APP__ -c chan_datacard.c In file included from chan_datacard.c:69:0: chan_datacard.h:257:2: warning: initialization from incompatible pointer type [enabled by default] chan_datacard.h:257:2: warning: (near initialization for ‘channel_tech.requester’) [enabled by default] In file included from chan_datacard.c:85:0: __channel.c: In function ‘channel_new’: __channel.c:18:2: warning: implicit declaration of function ‘ast_channel_linkedid’ [-Wimplicit-function-declaration] __channel.c:18:9: warning: pointer/integer type mismatch in conditional expression [enabled by default] __channel.c:22:3: warning: implicit declaration of function ‘ast_channel_tech_pvt_set’ [-Wimplicit-function-declaration] __channel.c:23:3: warning: implicit declaration of function ‘ast_channel_tech_set’ [-Wimplicit-function-declaration] ... __channel.c: In function ‘channel_indicate’: __channel.c:792:15: warning: initialization makes pointer from integer without a cast [enabled by default] __channel.c: In function ‘channel_queue_hangup’: __channel.c:879:6: warning: implicit declaration of function ‘ast_channel_hangupcause_set’ [-Wimplicit-function-declaration] chan_datacard.c: In function ‘unload_module’: chan_datacard.c:621:2: warning: implicit declaration of function ‘ast_format_cap_destroy’ [-Wimplicit-function-declaration] chan_datacard.c: In function ‘load_module’: chan_datacard.c:685:9: warning: implicit declaration of function ‘ast_format_cap_alloc’ [-Wimplicit-function-declaration] chan_datacard.c:690:27: warning: assignment makes pointer from integer without a cast [enabled by default] make: *** [chan_datacard.o] Error 1 |
## наверное это слишком новый астериск для этого кода
|
## наверное этот модуль с таким новым атсериском несовместим
|
#apt-cache search dongle
libgnuradio-fcd3.5.3.2 - gnuradio FunCube Dongle support libpam-blue - PAM module for local authenticaction with bluetooth devices openocd - Open on-chip JTAG debug solution for ARM and MIPS systems qthid-fcd-controller - Funcube Dongle controller usb-modeswitch - mode switching tool for controlling "flip flop" USB devices usb-modeswitch-data - mode switching data for usb-modeswitch |
#cd ..
|
#./configure
bash: ./configure: No such file or directory |
#ls
app.c at_queue.h chan_dongle.h config.h.in dc_config.h Makefile.in mutils.h ringbuffer.h app.h at_read.c channel.c configure.in etc manager.c pdiscovery.c single.c at_command.c at_read.h channel.h contrib export.h manager.h pdiscovery.h stamp-h.in at_command.h at_response.c char_conv.c COPYRIGHT.txt helpers.c memmem.c pdu.c test at_parse.c at_response.h char_conv.h cpvt.c helpers.h memmem.h pdu.h TODO.txt at_parse.h BUGS cli.c cpvt.h INSTALL mixbuffer.c README.txt tools at_queue.c chan_dongle.c cli.h dc_config.c LICENSE.txt mixbuffer.h ringbuffer.c |
#less INSTALL
|
#autoconf
bash: autoconf: command not found |
#apt-get install autoconf
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: automake autotools-dev Suggested packages: autoconf2.13 autoconf-archive gnu-standards autoconf-doc libtool The following NEW packages will be installed: autoconf automake autotools-dev 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. ... Selecting previously unselected package autotools-dev. Unpacking autotools-dev (from .../autotools-dev_20120608.1_all.deb) ... Selecting previously unselected package automake. Unpacking automake (from .../automake_1%3a1.11.6-1_all.deb) ... Processing triggers for man-db ... Processing triggers for install-info ... Setting up autoconf (2.69-1) ... Setting up autotools-dev (20120608.1) ... Setting up automake (1:1.11.6-1) ... update-alternatives: using /usr/bin/automake-1.11 to provide /usr/bin/automake (automake) in auto mode |
#autoconf
configure.in:7: error: possibly undefined macro: AM_INIT_AUTOMAKE If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. |
#automake
configure.in: no proper invocation of AM_INIT_AUTOMAKE was found. configure.in: You should verify that configure.in invokes AM_INIT_AUTOMAKE, configure.in: that aclocal.m4 is present in the top-level directory, configure.in: and that aclocal.m4 was recently regenerated (using aclocal). configure.in:6: required file `./config.guess' not found configure.in:6: `automake --add-missing' can install `config.guess' configure.in:6: required file `./config.sub' not found configure.in:6: `automake --add-missing' can install `config.sub' configure.in:52: required file `./install-sh' not found configure.in:52: `automake --add-missing' can install `install-sh' automake: no `Makefile.am' found for any configure output |
#ls
app.c at_read.c channel.c configure.in export.h memmem.c pdu.h tools app.h at_read.h channel.h contrib helpers.c memmem.h README.txt at_command.c at_response.c char_conv.c COPYRIGHT.txt helpers.h mixbuffer.c ringbuffer.c at_command.h at_response.h char_conv.h cpvt.c INSTALL mixbuffer.h ringbuffer.h at_parse.c autom4te.cache cli.c cpvt.h LICENSE.txt mutils.h single.c at_parse.h BUGS cli.h dc_config.c Makefile.in pdiscovery.c stamp-h.in at_queue.c chan_dongle.c config.h.in dc_config.h manager.c pdiscovery.h test at_queue.h chan_dongle.h configure etc manager.h pdu.c TODO.txt |
#./configure
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.." |
#less INSTALL
|
#aclocal
|
#autoconf
|
#automake
configure.in:6: required file `./config.guess' not found configure.in:6: `automake --add-missing' can install `config.guess' configure.in:6: required file `./config.sub' not found configure.in:6: `automake --add-missing' can install `config.sub' configure.in:7: required file `./install-sh' not found configure.in:7: `automake --add-missing' can install `install-sh' configure.in:7: required file `./missing' not found configure.in:7: `automake --add-missing' can install `missing' automake: no `Makefile.am' found for any configure output |
#automake -a
configure.in:6: installing `./config.guess' configure.in:6: installing `./config.sub' configure.in:7: installing `./install-sh' configure.in:7: installing `./missing' automake: no `Makefile.am' found for any configure output |
#./configure
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for gcc... gcc ... checking for memmem... yes checking for strcasecmp... yes checking for strchr... yes checking for strncasecmp... yes checking for strtol... yes checking for realpath... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: executing depfiles commands |
#make -j
gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT app.o -MF .app.o.d -MP -o app.o -c app.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_command.o -MF .at_command.o.d -MP -o at_command.o -c at_command.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_parse.o -MF .at_parse.o.d -MP -o at_parse.o -c at_parse.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_queue.o -MF .at_queue.o.d -MP -o at_queue.o -c at_queue.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_read.o -MF .at_read.o.d -MP -o at_read.o -c at_read.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_response.o -MF .at_response.o.d -MP -o at_response.o -c at_response.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT chan_dongle.o -MF .chan_dongle.o.d -MP -o chan_dongle.o -c chan_dongle.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT channel.o -MF .channel.o.d -MP -o channel.o -c channel.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT char_conv.o -MF .char_conv.o.d -MP -o char_conv.o -c char_conv.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT cli.o -MF .cli.o.d -MP -o cli.o -c cli.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT helpers.o -MF .helpers.o.d -MP -o helpers.o -c helpers.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT manager.o -MF .manager.o.d -MP -o manager.o -c manager.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT memmem.o -MF .memmem.o.d -MP -o memmem.o -c memmem.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT ringbuffer.o -MF .ringbuffer.o.d -MP -o ringbuffer.o -c ringbuffer.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT cpvt.o -MF .cpvt.o.d -MP -o cpvt.o -c cpvt.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT dc_config.o -MF .dc_config.o.d -MP -o dc_config.o -c dc_config.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT pdu.o -MF .pdu.o.d -MP -o pdu.o -c pdu.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT mixbuffer.o -MF .mixbuffer.o.d -MP -o mixbuffer.o -c mixbuffer.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT pdiscovery.o -MF .pdiscovery.o.d -MP -o pdiscovery.o -c pdiscovery.c gcc -shared -Xlinker -x -o chan_dongle.so app.o at_command.o at_parse.o at_queue.o at_read.o at_response.o chan_dongle.o channel.o char_conv.o cli.o helpers.o manager.o memmem.o ringbuffer.o cpvt.o dc_config.o pdu.o mixbuffer.o pdiscovery.o |
#make install
./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands strip chan_dongle.so /usr/bin/install -c -m 755 chan_dongle.so /usr/lib/asterisk/modules |
## вс оё отработало
|
#history | tail -20
509 cd chan-dongle/ 510 ./configure 511 ls 512 less INSTALL 513 autoconf 514 apt-get install autoconf 515 autoconf 516 automake 517 ls 518 ./configure 519 less INSTALL 520 aclocal 521 autoconf 522 automake 523 automake -a 524 ./configure 525 make -j 526 make install 527 # всё отработало 528 history | tail -20 |
#vim ~/chan-dongle-installation.txt
--- /tmp/l3-saved-7539.8170.20646 2014-11-27 16:54:45.599442046 +0200 +++ /root/chan-dongle-installation.txt 2014-11-27 16:58:55.119447295 +0200 @@ -1,50 +1,29 @@ - 480 lsmod | head -2 - 481 lsmod | head -5 - 482 # usb_wwan это его драйвер - 483 modinfo usb_wwan - 484 # USB Driver for GSM modems - 485 ls -l /dev/ttyUSB* - 486 # сейчас 16 40 - 487 # теперь нужно сделать чтобы астериск тоже его поддерживал - 488 # используем канал datacard - 489 exit - 490 # url на котором лежит исходный код datacard - 491 # находится через google за одно нажате - 492 # тип репозитория subversion - 493 apt-get install subversion - 494 svn co http://chan-datacard.googlecode.com/svn/trunk/ chan-datacard - 495 # скачали - 496 cd chan-datacard - 497* # теперь собираем chan - 498 apt-get install asterisk-dev - 499 # для сборки из исходников всегда нужны заголовочные файлы - 500 # asterisk-dev - 501 ./configure - 502 make - 503 # наверное это слишком новый астериск для этого кода - 504 # наверное этот модуль с таким новым атсериском несовместим - 505 # тогда мы можем попробовать dongle - 506 apt-cache search dongle - 507 cd .. - 508 svn co http://asterisk-chan-dongle.googlecode.com/svn/trunk/ chan-dongle - 509 cd chan-dongle/ - 510 ./configure - 511 ls - 512 less INSTALL - 513 autoconf - 514 apt-get install autoconf - 515 autoconf - 516 automake - 517 ls - 518 ./configure - 519 less INSTALL - 520 aclocal - 521 autoconf - 522 automake - 523 automake -a - 524 ./configure - 525 make -j - 526 make install - 527 # всё отработало - 528 history | tail -20 - 529 history | tail -50 > ~/chan-dongle-installation.txt +# url на котором лежит исходный код dongle: +# http://asterisk-chan-dongle.googlecode.com/svn/trunk/ + +# находится через google за одно нажате +# тип репозитория subversion +apt-get install subversion + +# для сборки из исходников всегда нужны заголовочные файлы +# asterisk-dev +apt-get install asterisk-dev + +# нам ещё потребуется autoconf +apt-get install autoconf + +# используем dongle для связи с USB-модемом +svn co http://asterisk-chan-dongle.googlecode.com/svn/trunk/ chan-dongle +cd chan-dongle/ +less INSTALL +# подготовка файла ./configure +aclocal +autoconf +automake +automake -a + +# непосредственная сборка +./configure +make -j +make install +# всё отработало |
#ls
aclocal.m4 at_read.c channel.h config.sub helpers.c memmem.o ringbuffer.c app.c at_read.h channel.o configure helpers.h missing ringbuffer.h app.h at_read.o char_conv.c configure.in helpers.o mixbuffer.c ringbuffer.o app.o at_response.c char_conv.h contrib INSTALL mixbuffer.h single.c at_command.c at_response.h char_conv.o COPYRIGHT.txt install-sh mixbuffer.o stamp-h1 at_command.h at_response.o cli.c cpvt.c LICENSE.txt mutils.h stamp-h.in at_command.o autom4te.cache cli.h cpvt.h Makefile pdiscovery.c test at_parse.c BUGS cli.o cpvt.o Makefile.in pdiscovery.h TODO.txt at_parse.h chan_dongle.c config.guess dc_config.c manager.c pdiscovery.o tools at_parse.o chan_dongle.h config.h dc_config.h manager.h pdu.c at_queue.c chan_dongle.o config.h.in dc_config.o manager.o pdu.h at_queue.h chan_dongle.so config.log etc memmem.c pdu.o at_queue.o channel.c config.status export.h memmem.h README.txt |
#ls etc
dongle.conf extensions.conf |
#cat etc/dongle.conf
[general] interval=15 ; Number of seconds between trying to connect to devices ;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- ;jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a ; Dongle channel. Defaults to "no". An enabled jitterbuffer will ; be used only if the sending side can create and the receiving ; side can not accept jitter. The Dongle channel can't accept jitter, ; thus an enabled jitterbuffer on the receive Dongle side will always ; be used if the sending side can create jitter. ;jbforce = no ; Forces the use of a jitterbuffer on the receive side of a Dongle ... [dongle0] audio=/dev/ttyUSB1 ; tty port for audio connection; no default value data=/dev/ttyUSB2 ; tty port for AT commands; no default value ; or you can omit both audio and data together and use imei=123456789012345 and/or imsi=123456789012345 ; imei and imsi must contain exactly 15 digits ! ; imei/imsi discovery is available on Linux only imei=123456789012345 imsi=123456789012345 ; if audio and data set together with imei and/or imsi audio and data has precedence ; you can use both imei and imsi together in this case exact match by imei and imsi required |
## пример конфиг-файла
|
#cp etc/dongle.conf /etc/asterisk/
|
#vim /etc/asterisk/dongle.conf
--- /tmp/l3-saved-11168.8104.20730 2014-11-27 17:00:43.931449580 +0200 +++ /etc/asterisk/dongle.conf 2014-11-27 17:01:23.095450403 +0200 @@ -77,14 +77,16 @@ ; dongle required settings [dongle0] +; вот здесь подключается модем + audio=/dev/ttyUSB1 ; tty port for audio connection; no default value data=/dev/ttyUSB2 ; tty port for AT commands; no default value ; or you can omit both audio and data together and use imei=123456789012345 and/or imsi=123456789012345 ; imei and imsi must contain exactly 15 digits ! ; imei/imsi discovery is available on Linux only -imei=123456789012345 -imsi=123456789012345 +; imei=123456789012345 +; imsi=123456789012345 ; if audio and data set together with imei and/or imsi audio and data has precedence ; you can use both imei and imsi together in this case exact match by imei and imsi required |
## всё
|
#â# попÑобÑем ÑÑо бÑдеÑ
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#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 debian2 (pid = 11311) Verbosity was 0 and is now 1 debian2*CLI> dongle ... debian2*CLI> dongle show device devices version debian2*CLI> dongle show devi device devices debian2*CLI> dongle show devices ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number dongle0 0 Not connec 0 0 0 NONE Unknown [Nov 27 17:01:50] ERROR[11366]: at_response.c:364 at_response_error: [dongle0] Getting IMSI number failed debian2*CLI> quit Executing last minute cleanups |
## что-то не заработало
|
## ÑÑо-Ñо нÐ# попÑобÑеÐÐvim /etc/asterisk/dongle.conf
dtmf=relax ; control of i use this value for gateways or if not use DTMF for AVR or inside dd ialplan ; inband - do DTMF tones detection ; relax - like inband but with relaxdtmf option ; default is 'relax' by compatibility reason ; dongle required settings [dongle0] ; Ð²Ð¾Ñ Ð·Ð´ÐµÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑÑаеÑÑÑ Ð¼Ð¾Ð´ÐµÐ¼ audio=/dev/ttyUSB1 ; tty port for audio connection; no default value data=/dev/ttyUSB2 ; tty port for AT commands; no default value ; or you can omit both audio and data together and use imei=123456789012345 and/or imsi=123456789012345 ; imei and imsi must contain exactly 15 digits ! ; imei/imsi discovery is available on Linux only ; imei=123456789012345 imei=123456789012345 imsi=123456789012345 ; if audio and data set together with imei and/or imsi audio and data has precedence "/etc/asterisk/dongle.conf" 93L, 4880C written this case exact match by imei and imsi required |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
[general] interval=15 ; Number of seconds between trying to connect to devices ;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- ;jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a ; Dongle channel. Defaults to "no". An enabled jitterbuffer will ; be used only if the sending side can create and the receiving ; side can not accept jitter. The Dongle channel can't accept jitter, ; thus an enabled jitterbuffer on the receive Dongle side will always ; be used if the sending side can create jitter. ;jbforce = no ; Forces the use of a jitterbuffer on the receive side of a Dongle ; channel. Defaults to "no". ;jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds. ;jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is ; resynchronized. Useful to improve the quality of the voice, with ; big jumps in/broken timestamps, usually sent from exotic devices ; and programs. Defaults to 1000. ;jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a Dongle ; channel. Two implementations are currently available - "fixed" ; (with size always equals to jbmaxsize) and "adaptive" (with ; variable size, actually the new jb of IAX2). Defaults to fixed. ;jbtargetextra = 40 ; This option only affects the jb when 'jbimpl = adaptive' is set. ; The option represents the number of milliseconds by which the new jitter buffer ; will pad its size. the default is 40, so without modification, the new ; jitter buffer will set its size to the jitter value plus 40 milliseconds. ; increasing this value may help if your network normally has low jitter, ; but occasionally has spikes. ;jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". ;----------------------------------------------------------------------------------- [defaults] ; now you can set here any not required device settings as template ; sure you can overwrite in any [device] section this default values context=default ; context for incoming calls group=0 ; calling group rxgain=0 ; increase the incoming volume; may be negative txgain=0 ; increase the outgoint volume; may be negative autodeletesms=yes ; auto delete incoming sms resetdongle=yes ; reset dongle during initialization with ATZ command u2diag=-1 ; set ^U2DIAG parameter on device (0 = disable everything except modem function) ; -1 not use ^U2DIAG command usecallingpres=yes ; use the caller ID presentation or not callingpres=allowed_passed_screen ; set caller ID presentation by default use default network settings disablesms=no ; disable of SMS reading from device when received ; chan_dongle has currently a bug with SMS reception. When a SMS gets in during a ; call chan_dongle might crash. Enable this option to disable sms reception. ; default = no language=en ; set channel default language smsaspdu=yes ; if 'yes' send SMS in PDU mode, feature implementation incomplete and we strongly recommend say 'yes' mindtmfgap=45 ; minimal interval from end of previews DTMF from begining of next in ms mindtmfduration=80 ; minimal DTMF tone duration in ms mindtmfinterval=200 ; minimal interval between ends of DTMF of same digits in ms callwaiting=auto ; if 'yes' allow incoming calls waiting; by default use network settings ; if 'no' waiting calls just ignored disable=no ; OBSOLETED by initstate: if 'yes' no load this device and just ignore this section initstate=start ; specified initial state of device, must be one of 'stop' 'start' 'remote' ; 'remove' same as 'disable=yes' exten=+1234567890 ; exten for start incoming calls, only in case of Subscriber Number not available!, also set to CALLERID(ndid) dtmf=relax ; control of incoming DTMF detection, possible values: ; off - off DTMF tones detection, voice data passed to asterisk unaltered ; use this value for gateways or if not use DTMF for AVR or inside dialplan ; inband - do DTMF tones detection ; relax - like inband but with relaxdtmf option ; default is 'relax' by compatibility reason ; dongle required settings [dongle0] audio=/dev/ttyUSB1 ; tty port for audio connection; no default value data=/dev/ttyUSB2 ; tty port for AT commands; no default value ; or you can omit both audio and data together and use imei=123456789012345 and/or imsi=123456789012345 ; imei and imsi must contain exactly 15 digits ! ; imei/imsi discovery is available on Linux only imei=123456789012345 imsi=123456789012345 ; if audio and data set together with imei and/or imsi audio and data has precedence ; you can use both imei and imsi together in this case exact match by imei and imsi required
Время первой команды журнала | 13:28:46 2014-11-27 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:02:34 2014-11-27 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 18.81 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.87 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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