A plugin for the Slack chat bot by Shuai Lin to interact with Asterisk
Open the script and replace <SLACK_BOT>
with the name of your application.
Just type help to get a list of supported commands.
call <number> -- asks you what line to use to place the call. Answer in a thread to get connected.
send message to <number> -- asks what message to send to the specified phone number. Answer in a thread.
call back -- in a thread, calls back the sender of a text message or the phone number associated with an incoming call.
get gsm status -- asks about the status of the GSM line and returns the output.
ask <request> -- executes a request to Asterisk CLI and returns the output.
Basically, to place a call, ask call 0123456789
. Your bot will then ask you wether it should use your SIP landline or your GSM line - with chan_dongle. Reply landline
or gsm
in a thread. The call will be placed - your extension will be called first; and when you pick up the phone, the call to the recipient is initiated.
To send a text message, juste type send message to 0123456789
. Your bot will then ask for your message. Reply to that request in a thread, just with your message to the reciepent. It will then be sent using Gammu. The same way - in a thread -, you can reply to an incoming text message that your've been previously notified of.
Enjoy!
MIT