/l3/users/igor-public/nt-voip-2014-apr/teach.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 |
|
#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 |
#modprobe wcte13xp
|
#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 |
#ÑÑÑÑÑÐÑ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 |
#history | less
|
#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 |
#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 |
#cat /lib/modules/3.2.0-4-amd64/modules.* | less
|
#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 |
#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) |
#lsmod | less
|
#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 |
#dahdi_genconf
|
#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 |
#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 |
#vim /etc/dahdi/system.conf
|
#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 |
#cd
|
#less /etc/asterisk/dahdi-channels.conf
|
#~
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 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 |
#less /var/log/messages
|
#less /var/log/asterisk/messages
|
#reboot
Broadcast message from root@debian1 (pts/2) (Sat Apr 26 11:47:15 2014): The system is going down for reboot NOW! |
#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 |
#ssh 192.168.12.1
root@debian1:~# root@debian1:~# root@debian1:~# l3script |
#less /var/log/messages
|
#less /var/log/asterisk/messages
|
#less /var/log/asterisk/messages
|
#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 |
#vim /etc/sys
![]() |
#vim /etc/dahdi/
![]() |
#vim /etc/dahdi/system.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 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 |
#exit
exit root@debian1:~# exit logout Connection to 192.168.12.1 closed. |
#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. |
#ssh 192.168.12.1
l3-agent is already running: pid=3590; pidfile=/root/.lilalo/l3-agent.pid root@debian1:~# l3script |
#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 |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/sip.conf
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#exit
root@debian1:~# l3script |
#в
|
#exit
exit root@debian1:~# exit logout Connection to 192.168.12.1 closed. |
#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 |
#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 |
#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) ... |
#св cd /usr/src/
|
#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 |
#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 |
#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 |
#cd chan-datacard-read-only/
|
#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) ... |
#./configure
configure complete, now type 'make' |
#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 |
#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/ |
#ping chan-datacard.googlecode.com
![]() |
#cd /usr/src/
#apt-get install subversion |
#apt-get install subversion
![]() |
#cd chan-datacard-read-only/
#apt-get install asterisk-dev |
#apt-get install subversion
#cd chan-datacard-read-only/ |
#apt-get install subversion
#./configure |
#apt-get install subversion
![]() make install^C |
## make
![]() |
## make install
![]() |
#^C
![]() |
#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 |
#ls etc/
datacard.conf |
#cp etc/datacard.conf /etc/asterisk/
|
#мÑ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 ... ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
## cp etc/datacard.conf /etc/asterisk/
|
#pwd
/usr/src/chan-datacard-read-only |
#q
![]() l3script: q: command not found |
#vim /etc/asterisk/datacard.conf
|
#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 |
#nano /var/log/messages
|
#;
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 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 |
#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 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 |
#vim /etc/asterisk/extensions.conf
|
#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% |
#[ ]
include=>local include=>fallback ;[context2] ;[context3] [incoming-datacard] exten => s,1,Goto(menu,s,1) |
#дыlsmod | less
|
##modprobe -r option
|
#vim /etc/asterisk/datacard.conf
![]() |
#less /etc/asterisk/datacard.conf
|
# ; 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 |
#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 |
#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 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 |
#vim /etc/asterisk/extensions.conf
![]() |
#[ ]
group=1 ; calling group ; group=2 ; calling group |
#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 |
#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 |
#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 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 |
#grep MTS /etc/asterisk/extensions.conf
exten => _380XXXXXXXXX,1,Dial(DATACARD/p:MTS UKR/+${EXTEN}) |
#^C
![]() |
#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 |
#vim /etc/asterisk/extensions.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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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