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

Содержание

Журнал

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

/dev/pts/2
08:19:39
#vi /etc/asterisk/extensions.conf.local
08:23:54
#~
exten => _83XX,1,Answer
exten => _83XX,n,AgentLogin(0${EXTEN:2})
;exten => _22XX,1,Dial(SIP/${EXTEN})
;;exten => _2201,1,Dial(SIP/2201,3)
;;exten => _2201,n,NoOp(Dial Status: ${DIALSTATUS})
;exten => _2201,n,Dial(SIP/2202)
;exten => _2201,n,Goto(s-${DIALSTATUS})
;exten => s-NOANSWER,n,Dial(SIP/2202)
;exten => s-CONGESTION,n,Dial(SIP/2202)
08:24:04
#;exten => s-ANSWER,n,Hangup
; A strategy may be specified.  Valid strategies include:
;
; ringall - ring all available channels until one answers (default)
; leastrecent - ring interface which was least recently hung up by this queue
; fewestcalls - ring the one with fewest completed calls from this queue
; random - ring random interface
; rrmemory - round robin with memory, remember where we left off last ring pass
; rrordered - same as rrmemory, except the queue member order from config file
;             is preserved
; linear - rings interfaces in the order specified in this configuration file.
...
~
~
~
~
~
~
~
~
"/etc/asterisk/queues.conf" 544L, 23930C written
~
08:27:09
#vi /etc/asterisk/extensions.conf.local
--- /tmp/l3-saved-13163.14140.19171	2014-04-26 09:27:12.885319775 +0300
+++ /etc/asterisk/extensions.conf.local	2014-04-26 09:28:16.325320963 +0300
@@ -3,8 +3,9 @@
 exten => 2299,1,Dial(SIP/2201&SIP/2202)
 exten => 2299,1,Hangup
 
-exten => 2298,1,Answer
+exten => 2298,1,Answer  ;для queue обязательно 
 exten => 2298,n,Queue(queue1)
+exten => 2298,n,Hangup
 
 exten => _22XX,1,Macro(localcall,${EXTEN})
 
08:28:16
#vi /etc/asterisk/queues.conf
08:33:17
#vi /etc/asterisk/extensions.conf
08:34:18
#cat /tmp/1.call
cat: /tmp/1.call: No such file or directory
08:36:26
#vi /tmp/1.call
--- /tmp/l3-saved-13163.16212.22391	2014-04-26 09:36:31.049330253 +0300
+++ /tmp/1.call	2014-04-26 09:36:43.993330495 +0300
@@ -1,3 +1,3 @@
 Channel: SIP/2201
 Extension: 8200
-COntext: internal
+Context: internal
08:36:44
#chown asterisk:asterisk /tmp/1.call

08:37:11
#cp -p /tmp/1.call /var/spool/asterisk/outgoing/

08:37:34
#ls -al /usr/local/bin/
total 64
drwxrwsr-x  2 root     staff     4096 Apr 26 09:45 .
drwxrwsr-x 10 root     staff     4096 Apr 22 12:10 ..
-rwxr-xr-x  1 root     staff      702 Apr 25 14:18 asterisk-festival.pl
-rw-r--r--  1 root     staff      267 Apr 26 09:45 call-all
-rw-r-xr-x  1 asterisk asterisk   152 Apr 24 17:29 jabber-send
-rwxr-xr-x  1 root     staff    33439 Apr 22 13:55 l3-agent
-rwxr-xr-x  1 root     staff      100 Apr 22 13:55 l3-config
lrwxrwxrwx  1 root     staff        9 Apr 22 13:55 l3script -> /bin/bash
-rwxr-xr-x  1 root     staff      133 Apr 25 10:58 restart-samba
08:45:58
#cat /usr/local/bin/call-all
for N in kiev/{1,2,3}{1,2,3}0{1,2}
do
N=`echo $N | sed s@kiev/11@11@`
FILENAME=/tmp/$RANDOM$RANDOM.call
cat <<EOF > $FILENAME
Channel: SIP/$N
Extension: 8107
Context: internal
EOF
chown asterisk:asterisk $FILENAME
mv $FILENAME /var/spool/asterisk/outgoing/
done
08:49:37
#crontab -l
no crontab for root
08:52:53
#crontab -e
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
* * * * * /usr/local/bin/call-all
                                           [ Wrote 24 lines ]
crontab: installing new crontab
08:54:08
#crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
...
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
* * * * * /usr/local/bin/call-all
08:54:12
#/etc/init.d/crontab
acpid                   gdm3                    mtab.sh                 screen-cleanup
alsa-utils              halt                    networking              sendsigs
anacron                 hdparm                  network-manager         single
asterisk                hostname.sh             nfs-common              speech-dispatcher
atd                     hwclock.sh              pppd-dns                ssh
avahi-daemon            kbd                     procps                  sudo
binfmt-support          keyboard-setup          pulseaudio              udev
bluetooth               killprocs               rc                      udev-mtab
bootlogs                kmod                    rc.local                umountfs
bootmisc.sh             minissdpd               rcS                     umountnfs.sh
checkfs.sh              motd                    reboot                  umountroot
checkroot-bootclean.sh  mountall-bootclean.sh   rmnologin               unattended-upgrades
checkroot.sh            mountall.sh             rpcbind                 urandom
console-setup           mountdevsubfs.sh        rsync                   x11-common
cron                    mountkernfs.sh          rsyslog
dbus                    mountnfs-bootclean.sh   samba
exim4                   mountnfs.sh             saned
08:54:12
#/etc/init.d/cron restart
Restarting periodic command scheduler: cronStopping periodic command scheduler: cron.
Starting periodic command scheduler: cron.
08:54:37
#vi /usr/local/bin/call-all
08:55:17
#вфdate
Sat Apr 26 09:55:46 EEST 2014
08:55:46
#date
Sat Apr 26 09:55:47 EEST 2014
08:55:47
#date
Sat Apr 26 09:55:48 EEST 2014
08:55:48
#date
Sat Apr 26 09:55:48 EEST 2014
08:55:48
#date
Sat Apr 26 09:55:48 EEST 2014
08:55:48
#date
Sat Apr 26 09:55:49 EEST 2014
08:55:49
#date
Sat Apr 26 09:55:49 EEST 2014
08:55:49
#date
Sat Apr 26 09:55:49 EEST 2014
08:55:49
#date
Sat Apr 26 09:55:50 EEST 2014
08:55:50
#date
Sat Apr 26 09:55:50 EEST 2014
08:55:50
#date
Sat Apr 26 09:55:50 EEST 2014
08:55:50
#date
Sat Apr 26 09:55:51 EEST 2014
08:55:51
#date
Sat Apr 26 09:55:51 EEST 2014
08:55:51
#date
Sat Apr 26 09:55:51 EEST 2014
08:55:51
#date
Sat Apr 26 09:55:53 EEST 2014
08:55:53
#date
Sat Apr 26 09:55:54 EEST 2014
08:55:54
#date
Sat Apr 26 09:55:54 EEST 2014
08:55:54
#date
Sat Apr 26 09:55:55 EEST 2014
08:55:55
#date
Sat Apr 26 09:56:01 EEST 2014
08:56:01
#date
Sat Apr 26 09:56:02 EEST 2014
08:56:02
#date
Sat Apr 26 09:56:02 EEST 2014
08:56:02
#date
Sat Apr 26 09:56:02 EEST 2014
08:56:02
#date
Sat Apr 26 09:56:03 EEST 2014
08:56:03
#date
Sat Apr 26 09:56:03 EEST 2014
08:56:03
#date
Sat Apr 26 09:56:03 EEST 2014
08:56:03
#date
Sat Apr 26 09:56:03 EEST 2014
08:56:03
#date
Sat Apr 26 09:56:04 EEST 2014
08:56:26
#vi /usr/local/bin/
08:57:21
#~
for N in kiev/{1,2,3}{1,2,3}0{1,2}
FILENAME=/tmp/$RANDOM$RANDOM.call
cat <<EOF > $FILENAME
Channel: SIP/$N
Extension: 8107
Context: internal
EOF
chown asterisk:asterisk $FILENAME
~
~
~
~
~
~
~
"/usr/local/bin/call-all" 19L, 280C written
09:03:37
#crontab -e
# m h  dom mon dow   command
* * * * * /usr/local/bin/call-all
#
                                           [ Wrote 26 lines ]
crontab: installing new crontab
09:03:51
#crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
...
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
* * * * * /usr/local/bin/call-all
#
09:05:13
#crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
...
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
#* * * * * /usr/local/bin/call-all
#
09:05:28
#vi /usr/local/bin/call-all
09:06:27
#crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
...
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
#* * * * * /usr/local/bin/call-all
#
09:06:30
#crontab -e
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
...
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
                                            [ Read 26 lines ]
No modification made
09:06:35
#vi /usr/local/bin/call-all
--- /tmp/l3-saved-13163.23204.26068	2014-04-26 10:15:37.273374301 +0300
+++ /usr/local/bin/call-all	2014-04-26 10:16:24.133375180 +0300
@@ -1,6 +1,7 @@
 #!/bin/bash
 
-for N in kiev/{1,2,3}{1,2,3}0{1,2}
+#for N in kiev/{1,2,3}{1,2,3}0{1,2}
+for N in 2102
 do
 
 N=`echo $N | sed s@kiev/11@11@`
@@ -8,7 +9,7 @@
 
 cat <<EOF > $FILENAME
 Channel: SIP/$N
-Extension: 8107
+Extension: 2101
 Context: internal
 EOF
 
09:16:24
#vi /usr/local/bin/call-all
09:16:40
#ls -al /usr/local/bin/call-all
-rw-r--r-- 1 root staff 295 Apr 26 10:16 /usr/local/bin/call-all
09:17:06
#/usr/local/bin/call-all

09:18:10
#/usr/local/bin/call-all

09:18:15
#/usr/local/bin/call-all

09:18:16
#/usr/local/bin/call-all

09:19:44
#vi /usr/local/bin/call-all
09:19:53
#/usr/local/bin/call-all

09:19:56
#/usr/local/bin/call-all

09:20:46
#/usr/local/bin/call-all

09:23:13
#[international]
extensions.conf.1      extensions.conf.local  extensions.conf.SAVED
09:23:13
#vi /etc/asterisk/extensions.conf.local
09:24:28
#/usr/local/bin/call-all

09:24:31
#/usr/local/bin/call-all

09:30:32
#vi /usr/local/bin/call-all
--- /tmp/l3-saved-13163.17897.783	2014-04-26 10:30:56.929391566 +0300
+++ /usr/local/bin/call-all	2014-04-26 10:31:04.265391703 +0300
@@ -8,7 +8,7 @@
 FILENAME=/tmp/$RANDOM$RANDOM.call
 
 cat <<EOF > $FILENAME
-Channel: SIP/vienna/2102
+Channel: SIP/2102
 Extension: 2101
 Context: local
 EOF
09:31:16
#/usr/local/bin/call-all

09:32:13
#/usr/local/bin/call-all

09:32:14
#/usr/local/bin/call-all

09:32:14
#/usr/local/bin/call-all

09:32:14
#/usr/local/bin/call-all

09:32:15
#/usr/local/bin/call-all

09:32:16
#/usr/local/bin/call-all

09:32:17
#/usr/local/bin/call-all

09:32:18
#/usr/local/bin/call-all

09:32:18
#/usr/local/bin/call-all

09:32:19
#/usr/local/bin/call-all

09:32:19
#/usr/local/bin/call-all

09:33:42
#~
FILENAME=/tmp/$RANDOM$RANDOM.call
cat <<EOF > $FILENAME
Channel: SIP/$N
Extension: 2101
Context: local
"/usr/local/bin/call-all" 21L, 293C
EOF
cat
#mv $FILENAME /var/spool/asterisk/outgoing/
cat
mv $FILENAME /var/spool/asterisk/outgoing/
~
                                                                                       19,1          All
09:39:24
#ls psi
ls: cannot access psi: No such file or directory
09:43:54
#lspsi
l3script: lspsi: command not found
09:43:56
#lspsi
l3script: lspsi: command not found
09:44:04
#apt-cache search pci
asterisk - Open Source Private Branch Exchange (PBX)
libcomedi0 - Library for Comedi
cpqarrayd - monitoring tool for HP (Compaq) SmartArray controllers
ctdb - clustered database to store temporary data
libdiscover-dev - hardware identification library development files
libdiscover2 - hardware identification library
discover-data - Data lists for Discover hardware detection system
dmidecode - SMBIOS/DMI table decoder
edac-utils - report kernel-detected PCI and ECC RAM errors
libedac-dev - report kernel-detected PCI and ECC RAM errors
...
linux-wlan-ng-doc - documentation for wlan-ng
mii-diag - A little tool to manipulate network cards
nictools-pci - Diagnostic tools for many PCI ethernet cards
libpci-dev - Linux PCI Utilities (development files)
libpci3 - Linux PCI Utilities (shared library)
pciutils - Linux PCI Utilities
phpsysinfo - PHP based host information
python-ethtool - Python bindings for the ethtool kernel interface
texlive-latex-extra - TeX Live: LaTeX supplementary packages
tnef - Tool to unpack MIME application/ms-tnef attachments
09:44:16
#apt-cache search lspci

09:44:20
#apt-cache search ls pci
asterisk - Open Source Private Branch Exchange (PBX)
libcomedi0 - Library for Comedi
cpqarrayd - monitoring tool for HP (Compaq) SmartArray controllers
dmidecode - SMBIOS/DMI table decoder
edac-utils - report kernel-detected PCI and ECC RAM errors
libedac-dev - report kernel-detected PCI and ECC RAM errors
libedac1 - report kernel-detected PCI and ECC RAM errors
libedac1-dbg - report kernel-detected PCI and ECC RAM errors
flashrom - Identify, read, write, erase, and verify BIOS/ROM/flash chips
gdal-bin - Geospatial Data Abstraction Library - Utility programs
...
libgdal-ruby1.8 - Ruby 1.8 bindings to the Geospatial Data Abstraction Library
libgdal1 - Geospatial Data Abstraction Library
libgdal1-dev - Geospatial Data Abstraction Library - Development files
python-gdal - Python bindings to the Geospatial Data Abstraction Library
inteltool - Dump Intel CPU / chipset configuration parameters
mii-diag - A little tool to manipulate network cards
nictools-pci - Diagnostic tools for many PCI ethernet cards
libpci-dev - Linux PCI Utilities (development files)
pciutils - Linux PCI Utilities
texlive-latex-extra - TeX Live: LaTeX supplementary packages
09:44:21
#apt-get install pciutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
pciutils is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
09:44:52
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4)
00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4)
00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04)
00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
09:44:59
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4)
00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4)
00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04)
00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
09:48:56
#lsmod
Module                  Size  Used by
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
binfmt_misc            12957  1
nfsd                  216170  2
nfs                   308313  0
nfs_acl                12511  2 nfs,nfsd
auth_rpcgss            37143  2 nfs,nfsd
fscache                36739  1 nfs
...
cdrom                  35401  1 sr_mod
crc_t10dif             12348  1 sd_mod
ahci                   24997  2
libahci                22941  1 ahci
libata                140630  2 libahci,ahci
scsi_mod              162269  4 libata,sd_mod,sr_mod,sg
ehci_hcd               40215  0
usbcore               128741  5 ehci_hcd,usbhid,snd_usbmidi_lib,snd_usb_audio
usb_common             12354  1 usbcore
e1000e                120822  0
09:48:59