I am running asterisk 1.6.12
We are trying to set up call files to auto call from an orion solarwinds box when ever we have an issue. Now solarwinds will allow us to launch an application or script when there is a warning. So that part is fine.
my call file looks like this basically:
Same setup but with a different sound file. This works every time. Dials my number playsback on answer. no problem.
Now my issue comes when I try to right a script that will allow me to move my call file from the solarwinds box to my asterisk box. Using pscp.exe I can move the file over to asterisk. Now I need to beable to have my script change the ownership and the group of the file to asterisk. I know to use the chmod and chown commands, but how to I launch them from a windows box? Or is there a better way that I am missing. voip-info.org/tiki-index.php … o-dial+out
this site lacks in the changing ownership department.
This doesn’t make sense from a security point of view. You are using a non-root Asterisk (which tends to cause problems for many people), but you want an external system to be able to change file ownership, which means it has to have root access!
you can get into tricky situations, specially if the linux box has selinux activated.
to copy with the right owner, you need to setup ssh for this user, and then do a scp myfile.call user@host:/directory
I dont specifically know tscp, but if it is a correct implementation, it should support this syntax.
Alternatively, you can replace the call files with the use of AMI.
J.
so we use the asterisk user account cause I did not set it up. So… I have a script that will do most every thing. my question is how can I launch my script from outside of the linux … I need to get it to launch on the asterisk box but I need a way of calling it from my monitoring system. The AMI might be a good start I am just not familiar with it.
You might consider mounting a shared Windows folder from Linux using SAMBA. Then via /etc/crontab on Linux, move files from this folder to /var/spool/asterisk/outgoing, every minute.
Right a shell or bash script to copy the file from your directory and change the owner and then mv it.
example : cp /var/spool/asterisk/tmp/call/* /var/spool/asterisk/tmp
chown asterisk:asterisk /var/spool/asterisk/tmp/*
mv /var/spool/asterisk/tmp/* /var/spool/asterisk/outgoing
Copys all files in the Call directory. Changes the owner and then moves the files to outgoing