Incoming call tagging / announcement

I have 5 trunks. On an incoming call situation I would like to know what trunk is the call coming from or what number was dialed prior to answering external calls. Currently all incoming calls are routed to ring groups, then all of the extensions ring simultaneity. It would be ideal to be able to get a recorded message to play before we answer the phone so that we are aware of what number was dialed. Is there a way to make this work?


You are using a lot of FreePBX terminology. You probably want http://community.

1 Like

Hey David, thanks for suggesting the freepbx site. In fact I am looking for an asterisk related answer. I believe it has to do with the asterisk macros / dial. Correct me if I’m wrong please.

Asterisk doesn’t come with any macros, as they are deprecated, and the only dialplan it comes with are samples. Any dialplan code is part of FreePBX, not Asterisk.

David, thank you for the clarification. You seam to be a knowledgeable guy. You wouldn’t happen to know if what I ask is possible would you?

Hey Paul,

When doing your Dial() in the dial plan you might look at the ‘A’ for anything prerecorded. If you’d like to do something more dynamic, you could use the ‘U()’ dial flag to execute a gosub on the channels involved to do just about anything possible in dialplan on the called channels.

You can read more about it at the doc page for the dial application:

Hope that helps,
Matthew Fredrickson

I’ll take a look at it, thank Matthew!