Журнал лабораторных работ

Содержание

Журнал

Четверг (11/27/14)

/dev/pts/5
16:00:22
#cp etc/dongle.conf /etc/asterisk/

16:00:31
#vim /etc/asterisk/dongle.conf
16:01:23
## всё

16:01:25
#â„# попробуем что будет

16:01:30
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
16:01:35
#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
16:01:57
## что-то не заработало

16:02:02
## что-то нÐ# попробуеÐÐ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
16:02:34
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
16:02:50
#less /var/log/messages ^C
16:03:00
#less /var/log/messages
16:04:43
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
16:04:52
#asterisk -rvvvv
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 debian2 (pid = 11564)
Verbosity was 0 and is now 4
debian2*CLI> dongle show devic
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
debian2*CLI> quit
Executing last minute cleanups
16:05:06
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk.
16:05:12
#lsmod | head
Module                  Size  Used by
option                 37168  0
usb_wwan               17320  1 option
usbserial              32061  2 usb_wwan,option
usb_storage            43870  0
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
binfmt_misc            12957  1
nfsd                  216181  2
16:05:20
#modprobe -r option

16:05:26
#lsmod | head
Module                  Size  Used by
usb_storage            43870  0
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
binfmt_misc            12957  1
nfsd                  216181  2
nfs                   308353  0
nfs_acl                12511  2 nfs,nfsd
auth_rpcgss            37143  2 nfs,nfsd
16:05:28
#modprobe usb_wwan

16:05:40
#lsmod
Module                  Size  Used by
usb_wwan               17320  0
usbserial              32061  1 usb_wwan
usb_storage            43870  0
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
binfmt_misc            12957  1
nfsd                  216181  2
nfs                   308353  0
...
xhci_hcd               73413  0
ahci                   24997  3
libahci                22941  1 ahci
ehci_hcd               40249  0
libata                140630  2 libahci,ahci
scsi_mod              162321  5 libata,sd_mod,sg,sr_mod,usb_storage
tg3                   119064  0
libphy                 19057  1 tg3
usbcore               128741  8 ehci_hcd,xhci_hcd,ohci_hcd,usbhid,usb_storage,usbserial,usb_wwan
usb_common             12354  1 usbcore
16:05:41
#lsmod | head
Module                  Size  Used by
usb_wwan               17320  0
usbserial              32061  1 usb_wwan
usb_storage            43870  0
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
binfmt_misc            12957  1
nfsd                  216181  2
nfs                   308353  0
16:05:44
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk.
16:05:51
#asterisk -rvvvv
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 debian2 (pid = 11717)
Verbosity was 0 and is now 4
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
debian2*CLI> quit
Executing last minute cleanups
16:05:57
#less /var/log/messages
16:06:31
#less /var/log/messages
16:06:37
#exit
exit
Connection to m2 closed.
16:06:53
#ssh m8
Linux debian8 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Nov 27 13:56:58 2014 from 192.168.12.254
l3-agent is already running: pid=3660; pidfile=/root/.lilalo/l3-agent.pid
16:07:54
#ls -l ls -ls /usr/lib/asterisk/modules/chan_dongle.so /usr
ls: cannot access ls: No such file or directory
192 -rwxr-xr-x  1 root root 193112 Nov 27 16:55 /usr/lib/asterisk/modules/chan_dongle.so
/usr:
total 136
56 drwxr-xr-x   2 root root  53248 Nov 27 16:52 bin
 4 drwxr-xr-x   2 root root   4096 Nov 23 12:49 games
 4 drwxr-xr-x  40 root root   4096 Nov 27 16:48 include
40 drwxr-xr-x 169 root root  36864 Nov 27 09:48 lib
 4 drwxrwsr-x  10 root staff  4096 Nov 27 16:28 local
12 drwxr-xr-x   2 root root  12288 Nov 27 09:48 sbin
12 drwxr-xr-x 306 root root  12288 Nov 27 16:52 share
 4 drwxr-xr-x   5 root root   4096 Nov 26 14:09 src
16:07:56
#ssh m8
Linux debian8 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Nov 27 17:07:39 2014 from 192.168.12.254
l3-agent is already running: pid=3660; pidfile=/root/.lilalo/l3-agent.pid
16:07:57
#/lls -ls /usr/lib/asterisk/modules/chan_dongle.so
bash: /lls: No such file or directory
16:07:58
#ls -ls /usr/lib/asterisk/modules/chan_dongle.so
192 -rwxr-xr-x 1 root root 193112 Nov 27 16:55 /usr/lib/asterisk/modules/chan_dongle.so
16:08:00
## я буду делать

16:08:02
#â„# сейчас посмотрим

16:08:09
#vim /etc/asterisk/dongle.conf
16:08:18
#; you can use both imei and imsi together in this case exact match by imei and imsi required
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
16:08:25
#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 debian8 (pid = 13900)
...
    -- [dongle0] Dongle has disconnected
    -- [dongle0] Trying to connect on /dev/ttyUSB2...
    -- [dongle0] Dongle has connected, initializing...
[Nov 27 17:08:55] ERROR[13956]: at_response.c:364 at_response_error: [dongle0] Getting IMSI number failed
    -- [dongle0] Error initializing Dongle
    -- [dongle0] Dongle has disconnected
    -- [dongle0] Trying to connect on /dev/ttyUSB2...
[Nov 27 17:09:10] WARNING[13940]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory
debian8*CLI> quit
Executing last minute cleanups
16:09:21
#less /var/log/messages
16:09:33
#lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 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 003 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 003 Device 003: ID 046d:c312 Logitech, Inc. DeLuxe 250 Keyboard
Bus 003 Device 004: ID 09da:000a A4 Tech Co., Ltd Optical Mouse Opto 510D
16:09:35
#lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 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 003 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 003 Device 003: ID 046d:c312 Logitech, Inc. DeLuxe 250 Keyboard
Bus 003 Device 004: ID 09da:000a A4 Tech Co., Ltd Optical Mouse Opto 510D
Bus 003 Device 006: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
16:09:54
## если это стыарый моедем, то он не работает

16:10:11
##новый

16:10:19
## тогда странно, потому что у сергея работает

16:10:26
#exit
exit
Connection to m8 closed.
16:10:43
#cd

16:10:55
#ls -lt | head
total 8
-rw-r--r-- 1 root root 257 Nov 24 07:24 create-vlans
-rw-r--r-- 1 root root 754 Nov 24 06:41 ports
16:10:57
#ssh m8
Linux debian8 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Nov 27 17:07:53 2014 from 192.168.12.254
l3-agent is already running: pid=3660; pidfile=/root/.lilalo/l3-agent.pid
16:10:59
#cd chan-dongle/

16:11:04
#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
16:11:04
#exit
exit
Connection to m8 closed.
16:11:21
#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
16:11:22
#ssh m6
Linux debian6 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Nov 27 13:58:52 2014 from 192.168.12.254
l3-agent is already running: pid=3416; pidfile=/root/.lilalo/l3-agent.pid
16:14:22
#vim /etc/asterisk/extensions.conf
16:16:25
#ls
1                                           extensions.conf.bak   sent           voicemail.conf.bak
asterisk-core-sounds-ru-gsm-current.tar.gz  extensions.conf.bak2  sip.conf.back
16:16:27
#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
16:16:35
##ls /tmp/

16:17:19
#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
16:18:44
## я так понимаю работает

16:18:50
##yes

16:18:56
## теперь в обратную сторону

16:19:14
#less /etc/asterisk/dongle.conf
16:20:34
#vim /etc/asterisk/extensions.conf
16:21:29
#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
16:22:09
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
16:25:36
#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
16:26:07
#cat /tmp/sms.log
Тест связи!
16:26:12
#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
16:26:40
#cat /tmp/ussd.log

16:26:43
#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
16:27:02
#cat /tmp/ussd.log

16:27:03
#vim /etc/asterisk/extensions.conf
16:29:04
#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
16:32:00
#asterisk -rx 'dongle sms dongle0 +380662707273 "Hello from Asterisk once again"'
[dongle0] SMS queued for send with id 0x2b26580
16:32:22
#exit
exit
Connection to m6 closed.
прошло 11 минут
16:43:46
#all init 0
3: ssh: connect to host m3 port 22: No route to host
5: ssh: connect to host m5 port 22: Connection timed out
8: ssh: connect to host m8 port 22: Connection timed out
16:45:57
#logout
l3script: logout: not login shell: use `exit'
прошло 12 минут
16:58:27
#exi
l3script: exi: command not found

Пятница (11/28/14)

/dev/pts/11
09:02:37
#ssh m6
Linux debian6 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Nov 27 17:11:20 2014 from 192.168.12.254
l3-agent is already running: pid=3475; pidfile=/root/.lilalo/l3-agent.pid
09:02:38
#vim /etc/asterisk/extensions.conf
прошло 20 минут
09:23:17
#exit
exit
Connection to m6 closed.
09:23:24
#_ настрокйка карточки PRI

09:23:40
#all lspci | grep -i digium
6: 02:00.0 Ethernet controller: Digium, Inc. Wildcard TDM800P 8-port analog card (rev 11)
09:23:48
## как видите карточка стоит в машине 6

09:23:58
#â„# анаÐлоговая

09:24:10
#â„# это правда не pri

09:24:36
#ssh m5
Linux debian5 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Nov 27 11:20:36 2014 from 192.168.12.254
l3-agent is already running: pid=3833; pidfile=/root/.lilalo/l3-agent.pid
09:24:45
#lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Root Complex
00:00.2 IOMMU: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) I/O Memory Management Unit
00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Trinity [Radeon HD 7660D]
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Trinity HDMI Audio Controller
00:10.0 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:10.1 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:11.0 SATA controller: Advanced Micro Devices [AMD] FCH SATA Controller [IDE mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:12.2 USB controller: Advanced Micro Devices [AMD] FCH USB EHCI Controller (rev 11)
00:13.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
...
00:14.5 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:15.0 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 0)
00:15.2 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 5
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
09:24:49
#exit
exit
Connection to m5 closed.
09:26:22
#all lspci | grep -i broadcom
1: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
2: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
3: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
4: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
5: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
7: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
09:26:36
## digium стоит в слоте 0 на шине 2

09:27:28
#â„# шина 2 это внÐешняя (по отношению к чипсету) шина PCI

09:28:21
#ssh m6
Linux debian6 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Nov 28 10:02:38 2014 from 192.168.12.254
l3-agent is already running: pid=3475; pidfile=/root/.lilalo/l3-agent.pid
09:28:49
#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)
09:28:51
#exit
exit
Connection to m6 closed.
09:29:17
#ssh m5
^C
09:34:31
#all lspci | grep -i broadcom
1: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
2: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
3: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
4: 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
^C
09:34:33
#all lspci | grep -i digium
5: 01:00.0 Network controller: Digium, Inc. Device 800b (rev 02)
6: 02:00.0 Ethernet controller: Digium, Inc. Wildcard TDM800P 8-port analog card (rev 11)
09:35:55
#screen -ls
/dev/pts/11
09:37:37
##screen -ls

прошло 57 минут
10:35:25
#all lspci | grep -i dahdi

10:35:35
#all lspci | grep -i digium
5: 01:00.0 Network controller: Digium, Inc. Device 800b (rev 02)
6: 02:00.0 Ethernet controller: Digium, Inc. Wildcard TDM800P 8-port analog card (rev 11)
10:35:43
#ssh m5
Linux debian5 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Nov 28 10:24:45 2014 from 192.168.12.254
l3-agent is already running: pid=3284; pidfile=/root/.lilalo/l3-agent.pid
10:35:43
#lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Root Complex
00:00.2 IOMMU: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) I/O Memory Management Unit
00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Trinity [Radeon HD 7660D]
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Trinity HDMI Audio Controller
00:10.0 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:10.1 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:11.0 SATA controller: Advanced Micro Devices [AMD] FCH SATA Controller [IDE mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:12.2 USB controller: Advanced Micro Devices [AMD] FCH USB EHCI Controller (rev 11)
00:13.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
...
00:15.0 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 0)
00:15.2 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 5
01:00.0 Network controller: Digium, Inc. Device 800b (rev 02)
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)

Файлы

  • /tmp/sms.log
  • /tmp/ussd.log
  • /tmp/sms.log
    >
    Тест связи!
    
    /tmp/ussd.log
    >

    Статистика

    Время первой команды журнала16:00:22 2014-11-27
    Время последней команды журнала10:35:43 2014-11-28
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 3.96
    Процент синтаксически неверно набранных команд, % 1.98
    Суммарное время работы с терминалом *, час 1.56
    Количество командных строк в единицу времени, команда/мин 1.08
    Частота использования команд
    asterisk12|==========| 10.81%
    #10|=========| 9.01%
    ssh9|========| 8.11%
    all7|======| 6.31%
    exit7|======| 6.31%
    /etc/init.d/asterisk6|=====| 5.41%
    vim6|=====| 5.41%
    less6|=====| 5.41%
    grep6|=====| 5.41%
    ls6|=====| 5.41%
    â„#5|====| 4.50%
    head4|===| 3.60%
    lsmod4|===| 3.60%
    lspci3|==| 2.70%
    cat3|==| 2.70%
    lsusb2|=| 1.80%
    cd2|=| 1.80%
    modprobe2|=| 1.80%
    #yes1|| 0.90%
    #screen1|| 0.90%
    screen1|| 0.90%
    #ls1|| 0.90%
    _1|| 0.90%
    cp1|| 0.90%
    #новый1|| 0.90%
    /lls1|| 0.90%
    exi1|| 0.90%
    logout1|| 0.90%
    you1|| 0.90%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ 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
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$