/l3/users/kronas/nt-voip/linux5.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
#vim /etc/usb_modeswitch.d/12
|
#vim /etc/usb_modeswitch.d/12d1\:1
|
#vim /etc/usb_modeswitch.d/12d1\:1
|
#apt-get install usb-modeswitch
Reading package lists... Done Building dependency tree Reading state information... Done usb-modeswitch is already the newest version. usb-modeswitch set to manually installed. The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded. |
#apt-get install usb-modeswitch
Reading package lists... Done Building dependency tree Reading state information... Done usb-modeswitch is already the newest version. usb-modeswitch set to manually installed. The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded. |
#apt-get install apt-file
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl The following NEW packages will be installed: apt-file curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl ... Processing triggers for man-db ... Setting up curl (7.21.0-2.1+squeeze2) ... Setting up libconfig-file-perl (1.50-2) ... Setting up libapt-pkg-perl (0.1.24+b1) ... Setting up liblist-moreutils-perl (0.25~02-1) ... Setting up libregexp-assemble-perl (0.34-3) ... Setting up apt-file (2.4.0) ... The system-wide cache is empty. You may want to run 'apt-file update' as root to update the cache. You can also run 'apt-file update' as normal user to use a cache in the user's home directory. |
#apt-get install apt-file
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl The following NEW packages will be installed: apt-file curl libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl ... Processing triggers for man-db ... Setting up curl (7.21.0-2.1+squeeze2) ... Setting up libconfig-file-perl (1.50-2) ... Setting up libapt-pkg-perl (0.1.24+b1) ... Setting up liblist-moreutils-perl (0.25~02-1) ... Setting up libregexp-assemble-perl (0.34-3) ... Setting up apt-file (2.4.0) ... The system-wide cache is empty. You may want to run 'apt-file update' as root to update the cache. You can also run 'apt-file update' as normal user to use a cache in the user's home directory. |
#apt-file update
Downloading complete file http://192.168.15.253:9999/debian/dists/squeeze/Contents-i386.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 17.6M 100 17.6M 0 0 199k 0 0:01:30 0:01:30 --:--:-- 191k Downloading complete file http://192.168.15.253:9999/debian-backports/dists/squeeze-backports/Contents-i386.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1949k 100 1949k 0 0 61140 0 0:00:32 0:00:32 --:--:-- 73831 Ignoring source without Contents File: http://security.debian.org/dists/squeeze/updates/Contents-i386.gz Downloading complete file http://192.168.15.253:9999/debian/dists/squeeze-updates/Contents-i386.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 18592 100 18592 0 0 196k 0 --:--:-- --:--:-- --:--:-- 199k |
#apt-file update
Downloading complete file http://192.168.15.253:9999/debian/dists/squeeze/Contents-i386.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 17.6M 100 17.6M 0 0 199k 0 0:01:30 0:01:30 --:--:-- 191k Downloading complete file http://192.168.15.253:9999/debian-backports/dists/squeeze-backports/Contents-i386.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1949k 100 1949k 0 0 61140 0 0:00:32 0:00:32 --:--:-- 73831 Ignoring source without Contents File: http://security.debian.org/dists/squeeze/updates/Contents-i386.gz Downloading complete file http://192.168.15.253:9999/debian/dists/squeeze-updates/Contents-i386.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 18592 100 18592 0 0 196k 0 --:--:-- --:--:-- --:--:-- 199k |
#usb_modeswitch
Usage: usb_modeswitch [-hvpVPmMrdHn] [-c filename] -h, --help this help -e, --version print version information and exit -v, --default-vendor NUM vendor ID of original mode (mandatory) -p, --default-product NUM product ID of original mode (mandatory) -V, --target-vendor NUM target mode vendor ID (optional) -P, --target-product NUM target mode product ID (optional) -C, --target-class NUM target mode device class (optional) -m, --message-endpoint NUM direct the message transfer there (optional) -M, --message-content <msg> message to send (hex number as string) ... -s, --success NUM check switching result after NUM secs -I, --no-inquire do not get SCSI attributes (default on) -c, --config-file <filename> load configuration from file -i, --interface NUM select initial USB interface (default 0) -u, --configuration NUM select USB configuration -a, --altsetting NUM select alternative USB interface setting * usb_modeswitch: handle USB devices with multiple modes * Version 1.1.4 (C) Josua Dietze 2010 * Based on libusb0 (0.1.12 and above) ! PLEASE REPORT NEW CONFIGURATIONS ! |
#lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 002: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
#vim /etc/usb_modeswitch.conf
--- /tmp/l3-saved-5454.14377.18309 2013-04-11 13:40:54.000000000 +0300 +++ /etc/usb_modeswitch.conf 2013-04-11 13:43:24.000000000 +0300 @@ -18,3 +18,9 @@ EnableLogging=0 +DefaultVendor= 0x12d1; +DefaultProduct= 0x1001 + +# choose one of these: +;DetachStorageOnly=1 +HuaweiMode=1 |
#vim /etc/usb_modeswitch.conf
--- /tmp/l3-saved-5454.3380.27795 2013-04-11 13:45:27.000000000 +0300 +++ /etc/usb_modeswitch.conf 2013-04-11 13:45:53.000000000 +0300 @@ -17,10 +17,3 @@ # "usb_modeswitch_<interface-name>" EnableLogging=0 - -DefaultVendor= 0x12d1; -DefaultProduct= 0x1001 - -# choose one of these: -;DetachStorageOnly=1 -HuaweiMode=1 |
#ls -l
total 6860 -rw-r--r-- 1 root root 2339482 Apr 11 10:29 belki.wav -rw-r--r-- 1 root root 4186632 Apr 11 10:30 burunduki.wav -rw-r--r-- 1 root root 189204 Oct 12 13:08 chan_dongle-1.1.r14.tgz -rw-r--r-- 1 root root 5264 Apr 8 16:41 install drwxr-xr-x 2 root root 4096 Apr 11 10:46 text -rw-r--r-- 1 root root 268226 Apr 11 10:25 text1.wav |
#mkdir /usr/src/
dahdi/ linux-headers-3.2.0-0.bpo.4-686-pae/ linux-OLDVERSION.1365590910 dahdi.tar.bz2 linux-headers-3.2.0-0.bpo.4-common/ modules/ linux/ linux-kbuild-3.2/ vpb-driver.tar.bz2 |
#cp chan_dongle-1.1.r14.tgz /usr/src/
|
#cd /usr/src/
|
#tar -zxvf chan_dongle-1.1.r14.tgz
chan_dongle-1.1.r14/ chan_dongle-1.1.r14/TODO.txt chan_dongle-1.1.r14/ringbuffer.c chan_dongle-1.1.r14/single.c chan_dongle-1.1.r14/config.h.in chan_dongle-1.1.r14/manager.h chan_dongle-1.1.r14/helpers.h chan_dongle-1.1.r14/pdiscovery.c chan_dongle-1.1.r14/README.txt chan_dongle-1.1.r14/install-sh ... chan_dongle-1.1.r14/contrib/openwrt/asterisk16-chan-dongle/Makefile chan_dongle-1.1.r14/at_parse.h chan_dongle-1.1.r14/dc_config.c chan_dongle-1.1.r14/app.h chan_dongle-1.1.r14/INSTALL chan_dongle-1.1.r14/stamp-h.in chan_dongle-1.1.r14/helpers.c chan_dongle-1.1.r14/at_queue.c chan_dongle-1.1.r14/at_command.c chan_dongle-1.1.r14/channel.h |
#cd chan_dongle-1.1.r14
|
#ls -l
total 796 -rw-r--r-- 1 user user 3897 Jun 13 2011 app.c -rw-r--r-- 1 user user 419 Jun 13 2011 app.h -rw-r--r-- 1 user user 24281 Aug 5 2011 at_command.c -rw-r--r-- 1 user user 3819 Jun 13 2011 at_command.h -rw-r--r-- 1 user user 13410 Jun 13 2011 at_parse.c -rw-r--r-- 1 user user 1323 Jun 13 2011 at_parse.h -rw-r--r-- 1 user user 8708 Jun 13 2011 at_queue.c -rw-r--r-- 1 user user 4984 Jun 13 2011 at_queue.h -rw-r--r-- 1 user user 4853 Jun 13 2011 at_read.c ... -rw-r--r-- 1 user user 24337 Jul 12 2011 pdu.c -rw-r--r-- 1 user user 706 Jun 13 2011 pdu.h -rw-r--r-- 1 user user 3554 Jun 13 2011 README.txt -rw-r--r-- 1 user user 6937 Jun 13 2011 ringbuffer.c -rw-r--r-- 1 user user 2276 Jun 13 2011 ringbuffer.h -rw-r--r-- 1 user user 478 Jun 13 2011 single.c -rw-r--r-- 1 user user 0 Jun 13 2011 stamp-h.in drwxr-xr-x 2 user user 4096 Oct 12 13:05 test -rw-r--r-- 1 user user 3256 Jun 13 2011 TODO.txt drwxr-xr-x 2 user user 4096 Oct 12 13:05 tools |
#make
make: *** No targets specified and no makefile found. Stop. |
#./configure
checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... yes ... checking sys/time.h presence... yes checking for sys/time.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking whether asterisk.h in ../include... no checking whether asterisk.h in /usr/include... no checking whether asterisk.h in /usr/local/include... no checking whether asterisk.h in /opt/local/include... no configure: error: Can't find "asterisk.h" |
#cd ..
|
#ls -l /var/tmp/message/
total 60 -rw-rw---- 1 asterisk asterisk 5808 Apr 11 14:05 01.gsm -rw-rw---- 1 asterisk asterisk 3729 Apr 11 14:08 03.gsm -rw-rw---- 1 asterisk asterisk 4059 Apr 11 14:08 04.gsm -rw-rw---- 1 asterisk asterisk 2310 Apr 11 14:08 05.gsm -rw-rw---- 1 asterisk asterisk 3432 Apr 11 14:08 07.gsm -rw-rw---- 1 asterisk asterisk 4587 Apr 11 14:08 08.gsm -rw-rw---- 1 asterisk asterisk 2871 Apr 11 14:08 09.gsm -rw-rw---- 1 asterisk asterisk 2541 Apr 9 13:47 10.gsm -rw-rw---- 1 asterisk asterisk 3465 Apr 11 14:07 12.gsm -rw-rw---- 1 asterisk asterisk 2244 Apr 11 14:07 13.gsm -rw-rw---- 1 asterisk asterisk 2541 Apr 11 14:06 14.gsm -rw-rw---- 1 asterisk asterisk 2607 Apr 11 14:07 15.gsm -rw-rw---- 1 asterisk asterisk 1683 Apr 10 16:03 32.gsm |
#rm /var/tmp/message/32.gsm
|
#ls -l /var/tmp/message/
total 68 -rw-rw---- 1 asterisk asterisk 5808 Apr 11 14:05 01.gsm -rw-rw---- 1 asterisk asterisk 3729 Apr 11 14:08 03.gsm -rw-rw---- 1 asterisk asterisk 4059 Apr 11 14:08 04.gsm -rw-rw---- 1 asterisk asterisk 2310 Apr 11 14:08 05.gsm -rw-rw---- 1 asterisk asterisk 3432 Apr 11 14:08 07.gsm -rw-rw---- 1 asterisk asterisk 4587 Apr 11 14:08 08.gsm -rw-rw---- 1 asterisk asterisk 2871 Apr 11 14:08 09.gsm -rw-rw---- 1 asterisk asterisk 4686 Apr 11 14:11 10.gsm -rw-rw---- 1 asterisk asterisk 5280 Apr 11 14:11 11.gsm -rw-rw---- 1 asterisk asterisk 3465 Apr 11 14:07 12.gsm -rw-rw---- 1 asterisk asterisk 2244 Apr 11 14:07 13.gsm -rw-rw---- 1 asterisk asterisk 2541 Apr 11 14:06 14.gsm -rw-rw---- 1 asterisk asterisk 2607 Apr 11 14:07 15.gsm |
#ls -l /var/tmp/message/
total 84 -rw-rw---- 1 asterisk asterisk 5808 Apr 11 14:05 01.gsm -rw-rw---- 1 asterisk asterisk 3729 Apr 11 14:08 03.gsm -rw-rw---- 1 asterisk asterisk 4059 Apr 11 14:08 04.gsm -rw-rw---- 1 asterisk asterisk 2310 Apr 11 14:08 05.gsm -rw-rw---- 1 asterisk asterisk 14091 Apr 11 14:12 06.gsm -rw-rw---- 1 asterisk asterisk 3432 Apr 11 14:08 07.gsm -rw-rw---- 1 asterisk asterisk 4587 Apr 11 14:08 08.gsm -rw-rw---- 1 asterisk asterisk 2871 Apr 11 14:08 09.gsm -rw-rw---- 1 asterisk asterisk 4686 Apr 11 14:11 10.gsm -rw-rw---- 1 asterisk asterisk 5280 Apr 11 14:11 11.gsm -rw-rw---- 1 asterisk asterisk 3465 Apr 11 14:07 12.gsm -rw-rw---- 1 asterisk asterisk 2244 Apr 11 14:07 13.gsm -rw-rw---- 1 asterisk asterisk 2541 Apr 11 14:06 14.gsm -rw-rw---- 1 asterisk asterisk 2607 Apr 11 14:07 15.gsm |
#ls -l /var/tmp/message/
total 112 -rw-rw---- 1 asterisk asterisk 5808 Apr 11 14:05 01.gsm -rw-rw---- 1 asterisk asterisk 24684 Apr 11 14:13 02.gsm -rw-rw---- 1 asterisk asterisk 3729 Apr 11 14:08 03.gsm -rw-rw---- 1 asterisk asterisk 4059 Apr 11 14:08 04.gsm -rw-rw---- 1 asterisk asterisk 2310 Apr 11 14:08 05.gsm -rw-rw---- 1 asterisk asterisk 14091 Apr 11 14:12 06.gsm -rw-rw---- 1 asterisk asterisk 3432 Apr 11 14:08 07.gsm -rw-rw---- 1 asterisk asterisk 4587 Apr 11 14:08 08.gsm -rw-rw---- 1 asterisk asterisk 2871 Apr 11 14:08 09.gsm -rw-rw---- 1 asterisk asterisk 4686 Apr 11 14:11 10.gsm -rw-rw---- 1 asterisk asterisk 5280 Apr 11 14:11 11.gsm -rw-rw---- 1 asterisk asterisk 3465 Apr 11 14:07 12.gsm -rw-rw---- 1 asterisk asterisk 2244 Apr 11 14:07 13.gsm -rw-rw---- 1 asterisk asterisk 2541 Apr 11 14:06 14.gsm -rw-rw---- 1 asterisk asterisk 2607 Apr 11 14:07 15.gsm |
#cd /etc/asterisk/
|
#ls -l | grep exten*
extensions.conf.ORIG:; load after the extensions.ael file (where the global vars are stored). |
#ls -l | grep exten
-rw-r----- 1 asterisk asterisk 12801 Jan 14 20:35 extensions.ael -rw-r--r-- 1 asterisk asterisk 3420 Apr 11 14:18 extensions.conf -rw-r----- 1 asterisk asterisk 31344 Jan 14 20:35 extensions.conf.ORIG -rw-r--r-- 1 root root 0 Apr 11 14:19 extensions_ivr.conf -rw-r----- 1 asterisk asterisk 5408 Jan 14 20:35 extensions.lua -rw-r----- 1 asterisk asterisk 7481 Jan 14 20:35 extensions_minivm.conf |
#chown asterisk:asterisk extensions_ivr.conf
|
#ls -l | grep exten
-rw-r----- 1 asterisk asterisk 12801 Jan 14 20:35 extensions.ael -rw-r--r-- 1 asterisk asterisk 3420 Apr 11 14:18 extensions.conf -rw-r----- 1 asterisk asterisk 31344 Jan 14 20:35 extensions.conf.ORIG -rw-r--r-- 1 asterisk asterisk 0 Apr 11 14:20 extensions_ivr.conf -rw-r----- 1 asterisk asterisk 5408 Jan 14 20:35 extensions.lua -rw-r----- 1 asterisk asterisk 7481 Jan 14 20:35 extensions_minivm.conf |
#vim extensions_ivr.conf
--- /tmp/l3-saved-3994.3446.17598 2013-04-11 14:20:16.000000000 +0300 +++ extensions_ivr.conf 2013-04-11 14:20:47.000000000 +0300 @@ -0,0 +1,3 @@ +; extension_ivr.conf + +[ivr_main] |
#[ivr_main]
-rw-r----- 1 asterisk asterisk 12801 Jan 14 20:35 extensions.ael -rw-r--r-- 1 asterisk asterisk 3420 Apr 11 14:18 extensions.conf -rw-r----- 1 asterisk asterisk 31344 Jan 14 20:35 extensions.conf.ORIG -rw-r--r-- 1 asterisk asterisk 33 Apr 11 14:20 extensions_ivr.conf -rw-r----- 1 asterisk asterisk 5408 Jan 14 20:35 extensions.lua -rw-r----- 1 asterisk asterisk 7481 Jan 14 20:35 extensions_minivm.conf |
#vim extensions_ivr.conf
--- /tmp/l3-saved-3994.23240.8949 2013-04-11 14:21:32.000000000 +0300 +++ extensions_ivr.conf 2013-04-11 14:28:16.000000000 +0300 @@ -1,3 +1,13 @@ ; extension_ivr.conf -[ivr_main] +[menu] +exten => s,1,Answer + same => n,Playback(/var/tmp/message/01) + same => n,Wait(1) + same => n,Playback(/var/tmp/message/02) + same => n,Wait(3) + same => n,Playback(/var/tmp/message/03) + same => n,Wait(3) + same => n,Playback(/var/tmp/message/04) + same => n,Wait(3) + same => n,Playback(/var/tmp/message/05) |
#vim extensions.conf
--- /tmp/l3-saved-3994.3073.13530 2013-04-11 14:28:17.000000000 +0300 +++ extensions.conf 2013-04-11 14:28:40.000000000 +0300 @@ -22,6 +22,8 @@ exten => 8509,1,Answer same => n,AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/commands/current-time.sh) +exten => 8800,1,Goto(menu,s,1) + exten => _9999,1,Voicemailmain() exten => _8301,1,Meetme(1234) |
#for i in {1..1000}; do asterisk -rx "database put order $i $[RANDOM%3]"; done
Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully ... Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully |
#for i in {1..1000}; do asterisk -rx "database put order $i $[RANDOM%3]"; done
Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully ... Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully Updated database successfully |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze10 currently running on linux5 (pid = 1425) Verbosity is at least 3 linux5*CLI> database get order 10 ... /order/992 : 2 /order/993 : 0 /order/994 : 2 /order/995 : 1 /order/996 : 2 /order/997 : 2 /order/998 : 1 /order/999 : 0 1000 results found. linux5*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze10 currently running on linux5 (pid = 1425) Verbosity is at least 3 linux5*CLI> database get order 10 ... /order/992 : 2 /order/993 : 0 /order/994 : 2 /order/995 : 1 /order/996 : 2 /order/997 : 2 /order/998 : 1 /order/999 : 0 1000 results found. linux5*CLI> exit |
#asterisk -rx 'database show order' | awk '{print $3}' | sort | uniq -c
1 338 0 323 1 339 2 1 found. |
#asterisk -rx 'database show order' | awk '{print $3}' | sort | uniq -c
1 338 0 323 1 339 2 1 found. |
#asterisk -rx 'database show order' | awk '/^.o/{print $3}' | sort | uniq -c
338 0 322 1 339 2 |
#asterisk -rx 'database show order' | awk '/^.o/{print $3}' | sort | uniq -c
338 0 322 1 339 2 |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze10 currently running on linux5 (pid = 1425) Verbosity is at least 3 linux5*CLI> dialplan reload ... linux5*CLI> moh reload == Parsing '/etc/asterisk/musiconhold.conf': == Found == Using SIP RTP CoS mark 5 -- Executing [1102@user_group3:1] Dial("SIP/2101-000000cd", "SIP/minsk/1102") in new stack == Using SIP RTP CoS mark 5 -- Called minsk/1102 -- SIP/minsk-000000ce answered SIP/2101-000000cd -- Packet2Packet bridging SIP/2101-000000cd and SIP/minsk-000000ce == Spawn extension (user_group3, 1102, 1) exited non-zero on 'SIP/2101-000000cd' linux5*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze10 currently running on linux5 (pid = 1425) Verbosity is at least 3 linux5*CLI> dialplan reload ... linux5*CLI> moh reload == Parsing '/etc/asterisk/musiconhold.conf': == Found == Using SIP RTP CoS mark 5 -- Executing [1102@user_group3:1] Dial("SIP/2101-000000cd", "SIP/minsk/1102") in new stack == Using SIP RTP CoS mark 5 -- Called minsk/1102 -- SIP/minsk-000000ce answered SIP/2101-000000cd -- Packet2Packet bridging SIP/2101-000000cd and SIP/minsk-000000ce == Spawn extension (user_group3, 1102, 1) exited non-zero on 'SIP/2101-000000cd' linux5*CLI> exit |
#apt-cache search stream
liba52-0.7.4-dev - library for decoding ATSC A/52 streams (development) liba52-0.7.4 - library for decoding ATSC A/52 streams libace-doc - C++ network programming framework documentation libace-htbp-5.7.7 - ACE protocol over HTTP tunneling library libtao-doc - ACE based CORBA ORB core libraries documentation ack - Kanji code converter acpidump - utilities to dump system's ACPI tables to an ASCII file aewm++ - minimal window manager written in C++ afbackup-client - Client-Server Backup System (Client side) afbackup-common - Client-Server Backup System (common files) ... libx264-dev - development files for libx264 x264 - video encoder for the H.264/MPEG-4 AVC standard xserver-xorg-video-ati-dbg - X.Org X server -- AMD/ATI display driver wrapper (debugging symbols) xserver-xorg-video-radeon - X.Org X server -- AMD/ATI Radeon display driver xserver-xorg-video-radeon-dbg - X.Org X server -- AMD/ATI Radeon display driver (debugging symbols) apache2-suexec-custom - Configurable suexec program for Apache 2 mod_suexec firebird2.1-common-doc - copyright, licensing and changelogs of firebird2.1 firebird2.5-common-doc - copyright, licnesing and changelogs of firebird2.5 linux-source-2.6.32 - Linux kernel source for version 2.6.32 with Debian patches puppet-testsuite - Centralized configuration management - test suite |
#apt-cache search stream player
audiopreview - command-line tool to play previews of audio and video files libavbin0 - cross-platform media decoding library avifile-player - video player for AVI/ASF/WMF files avifile-vorbis-plugin - Vorbis audio plugin for libavifile bangarang - Multimedia player with a lightweight interface for KDE banshee-extension-liveradio - LiveRadio extension for Banshee bluemindo - simple yet powerful audio player cclive - lightweight command line video extraction tool cmus-plugin-ffmpeg - lightweight ncurses audio player (FFmpeg plugin) cmus - lightweight ncurses audio player ... gnash-ext-lirc - GNU Shockwave Flash (SWF) player - LIRC extension gnash-ext-mysql - GNU Shockwave Flash (SWF) player - MySQL extension klash - GNU Shockwave Flash (SWF) player - Standalone player for KDE konqueror-plugin-gnash - GNU Shockwave Flash (SWF) player - Plugin for Konqueror python-gtk-gnash - GNU Shockwave Flash (SWF) player - Python bindings gnome-mplayer - A GTK+ interface for MPlayer gnome-mplayer-dbg - A GTK+ interface for MPlayer (debugging symbols) libav-tools - Multimedia player, server, encoder and transcoder nzbget - command-line based binary newsgrabber for nzb files libvlccore5 - base library for VLC and its modules |
#apt-cache search stream | list
bash: list: command not found |
#apt-cache search stream | less
|
#apt-cache search streampl | less
|
#apt-cache search audiostream
|
#apt-cache search audio stream
lib64asound2-plugins - ALSA library additional plugins (64 bit) libasound2-plugins - ALSA library additional plugins alure-doc - AL Utilities REtooled (documentation) libalure-dev - AL Utilities REtooled (development files) libalure1-dbg - AL Utilities REtooled (debugging symbols) libalure1 - AL Utilities REtooled (shared library) ardour-i686 - digital audio workstation (graphical gtk2 interface) [i686] ardour - digital audio workstation (graphical gtk2 interface) audiopreview - command-line tool to play previews of audio and video files libavbin0 - cross-platform media decoding library ... libpostproc-extra-52 - Libav video postprocessing library (transitional package) libpostproc52 - Libav video postprocessing library libswscale-extra-2 - Libav video software scaling library (transitional package) libswscale2 - Libav video scaling library liblivemedia-dev - multimedia RTSP streaming library nzbget - command-line based binary newsgrabber for nzb files libopus-dev - Opus codec library development files libopus0 - Opus codec runtime library projectm-jack - projectM JackAudio module projectm-pulseaudio - projectM PulseAudio module |
#apt-cache search audio
adplay - console-based OPL2 audio player adplug-utils - free AdLib sound library (utils) libadplug-dev - free AdLib sound library (development) libadplug0c2a - free AdLib sound library aeolus - Synthesised pipe organ emulator allegro-demo-data - graphics and audio data for allegro-demo liballegro4.2-plugin-arts - aRts audio plugin for the Allegro library liballegro4.2-plugin-esd - esd audio plugin for the Allegro library liballegro4.2-plugin-jack - JACK audio plugin for the Allegro library lib64asound2-plugins - ALSA library additional plugins (64 bit) ... projectm-pulseaudio - projectM PulseAudio module python-pyaudio - Python bindings for PortAudio v19 libvo-aacenc-dev - VisualOn AAC encoder library (development files) libvo-aacenc0 - VisualOn AAC encoder library vo-aacenc-dbg - VisualOn AAC encoder library (debugging symbols) libvo-amrwbenc-dev - VisualOn AMR-WB encoder library (development files) libvo-amrwbenc0 - VisualOn AMR-WB encoder library vo-amrwbenc-dbg - VisualOn AMR-WB encoder library (debugging symbols) x2goclient - X2Go Client application (Qt4) x2goplugin - X2Go Client (Qt4) as browser plugin |
#vim extensions.conf
|
#vim musiconhold.conf
--- /tmp/l3-saved-3994.18974.5963 2013-04-11 16:50:28.000000000 +0300 +++ musiconhold.conf 2013-04-11 17:21:56.000000000 +0300 @@ -77,11 +77,6 @@ ;application=/usr/bin/streamplayer 192.168.100.52 888 ;format=ulaw -[stream_moh] -mode=custom -application=/usr/bin/mpg123 http://cast.jamfm.com.ua/jamfm -format=wav - ; mpg123 on Solaris does not always exit properly; madplay may be a better ; choice ;[solaris] |
#vim /tmp/1.call
--- /dev/null 2013-04-11 09:25:54.932786819 +0300 +++ /tmp/1.call 2013-04-11 16:54:26.000000000 +0300 @@ -0,0 +1,3 @@ +Channel:SIP/2101 +Context:default +Extension:8105 |
#Extension:8105
|
#rm /var/spool/asterisk/outgoing/1.call
|
#cp -p /tmp/1.call /var/spool/asterisk/outgoing/
|
#~
|
#scp 192.168.70.1:/root/call-all.sh ~/
root@192.168.70.1's password: scp: /root/call-all.sh: No such file or directory |
#vim call-all.sh
--- /dev/null 2013-04-11 09:25:54.932786819 +0300 +++ call-all.sh 2013-04-11 17:09:45.000000000 +0300 @@ -0,0 +1,13 @@ +#!/bin/bash + +for CHANNEL in 2101 2102 minsk/{220{1,2},1{1,2,3,4}{1,2}} +do +FILENAME=/tmp/call-$(echo $CHANNEL |tr / .)-${RANDOM}${RANDOM}${RANDOM}${RANDOM}.call +cat <<EOF > ${FILENAME} +Channel:SIP/${CHANNEL} +Context:internal +Extension:8501 +EOF +chown asterisk:asterisk ${FILENAME} +mv ${FILENAME} /var/spool/asterisk/outgoing/ +done |
#bash call-all.sh
|
#ls /var/spool/asterisk/outgoing/
call-2101-31224482284495.call call-minsk.2201-6632318351934517372.call call-2102-2361726105207814320.call call-minsk.2202-19743209172169929739.call |
#less /etc/asterisk/extensions.conf
|
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze10 currently running on linux5 (pid = 1425) ... SIP/minsk-0000009b 8501@internal:2 Up Playback(/var/lib/asterisk/sou SIP/minsk-0000009a 8501@internal:2 Up Playback(/var/lib/asterisk/sou SIP/minsk-00000097 8501@internal:2 Up Playback(/var/lib/asterisk/sou SIP/minsk-00000096 8501@internal:2 Up Playback(/var/lib/asterisk/sou SIP/minsk-00000094 8501@internal:2 Up Playback(/var/lib/asterisk/sou 5 active channels 5 active calls 139 calls processed linux5*CLI> quit Executing last minute cleanups |
#ls /var/spool/asterisk/outgoing/
call-minsk.1201-16489156761660532261.call call-minsk.1301-596012131502118634.call call-minsk.2202-29329125001642130104.call call-minsk.1202-201035362119910425.call call-minsk.1302-26316304391810230883.call |
#rm /var/spool/asterisk/outgoing/*
|
#ls /var/spool/asterisk/outgoing/
call-2101-1900627000232672237.call call-minsk.1301-1205425088626123394.call call-minsk.2201-2623213312927513847.call call-2102-18700131362758928248.call call-minsk.1302-9670306242443621587.call call-minsk.2202-141861599557906898.call call-minsk.1201-777827962686424013.call call-minsk.1401-1146932462379522690.call call-minsk.1202-2219425593786226601.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2101-1900627000232672237.call call-minsk.1301-1205425088626123394.call call-minsk.2201-2623213312927513847.call call-2102-18700131362758928248.call call-minsk.1302-9670306242443621587.call call-minsk.2202-141861599557906898.call call-minsk.1201-777827962686424013.call call-minsk.1401-1146932462379522690.call call-minsk.1202-2219425593786226601.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2102-18700131362758928248.call call-minsk.1302-9670306242443621587.call call-minsk.2201-2623213312927513847.call call-minsk.1201-777827962686424013.call call-minsk.1401-1146932462379522690.call call-minsk.1202-2219425593786226601.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2102-18700131362758928248.call call-minsk.1302-9670306242443621587.call call-minsk.2201-2623213312927513847.call call-minsk.1201-777827962686424013.call call-minsk.1401-1146932462379522690.call call-minsk.1202-2219425593786226601.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2102-18700131362758928248.call call-minsk.1302-9670306242443621587.call call-minsk.2201-2623213312927513847.call call-minsk.1201-777827962686424013.call call-minsk.1401-1146932462379522690.call call-minsk.1202-2219425593786226601.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2102-18700131362758928248.call call-minsk.1302-9670306242443621587.call call-minsk.2201-2623213312927513847.call call-minsk.1201-777827962686424013.call call-minsk.1401-1146932462379522690.call call-minsk.1202-2219425593786226601.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2102-18700131362758928248.call call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1201-777827962686424013.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2102-18700131362758928248.call call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1201-777827962686424013.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2102-18700131362758928248.call call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1201-777827962686424013.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2102-18700131362758928248.call call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1201-777827962686424013.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-2102-18700131362758928248.call call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1201-777827962686424013.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1401-1146932462379522690.call call-minsk.1302-9670306242443621587.call call-minsk.1402-677137401503811863.call |
#ls /var/spool/asterisk/outgoing/
call-minsk.1202-2219425593786226601.call call-minsk.1302-9670306242443621587.call call-minsk.1401-1146932462379522690.call |
Время первой команды журнала | 10:47:00 2013- 4-11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:13:32 2013- 4-11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 7.92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.57 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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