/l3/users/2014-11-nt-voip/nt-voip/debian6/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#more call-all
|
#vim call-all
|
#exit 0
#!/bin/bash # наша задача перебрать разные каналы #и отправить на каждый из них звонок # сейчас покажу что обозначает констуркция с фигурными скобками for CHANNEL in 1201 1202 kiev/{1{1,3},2{1,2,3},3{1,2}}0{1,2} do # каналы перебираются правильно # теперь генерируем звонок # имя файла звонка не должно повторяться # иначе мы перезапишем сами себя ... # <<EOF означает что копировать всё до EOF в поток вывода cat <<EOF > $FILE Context: internal Extension: 8405 Channel: SIP/${CHANNEL} EOF chown asterisk:asterisk $FILE mv $FILE /var/spool/asterisk/outgoing/ done exit 0 |
#vim call-all
--- /tmp/l3-saved-3572.9919.32267 2014-11-27 16:29:35.750604153 +0200 +++ call-all 2014-11-27 16:30:10.498604129 +0200 @@ -4,7 +4,7 @@ #и отправить на каждый из них звонок # сейчас покажу что обозначает констуркция с фигурными скобками -for CHANNEL in 1201 1202 kiev/{1{1,3},2{1,2,3},3{1,2}}0{1,2} +for CHANNEL in 2301 2302 minsk/{1{1,2,3},2{1,2},3{1,2}}0{1,2} do # каналы перебираются правильно |
#bash call-all
|
#^C
|
#дмdmesg
[ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.63-2+deb7u1 [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-4-amd64 root=UUID=c7e7a580-3a72-4861-87d5-2cae1b74997b ro quiet [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009d800 (usable) [ 0.000000] BIOS-e820: 000000000009d800 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 0000000020000000 (usable) [ 0.000000] BIOS-e820: 0000000020000000 - 0000000020200000 (reserved) ... [92074.104015] usbserial: USB Serial Driver core [92074.142523] USB Serial support registered for GSM modem (1-port) [92074.142584] option 4-1.8:1.0: GSM modem (1-port) converter detected [92074.142705] usb 4-1.8: GSM modem (1-port) converter now attached to ttyUSB0 [92074.142714] option 4-1.8:1.1: GSM modem (1-port) converter detected [92074.142845] usb 4-1.8: GSM modem (1-port) converter now attached to ttyUSB1 [92074.142865] option 4-1.8:1.2: GSM modem (1-port) converter detected [92074.143013] usb 4-1.8: GSM modem (1-port) converter now attached to ttyUSB2 [92074.143027] usbcore: registered new interface driver option [92074.143029] option: v0.7.2:USB Driver for GSM modems |
#lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 003: ID 046d:c077 Logitech, Inc. Bus 001 Device 004: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard Bus 004 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem |
#lsusb | grep hua
|
#lsusb | grep Hua
Bus 004 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem |
#tail -30 /var/log/messages
Nov 27 16:37:12 debian6 dhcpd: DHCPACK on 192.168.60.100 to 00:19:e7:14:25:e6 (SEP0019E71425E6) via eth0 Nov 27 16:37:57 debian6 dhcpd: DHCPREQUEST for 192.168.60.102 from 9c:eb:e8:07:70:39 (fallout4) via eth0 Nov 27 16:37:57 debian6 dhcpd: DHCPACK on 192.168.60.102 to 9c:eb:e8:07:70:39 (fallout4) via eth0 Nov 27 16:41:36 debian6 kernel: [92073.860199] usb 4-1.8: new high-speed USB device number 3 using ehci_hcd Nov 27 16:41:36 debian6 kernel: [92073.963455] usb 4-1.8: New USB device found, idVendor=12d1, idProduct=1001 Nov 27 16:41:36 debian6 kernel: [92073.963460] usb 4-1.8: New USB device strings: Mfr=2, Product=1, SerialNumber=0 Nov 27 16:41:36 debian6 kernel: [92073.963462] usb 4-1.8: Product: HUAWEI Mobile Nov 27 16:41:36 debian6 kernel: [92073.963465] usb 4-1.8: Manufacturer: HUAWEI Technology Nov 27 16:41:36 debian6 mtp-probe: checking bus 4, device 3: "/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.8" Nov 27 16:41:36 debian6 mtp-probe: bus: 4, device: 3 was not an MTP device ... Nov 27 16:41:36 debian6 kernel: [92074.142714] option 4-1.8:1.1: GSM modem (1-port) converter detected Nov 27 16:41:36 debian6 kernel: [92074.142845] usb 4-1.8: GSM modem (1-port) converter now attached to ttyUSB1 Nov 27 16:41:36 debian6 kernel: [92074.142865] option 4-1.8:1.2: GSM modem (1-port) converter detected Nov 27 16:41:36 debian6 kernel: [92074.143013] usb 4-1.8: GSM modem (1-port) converter now attached to ttyUSB2 Nov 27 16:41:36 debian6 kernel: [92074.143027] usbcore: registered new interface driver option Nov 27 16:41:36 debian6 kernel: [92074.143029] option: v0.7.2:USB Driver for GSM modems Nov 27 16:42:12 debian6 dhcpd: DHCPREQUEST for 192.168.60.102 from 9c:eb:e8:07:70:39 (fallout4) via eth0 Nov 27 16:42:12 debian6 dhcpd: DHCPACK on 192.168.60.102 to 9c:eb:e8:07:70:39 (fallout4) via eth0 Nov 27 16:42:12 debian6 dhcpd: DHCPREQUEST for 192.168.60.100 from 00:19:e7:14:25:e6 (SEP0019E71425E6) via eth0 Nov 27 16:42:12 debian6 dhcpd: DHCPACK on 192.168.60.100 to 00:19:e7:14:25:e6 (SEP0019E71425E6) via eth0 |
#tail -30 /var/log/messages | grep ttyUS
Nov 27 16:41:36 debian6 kernel: [92074.142705] usb 4-1.8: GSM modem (1-port) converter now attached to ttyUSB0 Nov 27 16:41:36 debian6 kernel: [92074.142845] usb 4-1.8: GSM modem (1-port) converter now attached to ttyUSB1 Nov 27 16:41:36 debian6 kernel: [92074.143013] usb 4-1.8: GSM modem (1-port) converter now attached to 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 |
#modinfo us-wwan
ERROR: Module us-wwan not found. |
#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) |
#ls -l /dev/ttyUSB*
crw-rw---T 1 root dialout 188, 0 Nov 27 16:41 /dev/ttyUSB0 crw-rw---T 1 root dialout 188, 1 Nov 27 16:41 /dev/ttyUSB1 crw-rw---T 1 root dialout 188, 2 Nov 27 16:41 /dev/ttyUSB2 |
#http://chan-datacard.googlecode.com/svn/trunk/
bash: http://chan-datacard.googlecode.com/svn/trunk/: No such file or directory |
#cd chan-datacard/
|
#ls
__app.c __at_response.c __channel.c COPYRIGHT.txt Makefile.in __ringbuffer.h __at_fifo_queue.c __at_send.c __char_conv.c etc __manager.c __at_parse.c chan_datacard.c __cli.c __helpers.c README.txt __at_read.c chan_datacard.h configure LICENSE.txt __ringbuffer.c |
#apt-get install asterisk-dev
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: asterisk-dev 0 upgraded, 1 newly installed, 0 to remove and 16 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 (29.4 MB/s) Selecting previously unselected package asterisk-dev. (Reading database ... 147218 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) ... |
#./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 |
#svn co http://chan-d^Cooglecode.com/svn/trunk/ chan-datacard
|
#cd ..
|
#apt-get install autoconf
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: automake autotools-dev Suggested packages: autoconf2.13 autoconf-archive gnu-standards autoconf-doc libtool ... 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 |
#svn co http://chan-dongle.googlecode.com/svn/trunk/
svn: 'http://chan-dongle.googlecode.com/svn/trunk' path not found |
#svn co http://dongle.googlecode.com/svn/trunk/
^Csvn: Caught signal |
#cd chan-dongle/
|
#./configure
bash: ./configure: No such file or directory |
#configure
bash: configure: command not found |
#./configure
bash: ./configure: No such file or directory |
#ls
Build.lua DongleCore DongleHelloWorld DongleStub lunit OptionHouse |
#autonmake -a
bash: autonmake: command not found |
#automake -a
automake: `configure.ac' or `configure.in' is required |
#aclocal
aclocal: `configure.ac' or `configure.in' is required |
#autoconf
autoconf: error: no input file |
#automake
automake: `configure.ac' or `configure.in' is required |
#automake -a
automake: `configure.ac' or `configure.in' is required |
#./configure
bash: ./configure: No such file or directory |
#cd ..
|
#svn co http://asterisk-chan-dongle.googlecode.com/svn/trunk/ chan-dongle
svn: 'chan-dongle' is already a working copy for a different URL |
#svn co http://asterisk-chan-dongle.googlecode.com/svn/trunk/ chan-dongle2
A chan-dongle2/at_read.c A chan-dongle2/Makefile.in A chan-dongle2/chan_dongle.c A chan-dongle2/TODO.txt A chan-dongle2/at_read.h A chan-dongle2/chan_dongle.h A chan-dongle2/cli.c A chan-dongle2/channel.c A chan-dongle2/manager.c A chan-dongle2/dc_config.c ... A chan-dongle2/contrib/openwrt/asterisk18-chan-dongle/Makefile A chan-dongle2/LICENSE.txt A chan-dongle2/cpvt.h A chan-dongle2/single.c A chan-dongle2/memmem.h A chan-dongle2/README.txt A chan-dongle2/etc A chan-dongle2/etc/extensions.conf A chan-dongle2/etc/dongle.conf Checked out revision 42. |
#ls
app.c at_read.c channel.h COPYRIGHT.txt helpers.h mixbuffer.c ringbuffer.c app.h at_read.h char_conv.c cpvt.c INSTALL mixbuffer.h ringbuffer.h at_command.c at_response.c char_conv.h cpvt.h LICENSE.txt mutils.h single.c at_command.h at_response.h cli.c dc_config.c Makefile.in pdiscovery.c stamp-h.in at_parse.c BUGS cli.h dc_config.h manager.c pdiscovery.h test at_parse.h chan_dongle.c config.h.in etc manager.h pdu.c TODO.txt at_queue.c chan_dongle.h configure.in export.h memmem.c pdu.h tools at_queue.h channel.c contrib helpers.c memmem.h README.txt |
#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 |
#automake
automake: no `Makefile.am' found for any configure output |
#automake -a
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 |
#cp etc/dongle.conf /etc/asterisk/
|
#vim /etc/asterisk/dongle.conf
--- /tmp/l3-saved-3572.8879.25560 2014-11-27 17:00:50.682602902 +0200 +++ /etc/asterisk/dongle.conf 2014-11-27 17:01:26.542602880 +0200 @@ -83,8 +83,8 @@ ; 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 -rvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 18376) ... == Starting Dongle/dongle0-0100000002 at default,+1234567890,1 failed so falling back to exten 's' == Starting Dongle/dongle0-0100000002 at default,s,1 still failed so falling back to context 'default' [Nov 27 17:22:06] WARNING[18795]: pbx.c:5367 __ast_pbx_run: Channel 'Dongle/dongle0-0100000002' sent into invalid extension 's' in context 'default', but no invalid handler -- Remote UNIX connection disconnected -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes debian6*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 18376) ... debian6*CLI> dongle ussd dongle0 *101# [dongle0] USSD queued for send with id 0x1785fa0 -- [dongle0] Successfully sent USSD 0x1785fa0 [Nov 27 17:13:50] NOTICE[18608]: at_response.c:267 at_response_ok: [dongle0] Successfully sent USSD 0x1785fa0 [dongle0] Got USSD type 2 'USSD Terminated by network': '' == Starting Local/ussd@default-0ed3;1 at default,ussd,1 failed so falling back to exten 's' == Starting Local/ussd@default-0ed3;1 at default,s,1 still failed so falling back to context 'default' [Nov 27 17:13:52] WARNING[18617]: pbx.c:5367 __ast_pbx_run: Channel 'Local/ussd@default-0ed3;1' sent into invalid extension 's' in context 'default', but no invalid handler debian6*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-18582.10917.23040 2014-11-27 17:14:30.018602358 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 17:16:25.474602281 +0200 @@ -90,6 +90,11 @@ include => parkedcalls +; звонки на украинские номера идут через модем +; с плюсом и без +exten => _+380XXXXXXXXX,1,Dial(Dongle/dongle0/${EXTEN}) +exten => _380XXXXXXXXX,1,Dial(Dongle/dongle0/+${EXTEN}) + [local] ;внутренние звонки |
#ls
1 extensions.conf.bak sent voicemail.conf.bak asterisk-core-sounds-ru-gsm-current.tar.gz extensions.conf.bak2 sip.conf.back |
#ls /tmp/
belki.wav gnash-cookies.6efRit orbit-user someone-called-8300 tracker-user burunduki.wav hello-en.wav pulse-134TkwqLW5kH someone-called-8301 call.call hello-ru.wav pulse-8xTeRLrWdHxS ssh-eSqVI977c3IR |
##ls /tmp/
|
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 18376) ... debian6*CLI> == Using SIP RTP CoS mark 5 [Nov 27 17:17:50] NOTICE[18399]: chan_sip.c:22753 handle_request_invite: Call from '2301' (192.168.60.100:5060) to extension '0665097199' rejected because extension not found in context 'gr1'. == Using SIP RTP CoS mark 5 -- Executing [380665097199@gr1:1] Dial("SIP/2301-00000000", "Dongle/dongle0/+380665097199") in new stack -- Called Dongle/dongle0/+380665097199 -- Dongle/dongle0-0100000000 is making progress passing it to SIP/2301-00000000 -- Dongle/dongle0-0100000000 answered SIP/2301-00000000 debian6*CLI> quit Executing last minute cleanups |
## я так понимаю работает
|
##yes
|
## теперь в обратную сторону
|
#less /etc/asterisk/dongle.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-18582.2539.19662 2014-11-27 17:20:40.914602109 +0200 +++ /etc/asterisk/extensions.conf 2014-11-27 17:21:29.298602078 +0200 @@ -1,5 +1,10 @@ [default] +[gsm-incoming] + +; теперь будет звонить на первый телефон Сергея +exten => s,1,Dial(SIP/2301) + [menu] ;menu cc |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 18376) ... debian6*CLI> == Starting Dongle/dongle0-0100000001 at default,+1234567890,1 failed so falling back to exten 's' == Starting Dongle/dongle0-0100000001 at default,s,1 still failed so falling back to context 'default' [Nov 27 17:21:46] WARNING[18793]: pbx.c:5367 __ast_pbx_run: Channel 'Dongle/dongle0-0100000001' sent into invalid extension 's' in context 'default', but no invalid handler debian6*CLI> == Starting Dongle/dongle0-0100000002 at default,+1234567890,1 failed so falling back to exten 's' == Starting Dongle/dongle0-0100000002 at default,s,1 still failed so falling back to context 'default' [Nov 27 17:22:06] WARNING[18795]: pbx.c:5367 __ast_pbx_run: Channel 'Dongle/dongle0-0100000002' sent into invalid extension 's' in context 'default', but no invalid handler debian6*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 18825) ... debian6*CLI> debian6*CLI> debian6*CLI> debian6*CLI> debian6*CLI> [dongle0] Got SMS from +380509721434: 'Тест связи!' -- Executing [sms@gsm-incoming:1] System("Local/sms@gsm-incoming-502a;1", "sh -c "echo Тест связи! >> /tmp/sms.log"") in new stack -- Auto fallthrough, channel 'Local/sms@gsm-incoming-502a;1' status is 'UNKNOWN' debian6*CLI> quit Executing last minute cleanups |
#cat /tmp/sms.log
Тест связи! |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 18825) Verbosity is at least 3 debian6*CLI> debian6*CLI> dongle ussd dongle0 *101# [dongle0] USSD queued for send with id 0x2b3c5b0 -- [dongle0] Successfully sent USSD 0x2b3c5b0 [Nov 27 17:26:31] NOTICE[18882]: at_response.c:267 at_response_ok: [dongle0] Successfully sent USSD 0x2b3c5b0 [dongle0] Got USSD type 2 'USSD Terminated by network': '' -- Executing [ussd@gsm-incoming:1] System("Local/ussd@gsm-incoming-26a7;1", "sh -c "echo >> /tmp/ussd.log"") in new stack -- Auto fallthrough, channel 'Local/ussd@gsm-incoming-26a7;1' status is 'UNKNOWN' debian6*CLI> quit Executing last minute cleanups |
#cat /tmp/ussd.log
|
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 18825) Verbosity is at least 3 debian6*CLI> dongle ussd dongle0 *101 [dongle0] USSD queued for send with id 0x2b42870 -- [dongle0] Successfully sent USSD 0x2b42870 [Nov 27 17:26:54] NOTICE[18882]: at_response.c:267 at_response_ok: [dongle0] Successfully sent USSD 0x2b42870 [dongle0] Got USSD type 2 'USSD Terminated by network': '' -- Executing [ussd@gsm-incoming:1] System("Local/ussd@gsm-incoming-20e4;1", "sh -c "echo >> /tmp/ussd.log"") in new stack -- Auto fallthrough, channel 'Local/ussd@gsm-incoming-20e4;1' status is 'UNKNOWN' debian6*CLI> debian6*CLI> quit Executing last minute cleanups |
#cat /tmp/ussd.log
|
#vim /etc/asterisk/extensions.conf
|
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 18825) ... show sms start stop ussd debian6*CLI> dongle sms dongle0 Usage: dongle sms <device> <number> <message> Send a SMS to <number> with the <message> from <device> debian6*CLI> dongle sms dongle0 +380662707273 "Hello from Asterisk" [dongle0] SMS queued for send with id 0x2b3b200 -- [dongle0] Successfully sent SMS message 0x2b3b200 [Nov 27 17:31:55] NOTICE[18882]: at_response.c:257 at_response_ok: [dongle0] Successfully sent SMS message 0x2b3b200 debian6*CLI> quit Executing last minute cleanups |
#asterisk -rx 'dongle sms dongle0 +380662707273 "Hello from Asterisk once again"'
[dongle0] SMS queued for send with id 0x2b26580 |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3858.1593.11306 2014-11-28 10:02:46.979470074 +0200 +++ /etc/asterisk/extensions.conf 2014-11-28 10:23:07.235453726 +0200 @@ -1,7 +1,27 @@ [default] +[gsm-card0] +; для каждой карточки если надо +[gsm-card1] + [gsm-incoming] +; ${DONGLENUMBER} -- номер на который пришёл звонок + +; как сделать красивый маппинг? +; +380501234567 => 3301 +; +380502233445 => 3302 +; через базу данных: +; database set gsm-incoming +380501234567 3301 +; database set gsm-incoming +380502233445 3302 +; и используете в диалплане так: +; Dial(SIP/${DB(gsm-incoming/${DONGLENUMBER})}) + +; exten => _33XX,1,Dial(SIP/${EXTEN},5) +; exten => _33XX,n,Dial(SIP/${DB(redirect/${EXTEN})}) +; только сначала нужно прописать мобильные телефоны в базе redirect: +; database put redirect 3301 +380503322117 + ; теперь будет звонить на первый телефон Сергея ;exten => s,1,Dial(SIP/2301) @@ -103,8 +123,16 @@ ; звонки на украинские номера идут через модем ; с плюсом и без -exten => _+380XXXXXXXXX,1,Dial(Dongle/dongle0/${EXTEN}) -exten => _380XXXXXXXXX,1,Dial(Dongle/dongle0/+${EXTEN}) + +; это были исходящие звонки +exten => _+38067XXXXXXX,1,Dial(Dongle/p:Kievstar/${EXTEN}) +exten => _38067XXXXXXX,1,Dial(Dongle/p:Kievstar/+${EXTEN}) + +exten => _+38063XXXXXXX,1,Dial(Dongle/p:ASTELIT/${EXTEN}) +exten => _38063XXXXXXX,1,Dial(Dongle/p:ASTELIT/+${EXTEN}) + +exten => _+38050XXXXXXX,1,Dial(Dongle/p:MTS/${EXTEN}) +exten => _38050XXXXXXX,1,Dial(Dongle/p:MTS/+${EXTEN}) [local] ;внутренние звонки |
#w
10:04:04 up 24 min, 4 users, load average: 0.06, 0.05, 0.11 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user tty7 :0 09:40 24:03 13.72s 0.07s gdm-session-worker [pam/gdm3] user pts/0 :0 09:41 4.00s 0.10s 0.96s gnome-terminal user pts/3 :0 09:41 44.00s 0.07s 0.03s ssh user@192.168.12.254 root pts/4 192.168.12.254 10:02 12.00s 0.07s 0.00s script -f -c bash -q /root/.lilalo//272701148987512 |
#w
10:04:04 up 24 min, 4 users, load average: 0.06, 0.05, 0.11 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user tty7 :0 09:40 24:03 13.72s 0.07s gdm-session-worker [pam/gdm3] user pts/0 :0 09:41 4.00s 0.10s 0.96s gnome-terminal user pts/3 :0 09:41 44.00s 0.07s 0.03s ssh user@192.168.12.254 root pts/4 192.168.12.254 10:02 12.00s 0.07s 0.00s script -f -c bash -q /root/.lilalo//272701148987512 |
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 05) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5) 00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) 00:1f.0 ISA bridge: Intel Corporation H67 Express Chipset Family LPC Controller (rev 05) 00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 05) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05) 01:00.0 PCI bridge: Integrated Technology Express, Inc. Device 8892 (rev 10) 02:00.0 Ethernet controller: Digium, Inc. Wildcard TDM800P 8-port analog card (rev 11) 03:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03) 04:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6315 Series Firewire Controller (rev 01) |
#ls -l
total 2048 -rw-r--r-- 1 root root 736 Nov 25 15:28 1 -rw-r--r-- 1 root root 2050757 Sep 7 02:39 asterisk-core-sounds-ru-gsm-current.tar.gz -rw-r--r-- 1 root root 822 Nov 26 09:52 extensions.conf.bak -rw-r--r-- 1 root root 1188 Nov 26 12:11 extensions.conf.bak2 -rw------- 1 root root 682 Nov 26 10:59 sent -rw-r--r-- 1 root root 129 Nov 25 10:19 sip.conf.back -rw-r----- 1 root root 21238 Nov 26 09:59 voicemail.conf.bak |
#asterisk -rx "dialplan eload"
No such command 'dialplan eload' (type 'core show help dialplan eload' for other possible commands) |
#asterisk -rx "dialplan eload"
No such command 'dialplan eload' (type 'core show help dialplan eload' for other possible commands) |
#asterisk -rvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 2477) ... [Nov 28 14:11:10] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:11:25] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:11:40] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:11:55] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:12:10] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:12:25] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:12:40] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory debian6*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#asterisk -rvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 2477) ... [Nov 28 14:11:10] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:11:25] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:11:40] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:11:55] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:12:10] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:12:25] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory [Nov 28 14:12:40] WARNING[2561]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory debian6*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#scp root@192.168.50.1://etc/asterisk/extensions.conf extensions.conf.pri
The authenticity of host '192.168.50.1 (192.168.50.1)' can't be established. ECDSA key fingerprint is 2f:55:30:bf:42:64:f6:ec:16:a0:57:a3:f2:87:cb:69. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.50.1' (ECDSA) to the list of known hosts. root@192.168.50.1's password: extensions.conf 100% 8773 8.6KB/s 00:00 |
#scp root@192.168.50.1://etc/asterisk/extensions.conf extensions.conf.pri
The authenticity of host '192.168.50.1 (192.168.50.1)' can't be established. ECDSA key fingerprint is 2f:55:30:bf:42:64:f6:ec:16:a0:57:a3:f2:87:cb:69. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.50.1' (ECDSA) to the list of known hosts. root@192.168.50.1's password: extensions.conf 100% 8773 8.6KB/s 00:00 |
Тест связи!
Время первой команды журнала | 15:26:10 2014-11-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:14:38 2014-11-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 17.82 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.88 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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