Hi!
I am very new to freepbx…
Finally got it running with 2 phones.
Now i want to start a call to a phone from command line
Like a doorbel does for example.
I created the [fromdoor] in extensions_custom.conf
when i trigger the script i get the following message
No such command ‘originate SIP/5555 application Playback beep’ (type ‘core show help originate SIP/5555’ for other possible commands)
Any help on solving this would be phantastic
my freepbx version is FreePBX 15.0.16.42
Thanks for your quick reply!
when i do this my phones rings But i get the errors below
is it possible to run this command outside the CLI?
[2020-01-31 21:01:31] WARNING[7183][C-00000001]: app_macro.c:274 _macro_exec: Macro() is deprecated and will be removed from a future version of Asterisk.
[2020-01-31 21:01:31] WARNING[7183][C-00000001]: app_macro.c:275 _macro_exec: Dialplan should be updated to use Gosub instead.
[2020-01-31 21:01:31] WARNING[7183][C-00000001]: chan_sip.c:23163 func_header_read: This function can only be used on SIP channels.
[2020-01-31 21:01:31] ERROR[7183][C-00000001]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
Can i edit the behavior of this call some were?
for example that i need to hangup instead of auto hangup
and the caller id is the ip now, would like to give this a name
or isnt this possible to change?
I tried a lot with changing things and restarting but no succes.
What i wish to get and do is start a call from command line
Phone rings
Then pick it up and wait few seconds
Press a button to trigger a script (got that running )
Hang up the phone
It is for a movie setup
wow how nice you are helping me out to get this done!
i think this is exactly what i need…
but it is not working… well jet
when i run this in cli it calls but hangs up after i pickup
channel originate local/5555@from-internal extension s@movie-setup
when i run this from command line it also hangs up before pressing a button
asterisk -x “channel originate local/5555@from-internal extension s@movie-setup”
i did not change the /path/to/script but i gues that shoul only give an error
So fine you are helping me!
yes i did add it, and did a reboot or a “core restart now”
ehh what is the config edit module?
you mean this:
[movie-setup]
exten => s,1,Noop(entering user defined context in extensions_custom.conf)
exten => s,n,Read(myvar,custom/greeting,1,1,4)
exten => s,n,ExecIf($["${myvar}" = “1” ]?System(/home/asterisk/test.sh))
exten => s,n,Hangup
what i get when i run from cli is:
[2020-02-01 22:45:39] WARNING[2863][C-00000003]: chan_sip.c:23163 func_header_read: This function can only be used on SIP channels.
[2020-02-01 22:45:39] ERROR[2863][C-00000003]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2020-02-01 22:45:43] WARNING[2862][C-00000004]: file.c:782 ast_openstream_full: File custom/greeting does not exist in any format
[2020-02-01 22:45:43] WARNING[2862][C-00000004]: file.c:1255 ast_streamfile: Unable to open custom/greeting (format (slin)): No such file or directory
no need to play something, but if it makes it no problem for me
what extension does greeting nee to have? mp3? and were do i put it?
i can put an empty audio file i gues