mikailoral / android-rcs-ims-stack

Automatically exported from code.google.com/p/android-rcs-ims-stack
0 stars 0 forks source link

Re-Invite is not sent for file transfer and cause file transfer terminated if session refresh is required #245

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enable a value for the Session refresh expire period in provisioning to 
enable session refresh re-invite
2. Send a large file
3. When session timer expires, it should send an Re-Invite to refresh the SIP 
session

What is the expected output? What do you see instead?
The expected result is Re-Invite will be sent when session timer expires.
The actual result is Re-Invite is not sent.

What version of the product are you using? On what operating system?
2.5.11 on Android 4.1.3

Please provide any additional information below.

It was related to the Issue 220.
The problem is in ImsServiceSession.handle200OK(), startMediaSession() is 
called before the SessionTimerManager is started.

startMediaSession() returns only after the first message is sent.

It is not a problem for chat session because the first message is short.
However, in a file transfer session, the entire file is in one message so the 
startMediaSession() will return only after the entire file is sent.
When the file is very large which will take a long time, it should trigger the 
session refresh timer to send a Re-Invite, however because the timer is started 
only after the first message, Re-Invite will never be sent.

On a side note, SessionTimerManager.sessionRefreshForUAS() is not doing 
anything when triggered if the client has the UAS role. I'm not sure if it's 
intended or some implementation is missing.

Original issue reported on code.google.com by mcd...@mcdull.us on 12 Mar 2014 at 10:02