[SOLVED] Launch callback from CLI or web?

I have got a FreePBX machine where I managed to set up callback: When I call from my mobile phone, freepbx hangs up, calls me back and I can hear DISA to make a call out. However, this is quite inconvenient as I have to write down a number and type/dial the number at phone keyboard after I hear DISA.

As my mobile is smartphone with (slow) data connection, I was thinking of making a call by launching the callback feature from website or even from ssh (=cli). However I am not a freepbx/asterisk guru and cannot find clear answer using Google.

Could someone please give me a hint how the command should look like? I simply need freepbx to call my mobile and when I pick up, call a certain number included in the command. I guess I have to do ssh login to the machine, run something like asterisk -r, then what? :wink:

Look up Asterisk Call files. For your purposes thats the easiest way to do it. Basically you create a small text file that says “Call number X, and when X answers pass the call to a given context/priority/extension in the dialplan”.

The call file can contain channel variables that get passed to the context/priority/extension, so you can use that to control what gets called after you answer your cell.

It requires a bit of custom dialplan to work, but it’s certainly not rocket science. Just be aware that you are potentially opening a massive security hole in that if for some reason anyone else is ever able to access your script, they could potentially get your system to call any number they wanted… so make sure you secure the heck out of it.

Thanks a lot jolouis, Asterisk Call files was the keyword I needed :slight_smile: I can already call my cell by copying the file to /var/spool/asterisk/outgoing/. If someone had the same problem, this guide was a big help for me:
Yes, I am aware of the security,thanks.

You need to move the file not copy it.

hard links work also

Thanks for the warning, if only I paid attention to red text in manual :slight_smile: Yes, I can see that now, the correct way is to:

  1. Create a call file in some other directory
  2. Move it to outgoing folder
    This should prevent a situation when only part of the call file is copied while Asterisk reads it …as far as I understand.