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

Forum for questions and support relating to the 1.24.x releases only.
Post Reply
deepaer0
Posts: 3
Joined: Wed Jun 02, 2010 6:16 pm

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

Post by deepaer0 » Wed Jun 02, 2010 6:50 pm

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.

johnnytolengo
Posts: 184
Joined: Tue Oct 14, 2008 5:59 pm

Post by johnnytolengo » Wed Jun 02, 2010 9:16 pm

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.

deepaer0
Posts: 3
Joined: Wed Jun 02, 2010 6:16 pm

Post by deepaer0 » Wed Jun 02, 2010 9:53 pm

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" ?

johnnytolengo
Posts: 184
Joined: Tue Oct 14, 2008 5:59 pm

Post by johnnytolengo » Thu Jun 03, 2010 5:28 am

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.

deepaer0
Posts: 3
Joined: Wed Jun 02, 2010 6:16 pm

Post by deepaer0 » Thu Jun 03, 2010 7:12 pm

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

johnnytolengo
Posts: 184
Joined: Tue Oct 14, 2008 5:59 pm

Post by johnnytolengo » Thu Jun 03, 2010 8:29 pm

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.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 6 guests