Author Message
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Hi,


I am trying to implement call transfer function available in Avaya One-X using Breeze API.

I don't see any API for call transfer in Javadoc.

How do i implement Call transfer functionality using available API.
Only approach to implement same will suffice.



Waiting for earlier response.

Thank You,
Swapnil.
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Any updates?
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Hi Swapnil, can you please provide more details on your use case? What is the user experience? If you're trying to control an Avaya device or client to perform the transfer, the Engagement Call Control API is likely your best bet.

Joel
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Hi,

I want to achieve flow like below

1) Receive a call on Called Party Snap-In eg (2304 )
2) Immediately transfer the call to other extension or SFB e.g (2309)
3) If call is not received by transferred agent, Then reroute the call to actually called agent i.e (2304)

inflow
PSTN -> 2304 -> 2309

if 2309 doesn't pick up the call for certain timeout period, then

PSTN -> 2304

Can above flow is possible without ECC (I want to implement as much as possible using Breeze API)?



Thanks,

Swapnil
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
I see. Here's how this would be done.

1) During the invocation to callIntercepted, do the following:

1a) Call.getCallPolicies(), then set the call termination policy to "NO_PARTICIPANT_REMAINS".
This will keep the call alive even if it goes down to a one-party call

1b) addParticipant() with 2304

1c) Set an EJB timer for your desired timeout

2) If your EJB timer expires before answer:
2a) dropParticipant() with 2304
2b) addParticipant() with 2309
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Hi Joel,


I have followed exactly the same sequence you suggested.
However, following are my observation and requirement of my POC.

1) suppose call received from PSTN(XXXXXXXX) -> 2304 (called party Snap-In is attached to 2304)

2) Now 2304 have option to either Blind Transfer the call to 2309 OR receive the call and then transfer the call to 2309
PSTN -> 2304 ->(transfer) 2309 (after transfering of the call 2304 should be dropped)

3) If 2309 did not pick up the call in 20 sec, then call again should be redirected to 2304 i.e PSTN -> 2304
Now this two people should be able to talk to each other.





The sequence i followed as per your suggestion i can see following behavior :

1) Call received on both number 2304 & 2309 at the same time. (Call was on alerting state for both 2304,2309)
2304 should only be alerted if 2309 don't picks up within timeout period (in case of blind transfer)
2) I tried to use dropParticipant on 2304 in callIntercepted callback but got error "participant can not be dropped in this state"


Please help on the above given requirement.



Thanks,
Swapnil.
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
I'm a bit confused. You shouldn't be trying to addParticipant of 2309 or dropParticipant of 2304 during the callIntercepted invocation. Instead you should implement an EJB timer and the dropping of 2304 / adding of 2309 should be done within the implementation of that timer. Your callIntercepted implementation should do no more than than set the call termination policy, start the timer and addParticipant of 2304.

I didn't mention that you'd also want an implementation of callAnswered that would cancel your EJB timer. You can store an identifier for the particular timer as an attribute on the Call object.
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Hi Joel,


I understand it now.

The agent should be called-back after threshold time has expired and call has not been picked up by agent can be implemented using EJBTimer.

But still i have one doubt,

1) How do I implement blind transfer functionality. (if 2304 don't want to receive call and helpdesk should take care of particular call. So he will just blindly transfer call to one of the helpdesk number)

2) How do I transfer a call if it is received by 2304. (Now 2304 has received the call and for further query resolution he needs to transfer particular call to particular helpdesk number)


Looking for your earlier response.


Thanks,
Swapnil
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Hi Joel,


Basically , i want to know
1) Call Transfer
2) Hold call
3) Release call

etc. feature are available on ECC Snap-In.
However, I want to implement these feature using only Avaya Breeze.
Is there any work-around to achieve this ?


Thanks,
Swapnil.
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Both of your transfer scenarios can be accomplished using dropParticipant / addParticipant. As long as you have set the call termination policy to "No Participant Remains", you can invoke dropParticipant to drop 2304 from the call at any time (even alerting) and add another participant (2309) in their place.

The only way to approximate a hold using the Breeze API is to play an announcement to the "held" participant. This announcement could be silence.
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Hi Joel,


following sequence i am following
1) Set call termination policy in callIntercepted callback
2) Call Answered callback of(2304) take DTMF inputs from user
a) drop participant (2304)
b) add participant (DTMF digits recorded)
c) start EJB timer


However, i am getting "cannot invoke addParticipant in current state" error.
any idea?

Thanks,
Swapnil.

JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
You'll need to wait for the confirmation of participant 2304 having been dropped before adding the new participant. Here's what that might look like:
- MediaListener.digitsCollected(String digits...)
- call.dropParticipant(2304Participant);
- call.setAttribute("collectedDigits", digits);
- call.setAttribute("newParticipant", newParticipantAddress); // You may not need this
- CallListener.participantDropped(Call call...)
- String newParticipantAddress = call.getAttribute("newParticipant");
- String collectedDigits = call.getAttribute("collectedDigits");
- Participant newParticipant = ParticipantFactory.(newParticipantAddress);
- call.addParticipant(newParticipant);
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Thanks joel,

I will try this out.
Good to know this thing..
I have one more question.
If i do drop participant in callintercepted, do i still have to capture dropped event and add participant there in case of blind transfer?




Thanks,
Swapnil.
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
No. If you use call.divertTo() in callIntercepted, the call will never be offered to the original target. You won't have to do a dropParticipant() or addParticipant().

Even if you initially do a call.allow() in callIntercepted (or take no action which causes an implicit allow), you can do an addParticipant() without first dropping the initial target as long as the call is in the alerting state. You'll need to be careful though... there could be a race condition there.
Swapnil_Bhosale
Joined: May 18, 2015
Messages: 88
Offline
Hi Joel,

These solutions worked.
Thanks you so much.

Regards,
Swapnil.
Go to:   
Mobile view