faisalkhan
(Faisal Khan)
January 11, 2021, 7:11pm
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 ?
dicko
(dicko)
January 11, 2021, 7:13pm
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,
1 Like
PitzKey
(Itzik)
January 11, 2021, 9:39pm
3
/usr/sbin/asterisk -rx 'channel originate Local/10000@ext-paging extension 1008@ext-paging'
faisalkhan
(Faisal Khan)
January 13, 2021, 7:01pm
4
it worked but one issue it showes unknown CALLERID
Can I set the CALLERID ?
dicko
(dicko)
January 13, 2021, 7:28pm
5
Channel originate bypasses the full FPBX dialplan, to do that, look into using a call.file instead where you CAN add that.
faisalkhan
(Faisal Khan)
January 13, 2021, 10:13pm
6
call.file with agi or how to execute it
dicko
(dicko)
January 13, 2021, 10:36pm
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
faisalkhan
(Faisal Khan)
January 14, 2021, 5:31pm
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()
dicko
(dicko)
January 14, 2021, 5:59pm
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
(system)
Closed
June 3, 2021, 11:03pm
10
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.