res_pjsip_outbound_registration.c: Re-REGISTER on transport shutdown.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 2 Aug 2017 23:44:12 +0000 (18:44 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 10 Aug 2017 17:18:58 +0000 (12:18 -0500)
commit1bec781ccec7df8e8a847e5bb5e46530d642f82d
tree1da830c35f0bea3f0838c55c7dd2f974100195d9
parent82f4ade959ef3ab7abb5deb4bc06882850dcde90
res_pjsip_outbound_registration.c: Re-REGISTER on transport shutdown.

The fix for the issue is broken up into three parts.

This is part three which handles the client side of REGISTER requests.
The registered contact may no longer be valid on the server when the
transport used is reliable and the connection is broken.

* Re-REGISTER our contact if the reliable transport is broken after
registration completes.  We attempt to re-REGISTER immediately to minimize
the time we are unreachable.  Time may have already passed between the
connection being broken and the loss being detected.

* Reorder sip_outbound_registration_state_alloc() so the STATSD_GUAGE's
are still correct if an allocation failure happens.

ASTERISK-27147

Change-Id: I3668405b1ee75dfefb07c0d637826176f741ce83
res/res_pjsip_outbound_registration.c