Email alert on Call Flow Toggle action

Hi guys,
I’ve been asked by a customer to enable an email notification upon “Holiday mode activation/deactivation”.
Currently, the holiday mode is managed by a Call Flow so I’ve been wondering if anyone already has implemented something like this, or how would you think the best (or more correct) way to implement this is.

I’ve thought about creating an extension to send the email and then proceed to the Call Flow as next action, but I’m not sure this would be the best way.

Many thanks in advance,
Giacomo

You’d want to send the email prior to dialing the call flow control, so a custom dialplan which sends an email and then sends the caller to the CFC is the way to go.

There are a few ways of setting call flow, only one of which uses dialplan. @PitzKey is on the right track, but will not work if using Phone Apps or a custom script to toggle CFC.

If you are using something like

exten => s,n,Dial(local/*271@from-internal)

will it also not work?

If the script calls the CFC dialplan, then yes it would work. I was thinking of PHP script that calls the CFC methods directly.

We’ve had several times that we needed to include a CFC in a custom dialplan. I found that using the above works best with making use of the built in CFC password as well as updating BLF and what not.

Thank you for your suggestions.
I am a developer but I have basic experience with FreePBX (and asterisk!) so I guess you’re suggesting to implement a custom extension (is this what you mean by custom dialplan?)?

Probably not. You may need to implement a custom context that implements your changes, but it shouldn’t require a custom extension. You can associate the context with several different implementation methods; a custom extension might work. Adding a feature code that implements your custom context would probably be cleaner and easier to remember.

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