[pjsip] Handling connection drops on a mobile client
Johan Lantz
johan.lantz at genaker.net
Wed Feb 25 06:10:52 EST 2009
Hi
I have a general question on how to handle connection drops for a Mobile
pjsip client, in this case Windows Mobile. In particular I would be very
interested in which scenarios I can expect pjsip to resolve a connection
reestablishment and where I have to take action myself.
In particular I am currently looking at what happens with my publish
sessions if the connection is lost. One scenario is that the presence
refresh timer is 300sec. I put the Windows Mobile phone into powersave
by tapping the power button. Since wifi is used at this time the
connection is instantly dropped. I then wait for more then 300 seconds
which leads to the user presence beeing set to unknown in the server.
When the connection is restored pjsip attempts to refresh the Publish
but using the old e-tag value leading to the server sending a 412 in
return. I assume this is because the server does not think the e-tag is
valid anymore since the phone did not republish within 300 sec. As this
happens my publish session is destroyed and I am not sure on the best
approach to recover.
The questions:
1. For this specific case, do you think pjsip is doing this the right
way or should a complete Publish be sent instead?
2. In general I am a unsure on how to handle connection drops and
Publish failures. From my understanding the publish session is destroyed
if a Publish fails. Is it completly up to the application to handle this
scenario and do a complete republish when this occurs or do you have any
guidelines for handling connection drops in general.
3. How does pjsip detect that a connection is again available. Is it on
socket level or something else?
Sorry for beeing a bit vague I will try to get back with even more
detailed scenarios when I understand what is my responsibility and what
is handled by pjsip.
/Johan
More information about the pjsip
mailing list