Suggestion on 'hangup request' command

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Suggestion on 'hangup request' command

Postby rupen » Wed Jun 18, 2014 3:28 am

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
rupen
 
Posts: 24
Joined: Sat Mar 08, 2014 7:43 am
Location: India

Re: Suggestion on 'hangup request' command

Postby omarrodriguezt » Wed Jun 18, 2014 9:56 am

Hello,
On crontab is a good practice to use full path of ever file.
Example, instead asterisk you can try /usr/sbin/asterisk
http://www.ITContinental.com
Dedicated USA Servers - Vicibox - Vicidial - Limesurvey - Vtiger CRM - More than 15 years experience - Hablamos Español
omarrodriguezt
 
Posts: 667
Joined: Fri Jun 05, 2009 12:22 pm
Location: Dominican Republic

Re: Suggestion on 'hangup request' command

Postby rupen » Thu Jun 19, 2014 8:43 am

Thank you omar for quick reply,
I appreciate your help.
rupen
 
Posts: 24
Joined: Sat Mar 08, 2014 7:43 am
Location: India

Re: Suggestion on 'hangup request' command

Postby omarrodriguezt » Thu Jun 19, 2014 10:33 am

You are welcome!
http://www.ITContinental.com
Dedicated USA Servers - Vicibox - Vicidial - Limesurvey - Vtiger CRM - More than 15 years experience - Hablamos Español
omarrodriguezt
 
Posts: 667
Joined: Fri Jun 05, 2009 12:22 pm
Location: Dominican Republic


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 75 guests