Voicemail to call agents and play

Discussion in 'Call Flow Designer' started by netropolix1, Feb 27, 2018.

Thread Status:
Not open for further replies.
  1. netropolix1

    Joined:
    Feb 10, 2012
    Messages:
    1
    Likes Received:
    0
    Hello,

    I've been trying to create the following CFD, but I've been having some trouble getting it to work.

    We've got a customer who wants the following setup during Out of Office hours:
    1. Customer calls => gets a message they're closed
    2. They can chose to leave a message in the voicemail
    3. If the customer's call/voicemail is complete. The CFD should trigger a call to X number of agents in a queue (round robin style until someone answers)
    4. Once an agent answers the call, that specific voicemail that was left behind by the customer should be played to that agent.
    5. Done

    First of all, is this something that is doable with CFD?

    At the moment, I'm having trouble with getting the recorded message to prompt to an agent.
    I'm using the "Record" call option with "CONCATENATE("CallFrom_",session.ani,".wav")" so every record should be unique. But then to play the prompt to an agent, I have no idea how to "request" that file. I was thinking of using call option: "Prompt Playback" with dynamic file audio playback and then the same "CONCATENATE("CallFrom_",session.ani,".wav")" but that doesn't seem to work.

    Any help is very much appreciated!

    Best Regards,
    Steff
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,067
    Likes Received:
    75
    Hello Steff,

    Yes, this is something you can do with the CFD. And this is how you need to do it:
    1) You need 2 CFD projects and a queue of agents:
    - One project containing a callflow.
    - One project containing a callflow and a dialer.
    - A standard Queue/Ring Group having the agents that will hear the voicemail.

    2) In the first project you will create the callflow that records the audio and saves it to a wav file. You can save all the wav files in a specific folder, for example "C:\AudioFolder". I would use a different expression to create the wav file name, using some random part, to avoid using the same name for 2 calls from the same number. If you use the expression:
    CONCATENATE("CallFrom_",session.ani,".wav")

    Then 2 calls from the same number will use the same file name. So maybe it's better using something like:
    CONCATENATE("CallFrom_",session.ani,"_random_",new System.Random().Next(1000),".wav")

    If you want to be 100% sure that the file doesn't exist, you might also want to use a C# script to check that, and try with a different name if it exists.

    3) The previous project will just save audio files to the folder "C:\AudioFolder". So in the second project, we need a Dialer. This dialer will check for files in that folder, and when it finds a file, it will make the call to the queue/ring group of agents. You will need a C# script to check for these files. You can use a Make Call component to make the call, and you need to configure it as follows:
    - Origin: queue/ring group extension
    - Destination: CFD callflow 2 extension

    This way, 3CX will make a call to the queue/ring group of agents, and when this call is connected, it will call the CFD callflow 2 extension, which is the callflow that we still need to create, and will reproduce the wav file to the agent that picks up the call.

    4) The final part is the second callflow. This callflow will receive a call already connected to the agent, so it can start playing a file from folder "C:\AudioFolder". You need a C# script to get the file name (checking for existing files in the audio folder), and then you use a Prompt Playback component with a Dynamic Audio File prompt, and the returned file name from the script as expression. When playback ends, it needs to delete the file (using another script), so the dialer stops making calls for this file.


    In addition, you will have to consider that you might have more than 1 wav file in that folder, and in that case you might have 2 simultaneous calls to the second callflow. Each of these calls should reproduce a different audio file. So you need to use some mechanism to determine the next file name to reproduce. You can use a text file for example to write a list of pending files...

    Hope you find the information useful.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. voiptoys

    voiptoys Member

    Joined:
    Feb 13, 2013
    Messages:
    480
    Likes Received:
    80
    You should look at our "3CX On Call Manager" add-on. It does exactly what you are trying to accomplish, plus much more. For example, in addition to monitoring for voicemails, we can log scheduled agents into queues, then send callers to a queue to speak with a live agent. We also log all the events for monitoring SLA requirements and agent performance. https://www.VoIPTools.com
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. DL_

    DL_

    Joined:
    Mar 31, 2015
    Messages:
    55
    Likes Received:
    8
    Isn't that what session.callid is for? I thought that was a unique call reference?
     
  5. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,067
    Likes Received:
    75
    The variable session.callid contains a unique variable as long as you don't restart the 3CX Queue Manager service. When the service is restarted, the counter starts again from zero. So it is useful in some cases, but not always.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.