Cron Job auto not working in freepbx

configuration
Tags: #<Tag:0x00007f24c5d70ca8>

(FAK) #1

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 ?


#2

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,


(Itzik) #3
/usr/sbin/asterisk -rx 'channel originate Local/10000@ext-paging extension 1008@ext-paging'

(FAK) #4

it worked but one issue it showes unknown CALLERID

Can I set the CALLERID ?


#5

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


(FAK) #6

call.file with agi or how to execute it


#7

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


(FAK) #8

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()


#9

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


(system) closed #10

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