Macro Dial plan help

Hi All,

I’m trying to integrate the following to my freepbx.

So I have the webhook working however i’m not sure how to put this into a dialplan

So in extention_custom.conf
[send-slack]
exten => s, 1, System(php /usr/src/slack-asterisk/notify.php frontdesk-private outgoingcall “${CALLERID(name)}” “${CALLERID(num)}” “${MACRO_EXTEN}”);

I created an extention and In advanced -context on freepbx I have put the following " send-slack".

When I try to dial or send any phone number to use the dial plan I get an error number not in dial plan.

So assumption is this dial plan related and if someone can help.

Thanks

Mark Couto

Do you guys need more information of what is trying to be achieved here?

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

So by replacing the s with lets say 200 i should be able to dial 200 ?

Tried this

exten => 9001,s,System “same as above”

This is the response I get below:

[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.

http://www.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/asterisk-CHP-5-SECT-2.html

http://www.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/asterisk-CHP-5-SECT-3.html

So
exten => s,1,System “same as above"

exten => 9001,1,System “same as above"

Ideally i would like this command to go off on an incoming call

Make an custom destination linking your dialplan to the GUI.
https://wiki.freepbx.org/display/FPG/Custom+Destinations+User+Guide

Add the custom dialplan as the destination of the inbound route in the GUI.

Hi,

exten => 9001,1,System(php /usr/s

Still the same issue

[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 ?

Thanks

Mark

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.

Thanks I think reading this helped

Fixed, I used custom destinations and using an extension to point to the custom destination

1 Like

I would not use system.

ARI, AGI or the Curl dialplan function.

https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=29395573
https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=32375589
https://wiki.asterisk.org/wiki/display/AST/cURL

1 Like

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