Author Message
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
I need to send back message if a call is missed. How can I catch this ?

I tried to log it and it was not in the callTerminated() method in callListener.

Thanks !

**************Update**************

I have tried both my cell phone number and my avaya network number.

1. For the cell phone number, after about 1 minute, it will become a "Missed Call" on the phone screen, and as soon as that happens, it invokes callOriginated() method, which is confusing cause the user doesn't actually pick up the call. Does it make more sense if it goes to callTerminated() with a cause of "User missed 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". Same thing happens when I select "Decline" as the cell phone rings.

2. 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.

3. One more scenario is that 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.

How can I solve these ?

JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
When you say "missed", do you mean "covered to voicemail"? If so, your snap-in could use the "IncomingSipMessageListener" to look at the History-Info header on the 200 OK when the call is answered. If the call covered to voicemail, there should be a History-Info entry that indicates that.

Let me know how that goes for you. FYI, the IncomingSipMessageListener was introduced in our 3.0.3 SDK, so if you have an earlier version of the SDK you won't see it.
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
"Missed call" means nobody picks the call when it's ringing and when it stops ringing I should be able to catch that status and send message back saying that the user did not answer the call.

Since I used CE to generate the call I could not determine if it was covered to the voice mail. I just used CE to call myself and as my phone rang I did not pick it up until it ended.
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
I'm still not sure I'm entirely with you. Did the phone stop ringing because it went to your voicemail? If so, when voicemail answered, you should get a callAnswered callback. Even though the call stopped ringing on your device, it was still answered. If you are watching for 200 OK messages within an IncomingSipMessageListener, then you should be able to determine through History-Info if it was answered by voicemail. Alternatively, if you are using DTMF to detect a real person, then lack of a DTMF entry should also indicate that the call was answered by voicemail, right?
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
I'm using the CE to generate the call so I can't actually know if it goes to the voice mail.

What I can see is I logged a number in Avaya Communicator and then used CE to call this number. The phone started ringing like screenshot 1. Then I did not pick it up. After ringing for like 2 or 3 minutes, it stopped and Avaya Communicator marked this call as "missed" like screenshot 2.

None of the methods in callListener is invoked, so I'm wondering how can I catch it. I don't think it goes to the voice mail.
  • [Thumb - 12.jpg]
[Disk] Download
  • [Thumb - 11.jpg]
[Disk] Download
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
I'd suggest doing a "traceCE" from the EDP command line to see what SIP messages are being exchanged in this case. If the phone stops alerting, some sort of final response should be sent to EDP and that should result in one of your callbacks being invoked. I agree that it's probably not covering to voicemail if it takes several minutes to go away. I'd expect some sort of 4xx response to be sent if the call just terminates.

In order to be safe, it would probably make sense for your code to start an EJB timer that could act as a sanity timer. If the call is not answered / terminated after some amount of time passes (a minute or two?) then you could clear it.
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
Thanks for the advice ! I will probably try the timer. :)
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
I just ran a test along these lines and I found that after 3 minutes I got a callTerminated callback indicating that the call had dropped. Are you certain that you didn't see such a notification? This would make it so you didn't have to set a timer.
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
Yes. I tested it again and the logger I put in the callTermiated method was not invoked when it dropped after 3 minutes.
  • [Thumb - 13.jpg]
[Disk] Download
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Very strange. Well, sorry to sound like a broken record but you could open a DevConnect ticket if you wanted to investigate this further. Again, if it turns out to be a bug in the platform, you would not be charged for any time. If you'd like to instead use an EJB timer, that's understandable. Please do make sure that you use an EJB timer so you're using a container thread rather than just using a Java Timer class. The Java Timer class would create its own thread which is undesirable.
liu159
Joined: Jan 19, 2015
Messages: 96
Offline
Hi Joel,

I have updated the question since I have done more tests on this problem.

Could you please take a look at it ? Thank you very much !
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Sorry, but I'm not sure what you've changed. Based on everything I see here, I still unfortunately don't have any recommendations for you other than to open a DevConnect ticket.
Go to:   
Mobile view