/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 |