What to do when one user agent leaves suddenly?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

What to do when one user agent leaves suddenly?

Chen-Che Huang
Hi all,

I have one issue that may not be related to OpenSIPS. Suppose two user agents are having a video call with each other (RTP proxy is serving as packet relay). One of the two user agents suddenly leaves without sending a BYE request owing to some factors (such as network disconnection). In such a case, should a SIP server terminate the dialog by sending a BYE request if the other user agent does not hang up the video call on his/her own? Or a SIP server does not need to do anything and just waits for the other user agent to end the call on his/her own?

My two questions about this issue are
1) Any SIP-related RFC mentions anything about this issue?
2) If the SIP server has to terminate the dialog, what mechanism is appropriate? I know that create_dialog("Pp")/create_dialog("B") may be helpful for this issue, but I am looking for a better solution.

Any suggestion or comment is very welcome. Many thanks.

Best wishes,
Chen-Che
Reply | Threaded
Open this post in threaded view
|

Re: What to do when one user agent leaves suddenly?

Max Mühlbronner
Hi,

"SIP session-timers" ( http://tools.ietf.org/html/rfc4028), which are
implemented via "sst" module in opensips.

Another commonly used method is to enable rtp timeout on the media
gateways, which does not depend on signaling but basically detects if
one leg does not send RTP anymore and will disconnect the call.


Best Regards

Max M.

On 04/09/2013 04:26 AM, microx wrote:

> Hi all,
>
> I have one issue that may not be related to OpenSIPS. Suppose two user
> agents are having a video call with each other (RTP proxy is serving as
> packet relay). One of the two user agents suddenly leaves without sending a
> BYE request owing to some factors (such as network disconnection). In such a
> case, should a SIP server terminate the dialog by sending a BYE request if
> the other user agent does not hang up the video call on his/her own? Or a
> SIP server does not need to do anything and just waits for the other user
> agent to end the call on his/her own?
>
> My two questions about this issue are
> 1) Any SIP-related RFC mentions anything about this issue?
> 2) If the SIP server has to terminate the dialog, what mechanism is
> appropriate? I know that create_dialog("Pp")/create_dialog("B") may be
> helpful for this issue, but I am looking for a better solution.
>
> Any suggestion or comment is very welcome. Many thanks.
>
> Best wishes,
> Chen-Che
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/What-to-do-when-one-user-agent-leaves-suddenly-tp7585727.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: What to do when one user agent leaves suddenly?

Bogdan-Andrei Iancu-2
In reply to this post by Chen-Che Huang
Hi Chen-Che,

The detection of such a ghost call be done by the remaining UAC (in the
call) - it will have a media timeout event (not receiving any media from
the other party), so it should send a BYE.

Now, relying on the UAC to detect and hang up may not be satisfactory -
some do the work, some don't.

You can also do the detection on the proxy:
     1) based on signaling, if you do in-dialog pinging (OPTIONS) - this
is a light way of doing it, but not all UAC properly answer to in-dialig
pings - here you can use the "pP" flags from dialog creation.
     2) based on a timeout from media relay - rtpproxy can detect when
there is no more media for an ongoing call and it generates a timeout
event back to opensips -> opensips, via dialog module, will send BYE in
both directions, terminating the call at signaling level.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 04/09/2013 05:26 AM, microx wrote:

> Hi all,
>
> I have one issue that may not be related to OpenSIPS. Suppose two user
> agents are having a video call with each other (RTP proxy is serving as
> packet relay). One of the two user agents suddenly leaves without sending a
> BYE request owing to some factors (such as network disconnection). In such a
> case, should a SIP server terminate the dialog by sending a BYE request if
> the other user agent does not hang up the video call on his/her own? Or a
> SIP server does not need to do anything and just waits for the other user
> agent to end the call on his/her own?
>
> My two questions about this issue are
> 1) Any SIP-related RFC mentions anything about this issue?
> 2) If the SIP server has to terminate the dialog, what mechanism is
> appropriate? I know that create_dialog("Pp")/create_dialog("B") may be
> helpful for this issue, but I am looking for a better solution.
>
> Any suggestion or comment is very welcome. Many thanks.
>
> Best wishes,
> Chen-Che
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/What-to-do-when-one-user-agent-leaves-suddenly-tp7585727.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: What to do when one user agent leaves suddenly?

Chen-Che Huang
Hi Max and Bogdan-Andrei,

Very grateful for your comments. However, at a first glance, I find that RFC 4208 says in Section 8.3:
"When the current time equals or passes the session expiration for a session, the proxy MAY remove associated call state, and MAY free any resources associated with the call.  Unlike the UA, it MUST NOT send a BYE."

If I don't misunderstand it, RFC 4208 requires a proxy server not to send a BYE to the other user agent in my issue. RFC 4208 seems to suggest that the two UAs are responsible for whether their session has timeout. So I guess I don't have to implement any mechanism to terminate that kind of dialog in my issue. Any comment is appreciated.

Best wishes,
Chen-Che
Reply | Threaded
Open this post in threaded view
|

Re: What to do when one user agent leaves suddenly?

Bogdan-Andrei Iancu-2
Hi Chen-Che,

I know what the RFC says, but unfortunately the real life (out there is
the SIP wild) is totally different - Consider you have a user calling to
PSTN (a call you will have to pay to carrier); if you detect the user
dropped, would you simply stop your billing without being 100% that the
PSTN side also stopped ? if you do not BYE the PSTN, would you take the
risk of having a ghost call in the PSTN that you will get charged for ??

My 2 cents on the matter....

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 04/10/2013 04:16 AM, microx wrote:

> Hi Max and Bogdan-Andrei,
>
> Very grateful for your comments. However, at a first glance, I find that RFC
> 4208 says in Section 8.3:
> "When the current time equals or passes the session expiration for a
> session, the proxy MAY remove associated call state, and MAY free any
> resources associated with the call.  Unlike the UA, it *MUST NOT* send a
> BYE."
>
> If I don't misunderstand it, RFC 4208 requires a proxy server not to send a
> BYE to the other user agent in my issue. RFC 4208 seems to suggest that the
> two UAs are responsible for whether their session has timeout. So I guess I
> don't have to implement any mechanism to terminate that kind of dialog in my
> issue. Any comment is appreciated.
>
> Best wishes,
> Chen-Che
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/What-to-do-when-one-user-agent-leaves-suddenly-tp7585727p7585758.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: What to do when one user agent leaves suddenly?

Chen-Che Huang
Hi Bogdan-Andrei,

I see. I totally agree with you. Thanks for sharing such a valuable, real-life comment:)

Best regards,
Chen-Che