/l3/users/sergey-tymku-public/nt-voip-2014-apr/debian5/root :1 :2 :3 :4 :5 :6 |
|
#~
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) |
#;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 ~ |
#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}) |
#vi /etc/asterisk/queues.conf
|
#vi /etc/asterisk/extensions.conf
|
#cat /tmp/1.call
![]() cat: /tmp/1.call: No such file or directory |
#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 |
#chown asterisk:asterisk /tmp/1.call
|
#cp -p /tmp/1.call /var/spool/asterisk/outgoing/
|
#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 |
#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 |
#crontab -l
![]() no crontab for root |
#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 |
#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 |
#/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 |
#/etc/init.d/cron restart
Restarting periodic command scheduler: cronStopping periodic command scheduler: cron. Starting periodic command scheduler: cron. |
#vi /usr/local/bin/call-all
|
#вфdate
Sat Apr 26 09:55:46 EEST 2014 |
#date
Sat Apr 26 09:55:47 EEST 2014 |
#date
Sat Apr 26 09:55:48 EEST 2014 |
#date
Sat Apr 26 09:55:48 EEST 2014 |
#date
Sat Apr 26 09:55:48 EEST 2014 |
#date
Sat Apr 26 09:55:49 EEST 2014 |
#date
Sat Apr 26 09:55:49 EEST 2014 |
#date
Sat Apr 26 09:55:49 EEST 2014 |
#date
Sat Apr 26 09:55:50 EEST 2014 |
#date
Sat Apr 26 09:55:50 EEST 2014 |
#date
Sat Apr 26 09:55:50 EEST 2014 |
#date
Sat Apr 26 09:55:51 EEST 2014 |
#date
Sat Apr 26 09:55:51 EEST 2014 |
#date
Sat Apr 26 09:55:51 EEST 2014 |
#date
Sat Apr 26 09:55:53 EEST 2014 |
#date
Sat Apr 26 09:55:54 EEST 2014 |
#date
Sat Apr 26 09:55:54 EEST 2014 |
#date
Sat Apr 26 09:55:55 EEST 2014 |
#date
Sat Apr 26 09:56:01 EEST 2014 |
#date
Sat Apr 26 09:56:02 EEST 2014 |
#date
Sat Apr 26 09:56:02 EEST 2014 |
#date
Sat Apr 26 09:56:02 EEST 2014 |
#date
Sat Apr 26 09:56:03 EEST 2014 |
#date
Sat Apr 26 09:56:03 EEST 2014 |
#date
Sat Apr 26 09:56:03 EEST 2014 |
#date
Sat Apr 26 09:56:03 EEST 2014 |
#date
Sat Apr 26 09:56:04 EEST 2014 |
#vi /usr/local/bin/
|
#~
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 |
#crontab -e
# m h dom mon dow command * * * * * /usr/local/bin/call-all # [ Wrote 26 lines ] crontab: installing new crontab |
#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 # |
#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 # |
#vi /usr/local/bin/call-all
|
#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 # |
#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 |
#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 |
#vi /usr/local/bin/call-all
|
#ls -al /usr/local/bin/call-all
-rw-r--r-- 1 root staff 295 Apr 26 10:16 /usr/local/bin/call-all |
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#vi /usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#[international]
![]() extensions.conf.1 extensions.conf.local extensions.conf.SAVED |
#vi /etc/asterisk/extensions.conf.local
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#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 |
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#/usr/local/bin/call-all
|
#~
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 |
#ls psi
![]() ls: cannot access psi: No such file or directory |
#lspsi
![]() l3script: lspsi: command not found |
#lspsi
![]() l3script: lspsi: command not found |
#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 |
#apt-cache search lspci
|
#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 |
#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. |
#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) |
#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) |
#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 |