It sounds like the extension you are trying to send to the send-slack context does not exist. According to what you’ve written you only have dial plan for the “s” extension under send-slack. If there is not a matching extension in the context Asterisk will not know where to go.
So
A) Send the call to the “s” extension
or
B) Add another matching extension to send-slack
[2018-09-11 13:48:58] NOTICE[10211][C-000000c1]: chan_sip.c:26513 handle_request _invite: Call from ‘9002’ (10.12.4.26:50949) to extension ‘9001’ rejected becaus e extension not found in context ‘send-slack’.
Ideally i would like this command to go off on an incoming call however not sure how to set this up so have put a phone in the same ring group with a Call forward, hopefully it will send the command when it forwards the call.
[2018-09-11 14:00:17] NOTICE[10211][C-000000c5]: chan_sip.c:26513 handle_request_invite: Call from ‘9002’ (10.12.4.26:50949) to extension ‘9001’ rejected because extension not found in context ‘send-slack’.
Shall I scrap trying to make it dial out an move towards custom destinations ?
The error is again because the extension doesn’t exist in the context. It might be worth reading up on how extensions and routing work in Asterisk. The earlier links could be used as a starting point.
If you want a custom dial plan to run every time you dial an inbound route, then yes, a custom destination seems appropriate. In that case I would run it as an s route/extension.
I think you are missing some important components of the process, until you fill those in you will continue to be guessing.