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

Содержание

Журнал

Суббота (04/26/14)

/dev/pts/5
10:06:51
#find /sys -name \*02:00.0\*
/sys/devices/pci0000:00/0000:00:1c.4/0000:02:00.0
/sys/bus/pci/devices/0000:02:00.0
10:06:52
#modprobe wcte13xp

10:07:03
#find /sys -name \*02:00.0\*
/sys/devices/pci0000:00/0000:00:1c.4/0000:02:00.0
/sys/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/pci:0000:02:00.0
/sys/bus/pci/devices/0000:02:00.0
/sys/bus/pci/drivers/wcte13xp/0000:02:00.0
/sys/bus/dahdi_devices/devices/pci:0000:02:00.0
10:07:05
#ршÑршÐÑhistory
   38  nano /etc/group
   39  ls  -ld  /var/spool/asterisk/monitor/
   40  chmod 777  /var/spool/asterisk/monitor/
   41  ls  -ld  /var/spool/asterisk/monitor/
   42  /etc/init.d/samba restart
   43  nano /etc/samba/smb.conf
   44  ls  -ld  /var/spool/asterisk/monitor/
   45  ls  -l  /var/spool/asterisk/monitor/
   46  nano /etc/asterisk/voicemail.conf
   47  nano /etc/asterisk/extensions.conf
...
  528  history
  529  lsmod | head
  530  modinfo wcte13xp
  531  lspci
  532  find /sys -name \*02:00.0\*
  533  modprobe -r wcte13xp
  534  find /sys -name \*02:00.0\*
  535  modprobe wcte13xp
  536  find /sys -name \*02:00.0\*
  537  history
10:10:25
#history | less
10:11:36
#ls /lib/modules/3.2.0-4-amd64/
build   modules.alias      modules.builtin.bin  modules.devname  modules.symbols      staging
dahdi   modules.alias.bin  modules.dep          modules.order    modules.symbols.bin
kernel  modules.builtin    modules.dep.bin      modules.softdep  source
10:12:06
#ls -l /lib/modules/3.2.0-4-amd64/
итого 2960
lrwxrwxrwx  1 root root     36 Фев  2 03:19 build -> /usr/src/linux-headers-3.2.0-4-amd64
drwxr-xr-x 14 root root   4096 Апр 26 10:59 dahdi
drwxr-xr-x 10 root root   4096 Апр 22 12:23 kernel
-rw-r--r--  1 root root 728174 Апр 26 11:01 modules.alias
-rw-r--r--  1 root root 702918 Апр 26 11:01 modules.alias.bin
-rw-r--r--  1 root root   2880 Фев  2 02:51 modules.builtin
-rw-r--r--  1 root root   3821 Апр 26 11:01 modules.builtin.bin
-rw-r--r--  1 root root 332162 Апр 26 11:01 modules.dep
-rw-r--r--  1 root root 459376 Апр 26 11:01 modules.dep.bin
-rw-r--r--  1 root root    325 Апр 26 11:01 modules.devname
-rw-r--r--  1 root root 108907 Фев  2 02:51 modules.order
-rw-r--r--  1 root root    131 Апр 26 11:01 modules.softdep
-rw-r--r--  1 root root 289378 Апр 26 11:01 modules.symbols
-rw-r--r--  1 root root 366534 Апр 26 11:01 modules.symbols.bin
lrwxrwxrwx  1 root root     37 Фев  2 03:19 source -> /usr/src/linux-headers-3.2.0-4-common
drwxr-xr-x  3 root root   4096 Апр 26 10:48 staging
10:12:23
#cat /lib/modules/3.2.0-4-amd64/modules.* | less
10:12:43
#ls -l /lib/modules/3.2.0-4-amd64/
итого 2960
lrwxrwxrwx  1 root root     36 Фев  2 03:19 build -> /usr/src/linux-headers-3.2.0-4-amd64
drwxr-xr-x 14 root root   4096 Апр 26 10:59 dahdi
drwxr-xr-x 10 root root   4096 Апр 22 12:23 kernel
-rw-r--r--  1 root root 728174 Апр 26 11:01 modules.alias
-rw-r--r--  1 root root 702918 Апр 26 11:01 modules.alias.bin
-rw-r--r--  1 root root   2880 Фев  2 02:51 modules.builtin
-rw-r--r--  1 root root   3821 Апр 26 11:01 modules.builtin.bin
-rw-r--r--  1 root root 332162 Апр 26 11:01 modules.dep
-rw-r--r--  1 root root 459376 Апр 26 11:01 modules.dep.bin
-rw-r--r--  1 root root    325 Апр 26 11:01 modules.devname
-rw-r--r--  1 root root 108907 Фев  2 02:51 modules.order
-rw-r--r--  1 root root    131 Апр 26 11:01 modules.softdep
-rw-r--r--  1 root root 289378 Апр 26 11:01 modules.symbols
-rw-r--r--  1 root root 366534 Апр 26 11:01 modules.symbols.bin
lrwxrwxrwx  1 root root     37 Фев  2 03:19 source -> /usr/src/linux-headers-3.2.0-4-common
drwxr-xr-x  3 root root   4096 Апр 26 10:48 staging
10:12:44
#lspci -n
00:00.0 0600: 8086:0100 (rev 09)
00:02.0 0300: 8086:0102 (rev 09)
00:16.0 0780: 8086:1c3a (rev 04)
00:16.3 0700: 8086:1c3d (rev 04)
00:19.0 0200: 8086:1502 (rev 04)
00:1a.0 0c03: 8086:1c2d (rev 04)
00:1b.0 0403: 8086:1c20 (rev 04)
00:1c.0 0604: 8086:1c10 (rev b4)
00:1c.4 0604: 8086:1c18 (rev b4)
00:1c.6 0604: 8086:1c1c (rev b4)
00:1c.7 0604: 8086:1c1e (rev b4)
00:1d.0 0c03: 8086:1c26 (rev 04)
00:1e.0 0604: 8086:244e (rev a4)
00:1f.0 0601: 8086:1c4e (rev 04)
00:1f.2 0104: 8086:2822 (rev 04)
00:1f.3 0c05: 8086:1c22 (rev 04)
02:00.0 0280: d161:800a (rev 02)
10:14:14
#lsmod | less
10:14:34
#lsmod | head
Module                  Size  Used by
wcte13xp               40794  0
oct612x               150308  1 wcte13xp
dahdi                 192614  2 oct612x,wcte13xp
crc_ccitt              12347  1 dahdi
rfcomm                 33700  0
bnep                   17567  2
bluetooth             119455  10 bnep,rfcomm
binfmt_misc            12957  1
nfsd                  216170  2
10:14:38
#dahdi_genconf

10:14:51
#dahdi_genconf -v
Default parameters from /etc/dahdi/genconf_parameters
Generating /etc/dahdi/assigned-spans.conf
Generating /etc/dahdi/system.conf
Generating /etc/asterisk/dahdi-channels.conf
10:15:14
#cat /etc/dahdi/system.conf
# Autogenerated by /usr/sbin/dahdi_genconf on Sat Apr 26 11:15:14 2014
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCT13x/0 "Wildcard TE131/TE133 Card 0" (MASTER)
span=1,1,0,esf,b8zs
# termtype: te
bchan=1-23
dchan=24
echocanceller=mg2,1-23
# Global data
loadzone        = us
defaultzone     = us
10:15:35
#vim /etc/dahdi/system.conf
10:22:15
#dahdi_cfg -v
DAHDI Tools Version - 2.9.1
DAHDI Version: 2.9.1.1
Echo Canceller(s): HWEC
Configuration
======================
SPAN 1: ESF/B8ZS Build-out: 0 db (CSU)/0-133 feet (DSX-1)
24 channels to configure.
Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
...
Setting echocan for channel 15 to mg2
Setting echocan for channel 16 to mg2
Setting echocan for channel 17 to mg2
Setting echocan for channel 18 to mg2
Setting echocan for channel 19 to mg2
Setting echocan for channel 20 to mg2
Setting echocan for channel 21 to mg2
Setting echocan for channel 22 to mg2
Setting echocan for channel 23 to mg2
Setting echocan for channel 24 to none
10:25:37
#cd

10:25:39
#less /etc/asterisk/dahdi-channels.conf
прошло 19 минут
10:44:44
#~
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
10:44:50
#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 debian1 (pid = 26805)
Verbosity was 0 and is now 3
debian1*CLI> da
data      database
debian1*CLI> data
data      database
debian1*CLI> quit
Executing last minute cleanups
10:45:45
#less /var/log/messages
10:46:01
#less /var/log/asterisk/messages
10:47:03
#reboot
Broadcast message from root@debian1 (pts/2) (Sat Apr 26 11:47:15 2014):
The system is going down for reboot NOW!
10:47:19
#ping 192.168.12.1
PING 192.168.12.1 (192.168.12.1) 56(84) bytes of data.
From 192.168.12.254 icmp_seq=1 Destination Host Unreachable
From 192.168.12.254 icmp_seq=2 Destination Host Unreachable
From 192.168.12.254 icmp_seq=5 Destination Host Unreachable
From 192.168.12.254 icmp_seq=8 Destination Host Unreachable
From 192.168.12.254 icmp_seq=11 Destination Host Unreachable
From 192.168.12.254 icmp_seq=14 Destination Host Unreachable
From 192.168.12.254 icmp_seq=17 Destination Host Unreachable
64 bytes from 192.168.12.1: icmp_req=19 ttl=64 time=0.388 ms
64 bytes from 192.168.12.1: icmp_req=20 ttl=64 time=0.226 ms
64 bytes from 192.168.12.1: icmp_req=21 ttl=64 time=0.177 ms
64 bytes from 192.168.12.1: icmp_req=22 ttl=64 time=0.248 ms
64 bytes from 192.168.12.1: icmp_req=23 ttl=64 time=0.146 ms
64 bytes from 192.168.12.1: icmp_req=24 ttl=64 time=0.189 ms
64 bytes from 192.168.12.1: icmp_req=25 ttl=64 time=0.155 ms
^C
--- 192.168.12.1 ping statistics ---
25 packets transmitted, 7 received, +7 errors, 72% packet loss, time 23999ms
rtt min/avg/max/mdev = 0.146/0.218/0.388/0.078 ms, pipe 2
10:48:30
#ssh 192.168.12.1
root@debian1:~#
root@debian1:~#
root@debian1:~# l3script
10:49:04
#less /var/log/messages
10:50:58
#less /var/log/asterisk/messages
10:52:41
#less /var/log/asterisk/messages
10:54:50
#ls /usr/src/
dahdi-linux-complete-2.9.1.1+2.9.1                            linux-headers-3.2.0-4-amd64
dahdi-linux-complete-current.tar.gz                           linux-headers-3.2.0-4-common
dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.54-2_amd64.deb  linux-kbuild-3.2
dahdi.tar.bz2                                                 modules
linux                                                         vpb-driver.tar.bz2
10:57:09
#vim /etc/sys
10:57:09
#vim /etc/dahdi/
10:57:09
#vim /etc/dahdi/system.conf
10:58:11
#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 debian1 (pid = 6855)
...
 pseudo            default                    default                         In Service
      1            gr1                        default                         In Service
debian1*CLI> pri show
channels  debug     span      spans     version
debian1*CLI> pri show sp
spans  span
debian1*CLI> pri show spans
PRI span 1/0: Down, Active
debian1*CLI> quit
Executing last minute cleanups
11:01:12
#exit
exit
root@debian1:~# exit
logout
Connection to 192.168.12.1 closed.
11:01:15
#ssh 192.168.12.2
;threewaycalling = yes
;transfer = yes
;context = phones
;faxdetect = incoming
;
;[phone-1](phones)
;dahdichan = 1
;callerid = My Name <501>
;mailbox = 501@mailboxes
;
...
     19            gr_relay                   default                         In Service
     20            gr_relay                   default                         In Service
     21            gr_relay                   default                         In Service
     22            gr_relay                   default                         In Service
     23            gr_relay                   default                         In Service
debian2*CLI> quit
Executing last minute cleanups
root@debian2:~# exit
logout
Connection to 192.168.12.2 closed.
11:02:22
#ssh 192.168.12.1
l3-agent is already running: pid=3590; pidfile=/root/.lilalo/l3-agent.pid
root@debian1:~# l3script
11:02: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 debian1 (pid = 7704)
Verbosity is at least 3
debian1*CLI> pri show spans
PRI span 1/0: Up, Active
debian1*CLI> quit
Executing last minute cleanups
11:02:59
#vim /etc/asterisk/extensions.conf
11:12:14
#vim /etc/asterisk/sip.conf
11:12:30
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
11:21:39
#exit
root@debian1:~# l3script
11:21:46
#в

11:21:53
#exit
exit
root@debian1:~# exit
logout
Connection to 192.168.12.1 closed.
11:23:22
#ssh 192.168.12.8
Linux debian8 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 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: Sat Apr 26 12:20:05 2014 from teach.local
l3-agent is already running: pid=4226; pidfile=/root/.lilalo/l3-agent.pid
root@debian8:~#
root@debian8:~#
root@debian8:~# l3script
11:23:35
#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 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
11:23:38
#apt-get install subversion
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  asterisk-core-sounds-ru-gsm
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  libsvn1
Suggested packages:
  subversion-tools
...
Get:2 http://192.168.12.254/debian/ wheezy/main subversion amd64 1.6.17dfsg-4+deb7u4 [1,320 kB]
Fetched 2,253 kB in 1s (1,587 kB/s)
Selecting previously unselected package libsvn1:amd64.
(Reading database ... 139319 files and directories currently installed.)
Unpacking libsvn1:amd64 (from .../libsvn1_1.6.17dfsg-4+deb7u4_amd64.deb) ...
Selecting previously unselected package subversion.
Unpacking subversion (from .../subversion_1.6.17dfsg-4+deb7u4_amd64.deb) ...
Processing triggers for man-db ...
Setting up libsvn1:amd64 (1.6.17dfsg-4+deb7u4) ...
Setting up subversion (1.6.17dfsg-4+deb7u4) ...
11:25:22
#св cd /usr/src/

11:26:10
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.12.254  0.0.0.0         UG    0      0        0 eth0
192.168.12.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
11:26:15
#ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=51 time=34.2 ms
^C
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 34.292/34.292/34.292/0.000 ms
11:26:19
#ping chan-datacard.googlecode.com
PING googlecode.l.googleusercontent.com (173.194.70.82) 56(84) bytes of data.
64 bytes from fa-in-f82.1e100.net (173.194.70.82): icmp_req=1 ttl=51 time=31.8 ms
64 bytes from fa-in-f82.1e100.net (173.194.70.82): icmp_req=2 ttl=51 time=31.9 ms
^C
--- googlecode.l.googleusercontent.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 31.883/31.916/31.949/0.033 ms
11:26:55
#cd chan-datacard-read-only/

11:26:58
#apt-get install asterisk-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  asterisk-core-sounds-ru-gsm
Use 'apt-get autoremove' to remove it.
The following NEW packages will be installed:
  asterisk-dev
0 upgraded, 1 newly installed, 0 to remove and 6 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 (2,343 kB/s)
Selecting previously unselected package asterisk-dev.
(Reading database ... 139407 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) ...
11:27:25
#./configure
configure complete, now type 'make'
11:27:34
#make
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c
gcc  -shared -Xlinker -x chan_datacard.o  -o chan_datacard.so
chmod 755 chan_datacard.so
11:27:39
#make install
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c
gcc  -shared -Xlinker -x chan_datacard.o  -o chan_datacard.so
chmod 755 chan_datacard.so
install -d                /usr/lib/asterisk/modules/
install -m 755 chan_datacard.so /usr/lib/asterisk/modules/
11:27:43
#ping chan-datacard.googlecode.com

11:27:43
#cd /usr/src/
                                        #apt-get install subversion
11:28:19
#apt-get install subversion

11:28:19
#cd chan-datacard-read-only/
                                        #apt-get install asterisk-dev
11:28:27
#apt-get install subversion
                                        #cd chan-datacard-read-only/
11:28:32
#apt-get install subversion
                                        #./configure
11:28:43
#apt-get install subversion
                                        make install^C
11:28:45
## make

11:28:49
## make install

11:31:36
#^C

11:31:55
#ls
__app.c            __at_send.c       __channel.c    etc          __manager.c
__at_fifo_queue.c  chan_datacard.c   __char_conv.c  __helpers.c  __memmem.c
__at_parse.c       chan_datacard.h   __cli.c        LICENSE.txt  README.txt
__at_read.c        chan_datacard.o   configure      Makefile     __ringbuffer.c
__at_response.c    chan_datacard.so  COPYRIGHT.txt  Makefile.in  __ringbuffer.h
прошло 36 минут
12:08:44
#ls etc/
datacard.conf
12:08:54
#cp etc/datacard.conf /etc/asterisk/

12:09:29
#мÑless /var/log/messages
Apr 26 12:23:34 debian8 kernel: [  894.131187] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB2
Apr 26 12:23:34 debian8 kernel: [  894.131206] usbcore: registered new interface driver option
Apr 26 12:23:34 debian8 kernel: [  894.131207] option: v0.7.2:USB Driver for GSM modems
Apr 26 12:48:49 debian8 kernel: [ 2408.420426] usb 1-1.5: USB disconnect, device number 3
Apr 26 12:48:49 debian8 kernel: [ 2408.420699] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Apr 26 12:48:49 debian8 kernel: [ 2408.420721] option 1-1.5:1.0: device disconnected
Apr 26 12:48:49 debian8 kernel: [ 2408.422222] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
Apr 26 12:48:49 debian8 kernel: [ 2408.422243] option 1-1.5:1.1: device disconnected
Apr 26 12:48:49 debian8 kernel: [ 2408.422384] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
Apr 26 12:48:49 debian8 kernel: [ 2408.422400] option 1-1.5:1.2: device disconnected
...
~
~
~
~
~
~
~
~
~
~
12:10:46
## cp etc/datacard.conf /etc/asterisk/

12:10:58
#pwd
/usr/src/chan-datacard-read-only
12:11:12
#q
l3script: q: command not found
12:11:22
#vim /etc/asterisk/datacard.conf
12:12:30
#tail /var/log/messages
Apr 26 12:49:14 debian8 kernel: [ 2433.054162] usb 1-1.5: Product: HUAWEI Mobile
Apr 26 12:49:14 debian8 kernel: [ 2433.054164] usb 1-1.5: Manufacturer: HUAWEI Technology
Apr 26 12:49:14 debian8 kernel: [ 2433.057334] option 1-1.5:1.0: GSM modem (1-port) converter detected
Apr 26 12:49:14 debian8 kernel: [ 2433.057509] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB0
Apr 26 12:49:14 debian8 kernel: [ 2433.057681] option 1-1.5:1.1: GSM modem (1-port) converter detected
Apr 26 12:49:14 debian8 kernel: [ 2433.057800] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB1
Apr 26 12:49:14 debian8 kernel: [ 2433.057944] option 1-1.5:1.2: GSM modem (1-port) converter detected
Apr 26 12:49:14 debian8 kernel: [ 2433.058060] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB2
Apr 26 12:49:14 debian8 mtp-probe: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5"
Apr 26 12:49:14 debian8 mtp-probe: bus: 1, device: 4 was not an MTP device
12:12:40
#nano /var/log/messages
12:15:06
#;
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
12:15:15
#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 = 5517)
...
debian8*CLI> datacard ussd datacard0 *101#
'[datacard0] Got USSD response: '31.00 UAH, dejstvitelen do 18.04.2015, tarif 'Super MTS 3D Nol 25'. * Super Internet vsego za 1,06 grn v den! *101*223#
  == Starting Local/ussd@incoming-datacard-8fb2;1 at incoming-datacard,ussd,1 failed so falling back to exten 's'
  == Starting Local/ussd@incoming-datacard-8fb2;1 at incoming-datacard,s,1 still failed so falling back to context 'default'
[Apr 26 13:17:50] WARNING[5590]: pbx.c:5367 __ast_pbx_run: Channel 'Local/ussd@incoming-datacard-8fb2;1' sent into invalid extension 's' in context 'default', but no invalid handler
debian8*CLI>
debian8*CLI>
debian8*CLI>
debian8*CLI> quit
Executing last minute cleanups
12:18:47
#vim /etc/asterisk/extensions.conf
12:19:23
#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 = 5517)
...
data      database  datacard
debian8*CLI> datacard show
devices  device
debian8*CLI> datacard show devices
ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number
datacard0    1     Free       28   3    3       MTS UKR        E1550      11.608.12.00.143  358705031098900  255013960054689  +380506592257
[Apr 26 13:19:46] NOTICE[5555]: chan_sip.c:13189 sip_reg_timeout:    -- Registration for 'santiago@192.168.12.7' timed out, trying again (Attempt #4)
[Apr 26 13:20:06] NOTICE[5555]: chan_sip.c:13189 sip_reg_timeout:    -- Registration for 'santiago@192.168.12.7' timed out, trying again (Attempt #5)
debian8*CLI> quit
Executing last minute cleanups
12:20:17
#vim /etc/asterisk/extensions.conf
12:20:53
#include=>national
                                ; increasing this value may help if your network normally has low jittt
er,
                                ; but occasionally has spikes.
;jblog = no                     ; Enables jitterbuffer frame logging. Defaults to "no".
;-----------------------------------------------------------------------------------
[         ]
[       ](!)
[       ]
data=/dev/ttyUSB2               ; tty for AT commands
group=1                         ; calling group
...
; ;language=de                  ; Use German as default language
; audio=/dev/ttyUSB4            ; tty port for audio connection
; data=/dev/ttyUSB5             ; tty port for AT commands
; group=2                               ; calling group
; rxgain=10                     ; increase the incoming volume
; autodeletesms=yes             ; auto delete incoming sms
; u2diag=0                      ; set U2DIAG parameter (0 = disable everything except modem function)
; callingpres=allowed_passed_screen ; set caller ID presentation
@
; disablesms=yes=yesacard       ; use t ; chan_datacard has currently a bug with SMS49,0-1        89%
12:24:37
#[ ]
include=>local
include=>fallback
;[context2]
;[context3]
[incoming-datacard]
exten => s,1,Goto(menu,s,1)
12:24:43
#дыlsmod | less
12:25:50
##modprobe -r option

12:26:01
#vim /etc/asterisk/datacard.conf
12:26:21
#less /etc/asterisk/datacard.conf
12:28:36
# ; will pad its size. the default is 40, so without modification, the nn
exten => _2[123]XX,1,Macro(outgoingcall,SIP/havana/${EXTEN},tTkK)
exten => _33XX,1,Macro(outgoingcall,SIP/havana/${EXTEN},tTkK)
[fallback]
[xten => ].,1,Playback(/var/tmp/asterisk/message)
[ukraine-gateway]
[               ]
exten => _380XXXXXXXXX,1,Dial(datacard0/g1/+${EXTEN})
; exten => _380      XXX,1,Dial(SIP/kiev/${EXTEN))
[gr_relay]
include=>internal
include=>local
include=>national
include=>international
include=>ukraine-gateway
include=>fallback
        >ukraine-gateway
[gr1]
include=>fallback
[gr3]
[gr3]
"/etc/asterisk/extensions.conf" 329L, 8702C written
12:33:07
#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 = 5517)
...
    -- Auto fallthrough, channel 'SIP/3201-00000004' status is 'CHANUNAVAIL'
    -- Executing [h@gr1:1] Playback("SIP/3201-00000004", "/var/tmp/asterisk/message") in new stack
  == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/3201-00000004'
debian8*CLI>
debian8*CLI>
    -- Registered SIP '3203' at 192.168.12.221:63682
    -- Unregistered SIP '3203'
    -- Registered SIP '3203' at 192.168.12.221:63682
debian8*CLI> quit
Executing last minute cleanups
12:35:01
#vim /etc/asterisk/extensions.conf
12:35:09
#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 = 5517)
...
    -- Datacard/datacard0-dc22 is making progress passing it to SIP/3201-00000005
    -- Datacard/datacard0-dc22 answered SIP/3201-00000005
    -- Executing [h@gr1:1] Playback("SIP/3201-00000005", "/var/tmp/asterisk/message") in new stack
[Apr 26 13:35:47] WARNING[5870]: file.c:766 ast_readaudio_callback: Failed to write frame
    -- <SIP/3201-00000005> Playing '/var/tmp/asterisk/message.gsm' (language 'ru')
[Apr 26 13:35:47] WARNING[5870]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/3201-00000005 for /var/tmp/asterisk/message
  == Spawn extension (gr1, 380503579111, 1) exited non-zero on 'SIP/3201-00000005'
       > Saved useragent "Z 3.2.21357 r21367" for peer 3202
debian8*CLI> quit
Executing last minute cleanups
12:36:06
#vim /etc/asterisk/extensions.conf
12:39:06
#[ ]
group=1                         ; calling group
; group=2                               ; calling group
12:39:14
#grep group -B5 /etc/asterisk/datacard.conf
[datacard0](E1550_t)
audio=/dev/ttyUSB1              ; tty for audio connection
data=/dev/ttyUSB2               ; tty for AT commands
group=1                         ; calling group
--
; [datacard1]
; context=incoming-datacard     ; context for incoming calls
; ;language=de                  ; Use German as default language
; audio=/dev/ttyUSB4            ; tty port for audio connection
; data=/dev/ttyUSB5             ; tty port for AT commands
; group=2                               ; calling group
12:39: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 debian8 (pid = 5517)
Verbosity is at least 4
debian8*CLI> datacard show devices
ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number
datacard0    1     Free       27   3    3       MTS UKR        E1550      11.608.12.00.143  358705031098900  255013960054689  +380506592257
debian8*CLI> quit
Executing last minute cleanups
12:40:31
#vim /etc/asterisk/extensions.conf
12:41:03
#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 = 5517)
...
    -- Registered extension context 'ael-dundi-e164-customers'; registrar: pbx_ael
    -- merging incls/swits/igpats from old(ael-dundi-e164-customers) to new(ael-dundi-e164-customers) context, registrar = pbx_config
    -- Registered extension context 'ael-dundi-e164-canonical'; registrar: pbx_ael
    -- merging incls/swits/igpats from old(ael-dundi-e164-canonical) to new(ael-dundi-e164-canonical) context, registrar = pbx_config
    -- Registered extension context 'app_queue_gosub_virtual_context'; registrar: app_queue
    -- merging incls/swits/igpats from old(app_queue_gosub_virtual_context) to new(app_queue_gosub_virtual_context) context, registrar = pbx_config
    -- Added extension 's' priority 1 to app_queue_gosub_virtual_context
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000416 sec
debian8*CLI> quit
Executing last minute cleanups
12:42:07
#grep MTS /etc/asterisk/extensions.conf
exten => _380XXXXXXXXX,1,Dial(DATACARD/p:MTS UKR/+${EXTEN})
12:42:12
#^C

12:42:41
#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 = 5517)
Verbosity is at least 4
debian8*CLI> datacard show devices
ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number
datacard0    1     Free       27   3    3       MTS UKR        E1550      11.608.12.00.143  358705031098900  255013960054689  +380506592257
debian8*CLI> # i:358705031098900
No such command '# i:358705031098900' (type 'core show help # i:358705031098900' for other possible commands)
debian8*CLI> quit
Executing last minute cleanups
12:48:43
#vim /etc/asterisk/extensions.conf

Файлы

  • /etc/dahdi/system.conf
  • /etc/dahdi/system.conf
    >
    # Autogenerated by /usr/sbin/dahdi_genconf on Sat Apr 26 11:15:14 2014
    # If you edit this file and execute /usr/sbin/dahdi_genconf again,
    # your manual changes will be LOST.
    # Dahdi Configuration File
    #
    # This file is parsed by the Dahdi Configurator, dahdi_cfg
    #
    # Span 1: WCT13x/0 "Wildcard TE131/TE133 Card 0" (MASTER)
    span=1,1,0,esf,b8zs
    # termtype: te
    bchan=1-23
    dchan=24
    echocanceller=mg2,1-23
    # Global data
    loadzone        = us
    defaultzone     = us
    

    Статистика

    Время первой команды журнала10:06:51 2014- 4-26
    Время последней команды журнала12:48:43 2014- 4-26
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 5.94
    Процент синтаксически неверно набранных команд, % 0.99
    Суммарное время работы с терминалом *, час 2.08
    Количество командных строк в единицу времени, команда/мин 0.81
    Частота использования команд
    vim14|=============| 13.21%
    less11|==========| 10.38%
    asterisk10|=========| 9.43%
    apt-get6|=====| 5.66%
    ls6|=====| 5.66%
    cd4|===| 3.77%
    ping4|===| 3.77%
    ssh4|===| 3.77%
    #3|==| 2.83%
    exit3|==| 2.83%
    make2|=| 1.89%
    [2|=| 1.89%
    dahdi_genconf2|=| 1.89%
    cat2|=| 1.89%
    find2|=| 1.89%
    lsmod2|=| 1.89%
    grep2|=| 1.89%
    ^C2|=| 1.89%
    configure1|| 0.94%
    /etc/init.d/asterisk1|| 0.94%
    св1|| 0.94%
    lsusb1|| 0.94%
    cp1|| 0.94%
    reboot1|| 0.94%
    nano1|| 0.94%
    will1|| 0.94%
    ~1|| 0.94%
    q1|| 0.94%
    pwd1|| 0.94%
    route1|| 0.94%
    head1|| 0.94%
    history1|| 0.94%
    lspci1|| 0.94%
    в1|| 0.94%
    tail1|| 0.94%
    дыlsmod1|| 0.94%
    dahdi_cfg1|| 0.94%
    modprobe1|| 0.94%
    ршÑршÐÑhistory1|| 0.94%
    include=>1|| 0.94%
    national1|| 0.94%
    мÑless1|| 0.94%
    #modprobe1|| 0.94%
    ____
    *) Интервалы неактивности длительностью 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$