Author Message
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
My requirement is to make a 2-party call from party A to party B and intercept it with an announcement (media).

The work flow is like this:
1. Create a call from A to B ->
2. When A answers, intercept the call and play an announcement ->
3. After announcement completed, use the media listener to collect digits ->
4. If user input 1 then end the interception and call B, otherwise drop the call.

How can I accomplish this ? Where should I intercept the call and how can I continue the call after I collects the digits ?

Thanks !
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
There are 2 different ways to do what you're asking:

1) In the CallListener.originated() callback, do the play and collect operation. You may also have to invoke suspend() here.
- Set an EJB timer for a timeout
- Wait for your media listener to be invoked or the timer to expire
- If 1 was pressed, invoke "call.allow()"
- If the timer expired, invoke "call.drop()"

2) Configure your snap-in as a calling party application for A.
- Your app may then be invoked on both the A leg and the B leg
- If on the B leg, perform the above steps from the callIntercepted callback


My recommendation would be the first mechanism. Let us know how it goes!
Go to:   
Mobile view