Author Message
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
When EDP calls a cell phone number and nobody answers the phone, after about 1 minute, it will become a "Missed Call" on the phone screen. As soon as that happens, it invokes callOriginated() method, which is confusing cause the user doesn't actually pick up the call. After it goes to callOriginated(), I will be playing an annoucement. Then after another 1 minute (maybe less), it will invoke the callTerminated() with the CallTerminationCause == "AFTER_ANSWER". Is this a timeout for announcement inside EDP ? Same thing happens when I select "Decline" as the cell phone rings.

I guess maybe it's because the call (either missed call or declined call) has been transferred to a voice mail box, so EDP regards it as the user picks it up and invokes callOriginated() method. So how can we detect if the call is transferred to a voice mail box and how can we determine if the user misses the call or the user declines it ?

I think it makes more sense if it goes to callTerminated() with a cause of "User missed the call" or there is another method in callListener for missed call (maybe callMissed()?).


**************************
Other confusing scenairos :

1. For the avaya network number (15132288150), I logged on Avaya Communicator and made a call. After about 3 minutes, it became a "Missed Call" on Avaya Communicator's call history. But nothing is invoked in callListener. I cannot catch this event actually.

2. If the number is wrong or the number is not logged in Avaya Communicator, how can EDP know this and invoke some function so I can send information back to the server ?
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Which signature of CallFactory.create() are you using? It sounds like you're perhaps using the 3 parameter signature, which is meant to be used to create a call between 2 people. Is that your use case or are you trying to call out to the cell phone to play an announcement? If it's the latter, I think that you should use the 2 parameter signature in which case you won't see this behavior.

Regarding your confusing scenario #1, what phone are you calling from? As I understand collaboratory, calls to 15132288150 will be converted into a call to a 4 digit extension number. If you want your snap-in to be invoked on calls to 15132288150, you will have to ensure that your snap-in is a called party service in a service profile that has been assigned to the user associated with that 4 digit number. Do you think you've done all of this?

I'm not quite sure I understand confusing scenario #2. Is this an inbound or outbound call? Who is calling whom?
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
Yes. We are using the 3 parameter signature. Basically we are trying to create a call between a user and a conference bridge.

So the first party will be a user (either a cell phone number or an Avaya number).

The second party will be the conference bridge (we have 15132288888 in our lab environment as a conference bridge).

In this situation,

1. if the first party is a cell phone number and doesn't pick up the call or declines the call, after one minute, it will go to callOriginated().

2. if the first party is a Avaya number like 15132288150 and doesn't pick up the call or ignores the call, after about 3 minutes, it will show "Missed call" on communicator but nothing is invoked in callListener.

3. If the number is wrong or the number is not logged in Avaya Communicator, also nothing is invoked in callListener.

JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
OK, I'm with you now. In these cases, is the cellphone voicemail answering? If so, the reason that the call state changes to Originated is that we don't currently have answering machine detection as part of our API. However, there is a way that you can ensure that you're talking to a real person. In the originated() callback, you can invoke call.suspend(). You can then play an announcement to the user and ask them to press 1 (or some other digit string) to be connected to the conference. If you get the digit, you then invoke call.allow() and the call will be launched to the bridge. If you instead get a timeout, you can drop the call. Do you think this will work for you?

There may be a way that you can determine from the underlying SIP signaling if a call to an Avaya station covers to voicemail. That will not be an option for a PSTN phone though. Would you like for me to look into the SIP signaling case?

Regarding the missing events for failed calls, let me look into that. I'd definitely expect callTerminated to be invoked in this case.
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
Yes. I think the cellphone voicemail answers when the user decline or miss an incoming call. In our case we want to determine if the user miss it or decline it.

Scenario 1. We don't want to handle this in callOriginated() since we will suspend the call there and play an announcement for the user to choose join the meeting or not. If the missed or declined call also goes to callOrginated() then we will not be able to separate them unless the api can detect that it's the voicemail box that answers the call.

Scenario 2. I tried to call from 15132288150 to 15132288151 and let the call ring. After about 3 minutes, the normal waiting tone became a phone busy tone and the call disconnected afterwards. It was not placed into a voicemail in this case. And nothing is invoked in callListener, how can I catch this ?

Since we have a web interface that instantly update the call status. So we want to determine from different statuses of a call. The user might decline or misses a call, or he might pick up the call and then drop it without pressing any button (we will place an announcement as soon as the user picks up the call, and ask user to press 1 to join or press 2 to decline).
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
I'm going to try your scenario 2 today and see what happens in my lab. For scenario 1, the point of doing the DTMF collection is to determine whether you're talking to a real person. You could set DTMF options to return if 1 digit is collected or if there is a timeout of x seconds. If you get a timeout, you got voicemail. If you got a digit, you were connected to a real person.

Does that make sense?
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
I'm not sure if I'm with you.

If you try to call your cell phone number, you can either ignore it or press decline button. In both case, the call will be covered to a voice mail. Then on the EDP side, it will go to callOriginated where my program will play an announcement and ask the user to press a number. Since the called party (cell phone) ether missed it or declined it. There will be no user action done. After 1 minute, EDP will timeout it and it goes to callTerminated (APPLICATION_DROPPED). There is no way for us to tell whether the user missed the call or declined it.


JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Let me see if I can make it clear with some psuedocode (skipping some variable declarations, etc). As you can see, if digits are collected, we assume that it's a human and it's OK to proceed with the call. If no digits are collected (there was a timeout), we assume that it was voicemail that answered and we drop the call.

Call myCall = CallFactory.create(mobile#, conferenceBridge#, myIdentity);
myCall.initiate();

CallListener MyCallListener
{
void callOriginated(call)
{
MediaListener myMediaListener = new MyMediaListener(call);
call.suspend();
DigitOptions myDigitOptions = MediaFactory.createDigitOptions();
myDigitOptions.setNumberOfDigits(1);
myDigitOptions.setTimeout(10000);
myMediaService.promptAndCollect(call.getCallingParty(), myPlayItem, myMediaListener);
}
}

MediaListener MyMediaListener
{
Call call;

MyMediaListener(call)
{
this.call = call;
}

void digitsCollected(UUID requestId, String digits, DigitCollectorOperationCause cause)
{
if (cause == DigitCollectorOperationCause.TIMEOUT)
{
// No user input. Must be voicemail. Drop the call.
call.drop();
}
else if (cause == DigitCollectorOperationCause.NUMBER_OF_DIGITS)
{
// User opted to join the conference call. Allow the call to proceed.
call.allow();
}
}
}
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
Yes. I understand this part and this is right now exactly how I handle this case.

But there is still no way to tell if the user misses it or he declines the call such that the call goes to the voice mail box.
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Yes, that's right. We don't get any clues back from the service provider to help us understand this. Unfortunately I don't think there's anything we can do to help you with that particular issue.
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
OK. Cool. Just want to know if this is something we have no control so I can go with the current solution.

Thank you very much. And could you please also take a look at my other post about the Timer.

I have tried your example of EJB Timer and it works. But there is still some issue.

Please take a look here: http://www.devconnectprogram.com/forums/posts/list/18237.page

Thanks !
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Hi, I just tried out your use case of not answering on Communicator. I saw the same as you that after 3 minutes the call drops. I did, however, see callTerminated being invoked in this case. Please double check that callTerminated is not being invoked.
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
Yes I have double checked again today.

Screenshot 1 is my Avaya Communicator History where you can see there is a missed call at 10:51 AM EST (Became missed call at 10:54 AM EST).

Screenshot 2 is my CE LOG, which shows the call was made at 08:51 AM CT (10:51 AM EST) but there is nothing logged after that (No callTerminated logs).

Screenshot 3 is my code of Call Listener, where I have some code to write into log if something goes to callTerminated.
  • [Thumb - Screenshot 1.jpg]
[Disk] Download
  • [Thumb - Screenshot 3.jpg]
[Disk] Download
  • [Thumb - Screenshot 2.jpg]
[Disk] Download
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
That looks like a pretty compelling argument. The best I can tell you to do now is to open a DevConnect ticket. If this turns out to be a bug in the EDP platform, you will not be charged.
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
For the last scenario:

3. If the number is wrong or the number (15132288150) is not logged in Avaya Communicator, also nothing is invoked in callListener.

I have just tested this scenario. If the number 15132288150 is not logged in Avaya Communicator, nothing will be invoked in callListener.

I expect it to be invoked in callTerminated but then I realized that since the call may not even be established we are not able to intercept it in callListener. Is there anyway to handle this situation ?
Go to:   
Mobile view