How-To: Missed Calls Notifications

Hey everyone,

It’s time to give back to the community!

There are many requests for a missed call notification solution, I had shared in the past a semi workable solution but it was not elegant and you had to hardcode a dialplan for every extension.

I had tested a solution, a while ago, today I brushed it up a bit and tested again to confirm it is working. Well, I think it does!

In reality, I’d want to made a module where you can easily do it all from the GUI, but I am not there just yet…

So here you go guys, feel free to report back any issues:

Have a nice day!


This is great! Thanks @PitzKey, I’m eager to try this out :slight_smile:

1 Like

Nice work but I’m going to strongly recommend against the use of Macro(). It’s deprecated, it was set to noload in Asterisk 16, it is set for removal in 19 (next Standard release). However, that is tentative since FreePBX is so far behind in replacing Macro() with GoSub().

So I would say write this with future-forward thoughts and not keep FreePBX lagging in updates.

1 Like

Hi Tom,

You are right. Lorne mentioned in his post Hooking for fun and income that he opened a ticket to address the Macro/GoSub issue with the predial hooks.

However, it looks to me, that the ticket is only referring to the trunk predial hook. I updated the ticket, asking for the other hooks to be included as well.

So assuming it will actually be implemented the way it was suggested in the ticket, I went ahead and updated the github repo to support GoSub() as well.

Refresh the repo and let me know if you spot anything wrong.

Thank you

Line 5 and 17 still have MacroExit vs Return if those are meant to be gosubs. Other than that looks pretty good.

I made for each predial hook a GoSub and a Macro context, so as soon as FreePBX implements the GoSub method it’ll start working. So for now we need both. Unless I got it wrong?

You can just use a gosub. You call name the context whatever you want. The macro- prefix was a Macro() requirement. GoSub has no such requirement. You can just update macro contexts with Returns instead of MacroExit.

How you call on it is the big change. The syntax changes up on formatting and where to put the arguments. Plus you arent limited to the s extension, you can use any extension in a gosub call.

exten => _XXX,1,GoSub(macro-context,missed,1(ARG1,ARG2))

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