I have FreePBX 13.0.194.10 with Asterisk 13.18.3.
Is there a way to initiate an outgoing call to an internal extension (for ex. 555) from a shell script?
I have a reporting system. Every night this system runs reports. At the end of the night the system will finish and the result will be SUCCESS or FAIL. I can get this report system to ssh into the FreePBX and call in a script. But I don’t know how to create a script to mane the outgoing call.
After i placed the file in /var/spool/asterisk/outgoing/, I did get a call at the extension 555; however, nothing was played back.
These WARNING messages showing up in my asterisk log.
[2018-05-23 11:20:21] WARNING[6352] file.c: File Hello1234 does not exist in any format
[2018-05-23 11:20:21] WARNING[6352] file.c: Unable to open Hello1234 (format (ulaw)): No such file or directory
[2018-05-23 11:20:21] WARNING[6352] app_playback.c: Playback failed on SIP/555-00000c47 for Hello1234
[2018-05-23 11:58:50] WARNING[10610] file.c: File /var/www/html/admin/modules/core/sounds/en/please-enter-your-extension-then-press-pound.sln does not exist in any format
[2018-05-23 11:58:50] WARNING[10610] file.c: Unable to open /var/www/html/admin/modules/core/sounds/en/please-enter-your-extension-then-press-pound.sln (format (ulaw)): No such file or directory
[2018-05-23 11:58:50] WARNING[10610] app_playback.c: Playback failed on SIP/555-00000c59 for /var/www/html/admin/modules/core/sounds/en/please-enter-your-extension-then-press-pound.sln
The file /var/www/html/admin/modules/core/sounds/en/please-enter-your-extension-then-press-pound.sln
is available in the specified directory.
I am so confused with the document instruction for the Data part.
Why not just use the “/var/lib/asterisk/sounds/” directory?
Another option: I often do not use data in call files, excluding it entirely. I usually point the call file to a context, which can play a system recording, then hang up. This works very well for us, we use it 1,000s of times per day.
The system did call me but there was nothing played back.
This is the WARNING i see from the asterisk log:
[2018-05-23 13:49:56] WARNING[19354][C-000007e0] pbx.c: Channel ‘SIP/255-00000c9a’ sent to invalid extension but no invalid handler: context,exten,priority=call-file-test,10,1
I did so. It’s still not working.
I don’t know what the author meant by “extension 10”. I do not have this extension. So I replaced 10 with an existing extension of 252.
And the the result is still the same. I received no play back.
This is the log from asterisk
[2018-05-23 14:11:02] WARNING[22913][C-000007f1] chan_iax2.c: Resyncing the jb. last_delay 0, this delay -13419, threshold 1000, new offset 13419
[2018-05-23 14:11:02] WARNING[22982][C-000007f1] chan_iax2.c: Resyncing the jb. last_delay 0, this delay -352737606, threshold 1000, new offset 352737606
[2018-05-23 14:11:59] VERBOSE[23137] pbx_spool.c: Attempting call on SIP/255 for 10@call-file-test:1 (Retry 1)
[2018-05-23 14:11:59] VERBOSE[23137] netsock2.c: Using SIP VIDEO TOS bits 136
[2018-05-23 14:11:59] VERBOSE[23137] netsock2.c: Using SIP VIDEO CoS mark 6
[2018-05-23 14:11:59] VERBOSE[23137] netsock2.c: Using SIP RTP TOS bits 184
[2018-05-23 14:11:59] VERBOSE[23137] netsock2.c: Using SIP RTP CoS mark 5
[2018-05-23 14:11:59] VERBOSE[23137] dial.c: Called 255
[2018-05-23 14:11:59] VERBOSE[23137] dial.c: SIP/255-00000cb1 is ringing
[2018-05-23 14:12:00] VERBOSE[23137] dial.c: SIP/255-00000cb1 answered
[2018-05-23 14:12:00] WARNING[23137][C-000007f2] pbx.c: Channel ‘SIP/255-00000cb1’ sent to invalid extension but no invalid handler: context,exten,priority=call-file-test,10,1
[2018-05-23 14:12:00] NOTICE[23137][C-000007f2] pbx_spool.c: Call completed to SIP/255
[2018-05-23 14:13:02] VERBOSE[23460] pbx_spool.c: Attempting call on SIP/255 for 252@call-file-test:1 (Retry 1)
[2018-05-23 14:13:02] VERBOSE[23460] netsock2.c: Using SIP VIDEO TOS bits 136
[2018-05-23 14:13:02] VERBOSE[23460] netsock2.c: Using SIP VIDEO CoS mark 6
[2018-05-23 14:13:02] VERBOSE[23460] netsock2.c: Using SIP RTP TOS bits 184
[2018-05-23 14:13:02] VERBOSE[23460] netsock2.c: Using SIP RTP CoS mark 5
[2018-05-23 14:13:02] VERBOSE[23460] dial.c: Called 255
[2018-05-23 14:13:02] VERBOSE[23460] dial.c: SIP/255-00000cb2 is ringing
[2018-05-23 14:13:07] VERBOSE[23460] dial.c: SIP/255-00000cb2 answered
[2018-05-23 14:13:07] WARNING[23460][C-000007f3] pbx.c: Channel ‘SIP/255-00000cb2’ sent to invalid extension but no invalid handler: context,exten,priority=call-file-test,252,1
[2018-05-23 14:13:07] NOTICE[23460][C-000007f3] pbx_spool.c: Call completed to SIP/255