How to play a message to the user before the agent answers the call?

Hello. I’m using FreePBX 14.0.3.16 on a Raspberry Pi3. I set up an IVR, which leads to a queue and finally to an Agent. I would like to play a custom audio message just before the agent answers. Something like “the agent Bob answers”. Is it possibile?
Thank you

Not really - once the call is in the queue, it’s ringing phones. I can’t think of a way to do it since the system can’t really get involved in the call once it’s established.

as Dave said the Queue is an “app” if you will. Once you hit the queue system you must remain in its parameters of what you see as available options. Its not flexible like many of the other modules that you can bend to suit your needs.

You can however have it play a message before it initially rings into the system.

You change the context of your incoming lines (mine was “from-dahdi”, I changed it to “from-dahdi-announcement”)

Then, in extensions_custom.conf:

[from-dahdi-announcement]
exten => _.,1,Answer()
exten => _.,n,Wait(1)
exten => _.,n,Playback(this-call-may-be-monitored-or-recorded)
exten => _.,n,goto(from-dahdi,${EXTEN},1)

This “intercepts” the incoming call, plays the message (in this case “This call may be monitored or recorded”) and then continues along the normal path of routing.

If you do NOT want that message played on certain DID’s (like fax lines…) then you include a step to skip over it…

Before the code above:

exten => 5551212,1,goto(from-dahdi,${EXTEN},1)

… that will skip the playing of the announcement and jump straight to the from-dahdi context.

I hope this helps!

That is not a solution for this at all. The OP wants to playback a message to a user that has been sent from the queue to an agents phone to ring and then when that agent picks up, playback a message to the user to tell them something.

This is not possible in the Queue app and would require some custom code/dialplan to be written and would be outside the scope of what FreePBX offers in the module itself. You can playback a message to the Agent (Member) before the call is connected and run a Macro or GoSub on the agent’s channel but there is not to playback to the caller in the queue that is sent to the member.

You will have to get creative because this is going to be a PITA to get in place, if possible.

If you do go this route it would be great to share your results. I know many who would be interested in having this function.

Hmmm… does FreePBX have “Call Screening”? Doesn’t that play a message before the phone rings? Probably not for a queue though…

The tricky part is that the call is ringing. The system can’t predict which phone will pick up the call, and there’s nothing in the extension that allows you to pick up a ringing call (at the handset) and play a message before talk time starts.

The closest you are going to get is to play a “welcome” message in the queue that says something like “Thanks for calling ‘X’. Please note that all calls are recorded for quality assurance purposes. One of reps will be with you momentarily.”

Doing it at the moment of pickup isn’t really an option.

Yes, but only works per extension. also OP seeks something opposite.

So queues use Local channels to call the Agents. When a user that is sitting in the Queue and gets to position 1 and the Queue rings all the Agents, the caller is still in the queue while the Local channels call all the agents. When an Agent answers the call, that Local channel then grabs the caller from the Queue and bridges those two channels together. However, unlike with Dial() there is no way to run a Macro or GoSub before the calls are bridged on the caller’s channel because they aren’t part of that original call to the Agent. Like I said there may be ways to do this but you’re going to really have to break down not only how the Queues are sending the calls and handling that bridging but how it’s going to impact what FreePBX does.

Honestly, in all my years of doing this and working with call center clients I have never had one ask or request the need to playback a message to the caller based on the agent that answers the phone. Now telling the agent all sorts of stuff when they get a call, yeah that’s big. Generally because a single agent is watching multiple queues (in some cases for multiple companies) and the agent needs to know what queue, what company, etc. for the call so they know how to handle it.

Edited: New Idea.

What about making a virtual extension, putting it in the Queue which then you can use the No Answer / Busy / Not reachable to then go to an announcement, which then the announcement plays, then sends the call to the real extension with an agent on it?

@GeekBoy Part of the problem with that is then you need to make the Queue honor the Agents FollowMe/Call Forward settings which is applies to all agents and can really screw up how calls are being sent to agents. You could end up putting calls into voicemail, someone cell phone and not get them back into the queue.

Maybe I need be more clear

Virtual Extension 1000 -> Announcement 1000 -> Extension 2000
Virtual Extension 1001 -> Announcement 1001 -> Extension 2001
Virtual Extension 1002 -> Announcement 1002 -> Extension 2002

Remember all. virtual extensions would have all Optional Destinations set to the Announcement xxxx.

Is that more clear? I do not see any reason why it would not. I am guessing this would work for static agents.

No. How would the Queue know which 2xxx extension is available?..

See above posts, you’ll need custom dialplan/code to accomplish this.

My question to OP:
Aren’t your agents introducing themselves once they answer? What are you trying to accomplish?

Virtual Extensions have no state therefore the Queue would never know if they are available or not and as it was pointed out, the Queue wouldn’t know the state of the actual agent.

Could you custom a state in the dialplan to make this work?

Since the call is deep in the queue at this point, it’s going to take a lot more than just dial-plan changes.

I honestly don’t think you can get here without completely rewriting the queue app, and even then you’re just going to end up with a new way to do queues. Having said that, I’m thinking “go for it”, but with the tools we have now, I don’t think you can get there from here.

1 Like

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