Slack Integration

Hi,

I’d like to enable Slack notifications for incoming calls on our FreePBX.

I’ve found no posts covering any integration between Slack and FreePBX and I’m posting to find out if anyone can point me in the right direction.

I’ve have found a blog article linked below which covers the setup between Asterisk and Slack using some custom code and a .php file which connects to the API and alerts the Slack channel when an incoming call is inbound.

I’ve completed the steps and the article mentions making changes to the dialplan to insert:

exten => _.,n,AGI(slack.php)

I have tried insert this into the /etc/asterisk/extensions_custom.conf however once the asterisk service has been restarted our inbound calls are no longer working until the addition has been removed.

Any assistance or wisdom on how to pull this off would be greatly appreciated.

Thanks!

Article puts lots of work into Slack setup and AGI, but no dialplan. It looks like you need to trigger this AGI immediately when the call arrives at the PBX, so a block of dialplan like this:

[from-pstn-slack]
exten => _.,1,Noop(Entering user defined context from-pstn-slack in extensions_custom.conf)
exten => _.,n,AGI(slack.php)
exten => _.,n,Goto(from-pstn,${EXTEN},1)

and then change the context of your trunk(s) to from-pstn-slack

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.