11-25-2024 02:00 AM
Hello.
When an incoming (customer) call enters the CUCM, after an agent has answered, I need to play a short (pre-recorded) audio into the call, so that both parties (customer & agent) hear it, before they continue to chat.
The way I currently accomplish it is by answering the customer's call with a CTI-port, which then initiates a 2nd call to the agent. When the agent answers, the two calls are merged into a conference call, and then, the audio is RTP streamed to CTI port's output, so that all call-parties hear it (i.e. the customer & the agent).
Is there a way to accomplish the same result without using a conference call?
Could a Consult-Transfer approach be applied? If so, how exactly?
Is another approach applicable?
Thanks much.
11-25-2024 09:42 AM
The Agent Greeting feature is designed to do just this. It effectively creates a local conference using the phone's built-in-bridge DSP, with simplified call model.
11-25-2024 10:20 AM - edited 11-25-2024 10:24 AM
Thanks, David, for your feedback.
(1) Is the Agent Greeting a basic feature built into the CUCM itself (v14), or should it be purchased separately, or a part of UCCX/UCCE?
(2) Meanwhile, I've tried invoking the addMediaStream method of an agent's terminal-connection, while call is in TALKING state, but an InvalidStateException is thrown, saying: "Failed to start streaming media". Ofcourse, I've enabled Built-in-Bridge for this terminal, in CUCM's administration panel, and set its Privacy attribute to Off.
Could you suggest why and/or point an online code-snippet showing how to utilize the Agent-Greeting feature / 'addMediaStream' method?
11-25-2024 10:40 AM
1. It's a feature of CUCM...'IVR call' is mentioned as that is an easy way of implenting the agent greeting, i.e. having a unique IVR number per agent which auto answers and plays the desired audio file. However, anything that can answer the call, play audio, and immediately hang up should work fine, e.g. a CTI port (though heed the note in the docs re threading) - for testing this could (I think) also just be another phone as long as it's answered quickly. (I have a vague recollection that the IVR call may be unusual in some way that may prevent some things from dealing with it...)
2. I'm not aware of a sample, unfortunately. Possible things to look at:
11-26-2024 03:58 AM
Thanks again, David, for the useful information.
Please note that the mere call to the addMediaStream method yields an (InvalidStateException) exception.
I'm not even getting to the stage at which the CTI-port should "answer" this call, not to mention the stage at which it should stream audio out.
Again, device's BiB setting is turned on (in CUCM admin-panel).
If you have any suggestion(s) as to how to tackle this - understanding what makes the addMediaStream call fail, by finding more details on the underlying behavior (i.e. what's happening "under the hood"), I'd appreciate it very much.
12-05-2024 06:04 AM
addMediaStream should be called after call is answered. Which media server/library you are using to stream audio?
Regards
Umesh
12-19-2024 05:35 PM
In case you're still working on this, I created a sample app to demonstrate Agent Greeting, in this fork of the DevNet jtapi-samples repo: https://github.com/davidstaudt/jtapi-samples
At one point I did run into the same problem you describe, where addMedia() fails with InvalidStateException - I believe this was because my CTI port was not accepting/answering the incoming IVR call in time. Troubleshooting, I noticed that there was a 4 sec delay between addMedia() and the error, due to the call not being accepted in the new call accept timeout window.
12-23-2024 08:22 AM
Thanks, @DavidStaudt, for the efforts you've put into this. Much appreciated.
Blessings and all the best.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide