[Home]

Summary:ASTERISK-28373: persistant registrations not working for TCP transport
Reporter:Michael (ringo)Labels:pjsip
Date Opened:2019-04-05 14:48:02Date Closed:2019-04-05 15:09:18
Priority:MinorRegression?
Status:Closed/CompleteComponents:. I did not set the category correctly.
Versions:16.3.0 Frequency of
Occurrence
Related
Issues:
Environment:debian 9 amd64 asterisk v16.3.0 using pjsip mysql ODBC Attachments:
Description:not sure what component/s to select.

With regards to persisant sip registrations, only UDP transport works.  TCP doesn't seem to.  What I observe happening is when I shut down asterisk, and start it back up, all TCP sip registrations are removed from the ps_contacts table but UDP registrations remain.  I've confirmed this in the sql logs.  There are indeed delete commands for the TCP registrations.

So, when asterisk is restarted, UDP endpoints work right away.  TCP endpoints need to wait until they re-register.
Comments:By: Asterisk Team (asteriskteam) 2019-04-05 14:48:03.407-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Joshua C. Colp (jcolp) 2019-04-05 15:09:19.068-0500

This is not a bug.

Generally endpoints require connection reuse, that is they connect to Asterisk and expect that same TCP connection to be reused. This is accomplished using the "rewrite_contact" option. If this is enabled and Asterisk is restarted it prunes the relevant contacts, as the underlying TCP connection has been lost and a new one can not be established back to the endpoint.

By: Michael (ringo) 2019-04-05 15:32:58.341-0500

I am using rewrite_contact for all endpoints for possibility of nat.  That would explain it.  Seemed easier to just have this setting on for all endpoints so if a phone gets moved back and forth between nat and non-nated, everything just works.  For nat endpoints it just works, and didn't seem to cause a problem with non-nated phones.

So, when i do remove "rewrite_contact", it does seem to keep the registration on restart.  I guess I should only use this option for endpoints that actually need it.

Thanks for all your hard work Joshua.  I've seen/read so many of your forum comments.

By: Asterisk Team (asteriskteam) 2019-04-05 15:32:58.685-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Michael (ringo) 2019-04-05 15:34:14.618-0500

oops.  i think i re-opened by commenting.