Page 1 of 1

Zoneminder + Gnokii - how to set up a voicecall an event ?

Posted: Wed Jun 02, 2010 6:50 pm
by deepaer0
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:
Image

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.

Posted: Wed Jun 02, 2010 9:16 pm
by johnnytolengo
for sure try to execute the script manually as www-data user

sudo -u www-data /yourscript


and you will can see the errors online, then post them.


Jt.

Posted: Wed Jun 02, 2010 9:53 pm
by deepaer0
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.
Jt, grate thank you for your answer!
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" ?

Posted: Thu Jun 03, 2010 5:28 am
by johnnytolengo
I don't remember how I did it but the thing is arround:

/dev/ttyUSB <--- here i think you have to change the permission

also check

/etc/gnokii"conf file"
or ~gnokiiconfile


good luck.
jT.

Posted: Thu Jun 03, 2010 7:12 pm
by deepaer0
johnnytolengo 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
Hello again. Im dont understand anything :shock:
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

Posted: Thu Jun 03, 2010 8:29 pm
by johnnytolengo
try to create a new file with inside:

sudo /yourpathtoyourdialscript/dialscript.sh

and put in the filter : /path/newfile.sh

the idea is to run the file through another with the "sudo" command.

Jt.