Good day everyone. Im noob in Linux, will be very grateful community for help or advice.
Description of my problem:
Ubuntu 9.04 + Zoneminder 1.24.2 + Gnokii 0.6.26 + USB-connected camera.
It works correctly, in the mode Modect was succesfully created events.
The Apache user "www-data" have all permissions and successfully performed the call to the specified number:
$gnokii --dialvoice "mynumber"
The script "zmcall.sh"
----------------------------------------------
#!/bin/sh
/usr/bin/gnokii --dialvoice "mynumber"
date > /tmp/somefile.log
echo "I was called as $@" >> /tmp/somefile.log
----------------------------------------------
placed in the folder /usr/share/zoneminder,
that script, folder and my phone/dev/ttyACM0 have permissions chmod 777
In interface of Zoneminder I create a filter:
The filter is saved and running in background.
But when camera in mode "Modect" create events, created filter does not work = call to the number, witch specified in the script, does not occur.
Anybody have implemented successfully a bunch Zoneminder + Gnokii?
What I missed or make wrong?
Thanx to All.
Zoneminder + Gnokii - how to set up a voicecall an event ?
-
- Posts: 184
- Joined: Tue Oct 14, 2008 5:59 pm
Jt, grate thank you for your answer!johnnytolengo wrote:for sure try to execute the script manually as www-data user
and you will can see the errors online, then post them.
Indeed, when the script run, i have error with permissions.
-----------------------------------------------------------------------------
root@user:~# sudo -u www-data /usr/share/zoneminder/zmcall.sh
GNOKII Version 0.6.26
Couldn't read /root/.gnokiirc config file.
Couldn't read /root/.gnokiirc config file.
Cannot open logfile /root/.gnokii-errors
WARNING: cannot open logfile, logs will be directed to stderr
Gnokii serial_open: open: Permission denied
Couldn't open FBUS device: Permission denied
Gnokii serial_open: open: Permission denied
Couldn't open FBUS device: Permission denied
Gnokii serial_open: open: Permission denied
Couldn't open FBUS device: Permission denied
Telephone interface init failed: Command failed.
Quitting.
Command failed
-----------------------------------------------------------------------------
Jt, would you tell me, plz, how to properly set the permissions for my Gnokii config filez for user "www-data" ?
-
- Posts: 184
- Joined: Tue Oct 14, 2008 5:59 pm
Hello again. Im dont understand anythingjohnnytolengo wrote:I don't remember how I did it but the thing is arround:
/dev/ttyUSB <--- here i think you have to change the permission
I was successfully fixed permissions for my script and command
---------------------------------------------------------------------
sudo -u www-data /usr/share/zoneminder/zmcall.sh
---------------------------------------------------------------------
run successfully - call was created.
But if I turn my camera in "Modect" or "Mocord" mode - event was created, but script not working.
Does my filter (on screenshoot) created correctly?
Thanx to All
-
- Posts: 184
- Joined: Tue Oct 14, 2008 5:59 pm