Page 1 of 1

Suggestion on 'hangup request' command

PostPosted: Wed Jun 18, 2014 3:28 am
by rupen
HI,

Vicidial Configuration :
Vicidial VERSION: 2.7-401a BUILD: 130508-2256 (Scratch Install) | Asterisk : 1.8.21.0 | Two servers (Asterisk on both server,web interface on both servers,both servers use same database) | DAHDI: 2.7.0.1 | libpri : 1.4.14 | Allo E1 PRI CARD with 2 slots on both servers |No Extra Software After Installation|Intel(R) Xeon(R) CPU E31220 @ 3.10GHz 8 MB Cache| 8 GB RAM | Cent OS 6.4 | Linux version 2.6.32-358.0.1.el6.i686 (mockbuild@c6b10.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Wed Feb 27 03:24:34 UTC 2013


There is requirement in my project to hangup inbound call in certain cases, For that I have made php script that runs every second and hangup a call if it matchs the condition.
For hangup channel i use below syntax :

echo system("asterisk -rx 'hangup requst $channel'").

It is working fine if i run script from Terminal .

Issue:
When i add script in cronjob at that time script is running fine but echo system("asterisk -rx 'hangup requst $channel'"). command does not execute.

Please suggest how to execute above command from cronjob

Re: Suggestion on 'hangup request' command

PostPosted: Wed Jun 18, 2014 9:56 am
by omarrodriguezt
Hello,
On crontab is a good practice to use full path of ever file.
Example, instead asterisk you can try /usr/sbin/asterisk

Re: Suggestion on 'hangup request' command

PostPosted: Thu Jun 19, 2014 8:43 am
by rupen
Thank you omar for quick reply,
I appreciate your help.

Re: Suggestion on 'hangup request' command

PostPosted: Thu Jun 19, 2014 10:33 am
by omarrodriguezt
You are welcome!