RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
245 stars 215 forks source link

Exception on BYE when doing outbound call from Jitsi to Nexmo when user is on VoiceMail #505

Open deruelle opened 9 years ago

deruelle commented 9 years ago

Call Flow: Jitsi calls RestComm on 7777 RestComm Dials out to Nexmo a phone number Phone Number is not online and go to Operator VoiceMail Jitsi leave message to Operator VoiceMail Jitsi hangs up Nexmo sends 404 for the BYE RestComm throws Exception https://gist.github.com/deruelle/a2c62fd6457239d90697

deruelle commented 9 years ago

Same thing on INVITE if the call to a number is Forbidden, there is an exception and RestComm keeps Ringing https://gist.github.com/deruelle/fa662d63413b066dac49

deruelle commented 9 years ago

This happens even for call that connects correctly https://gist.github.com/deruelle/f0e9527055e219371ddd

ghjansen commented 9 years ago

The following diagram represents the call flow through the FiniteStateMachine transitions while dialing to a forbidden Nexmo Number: calltransitions-5

ghjansen commented 9 years ago

Guys, in recent efforts to solve the error that happens due to an INVITE if the call to a number is Forbidden, i've created two new states to try to handle the situation properly, as shown in the image above. calltransitionsforbidden This way, when Call.onSipServletResponse process a SipServletResponse.SC_FORBIDDEN, a transition is executed to 'failingForbidden' state and then Call.onCancel goes ahead with the 'cancelling' state. The call flow seems to end properly, but there is a new exception that i think is related to the new states and also with the cancelling state:

https://gist.github.com/ghjansen/ee04c1efce1eef2fef60

deruelle commented 9 years ago

If you receive a forbidden, you don't need to CANCEL the call, the container should already have sent an ACK to the Forbidden response. so you just need to clean the call at RestComm side

deruelle commented 9 years ago

@ghjansen don't forget the same issue is happening for BYE as well, see my first comment on this isssue "Nexmo sends 404 for the BYE"

ghjansen commented 9 years ago

Thanks @deruelle , i'll not forget about that. I pushed some modifications asking for @gvagenas review on my work, so we can easily spot and fix something that maybe is still not right with INVITE. Either way, i'm already working on BYE as well. Thanks!

deruelle commented 9 years ago

full log of the BYE issue https://gist.github.com/deruelle/407fbabdda1cfea37e22

gvagenas commented 9 years ago

More comments from Jean for the first call flow in this issue: registered client in Olympus calls a registered DID in RestComm XYZ in this case which dials out to nexmo for calling my cell phone, I accepted the call I could hear audio then hang up.

when I hangup from my cell Olympus doesn't get disconnected so when I disconnect Olympus I get that exeception.

Full Log: https://gist.github.com/deruelle/407fbabdda1cfea37e22#file-gistfile1-txt

I think it contains multiple calls this one but the last one shows the exception actually the fact that the BYE is not reaching Olympus is another issue that you can check

deruelle commented 9 years ago

Can this issue be closed ? Where do we stand on this ?

gvagenas commented 9 years ago

@deruelle The patch and the testsuite for the call flows in this issues are ready and pushed to master. Please do some live test calls to make sure the patch covers all call flows.

deruelle commented 9 years ago

I'm still getting an issue with 404 to BYE See gist at https://gist.github.com/deruelle/57ef59c10f181c79c58c

deruelle commented 9 years ago

One with more information https://gist.github.com/deruelle/301430f807d09dabfc9d

deruelle commented 9 years ago

And calls still show in progress see screenshot below

screenshot from 2015-12-02 11 50 00