Cron Job auto not working in freepbx

Hi Guys,

I want to run the below command after every hour during work hours in weekdays but this cron is not wokring.

asterisk -rx ‘channel originate Local/10000@ext-paging extension 1008@ext-paging’

I am using webmin but when I select run now. it works like a charm.

What could be the issue ?

cronjobs run under sh as the user owning the cronjob, perhaps asterisk is not in your path, if so give the full path to asterisk,

1 Like
/usr/sbin/asterisk -rx 'channel originate Local/10000@ext-paging extension 1008@ext-paging'

it worked but one issue it showes unknown CALLERID

Can I set the CALLERID ?

Channel originate bypasses the full FPBX dialplan, to do that, look into using a call.file instead where you CAN add that.

call.file with agi or how to execute it

construct it anyway you want . Heed all the warnings about ownership and copying versus moving it onto /var/spool/asterisk/outgoing, plenty of search results on asterisk call files

how can I write the code below in call file

[ext-paging-custom]
exten => 10000,1,Answer
exten => 10000,n,Wait(3)
exten => 10000,n,Playback(/var/lib/asterisk/sounds/custom/COVID_19_reminder)
exten => 10000,n,HangUp()

Use the editor of your chose, refer to

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Call+Files

adding fields as you want, when done change its ownership to asterisk and

Every “school hour” make a copy of it and move it into ./././outgoing

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.