[Home]

Summary:ASTERISK-27601: chan_sip. unregister
Reporter:Dirk-Michael Brosig (dbrosig)Labels:
Date Opened:2018-01-19 12:11:04.000-0600Date Closed:2018-01-22 10:41:09.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/Registration
Versions:13.18.5 Frequency of
Occurrence
Constant
Related
Issues:
Environment:SLES12SP2 - RaspberryPi + OpenSUSE 42.3Attachments:
Description:Dear Sirs,

in close collaboration with the german 1&1 support was detect the following issue.

The register on a sip server with the register statements in sip.conf like

register => 4938168695xxx:password@sip.1und1.de/4938168695xxx

will not unregister when the asterisk server stop. This is important for the "not available" forwarding from calls.

Sorry for my bad english.

Best regards

Micha
Comments:By: Asterisk Team (asteriskteam) 2018-01-19 12:11:05.226-0600

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].

By: Kevin Harwell (kharwell) 2018-01-19 16:57:58.221-0600

To duplicate:

Setup two Asterisk machines (A and B) with sip logging so you can monitor the traffic. Configure A with chan_sip with an outbound registration to B. Configure B to accept the registration. Start B, start A and make sure A successfully registers to B. "core stop gracefully" A and then note that B receives no unregister message(s).

By: Kevin Harwell (kharwell) 2018-01-19 17:08:42.599-0600

[~dbrosig] while this is an issue I don't think chan_sip has ever unregistered its outbound registrations on shutdown. Also, chan_sip is in extended support[1], so just a heads up support time will reflect that.

If possible you might want to consider moving over to using the Asterisk pjsip channel driver[2]. I believe outbound registrations[3] in that channel driver do send unregister messages on shutdown.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
[2] https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip
[3] https://wiki.asterisk.org/wiki/display/AST/Configuring+Outbound+Registrations

By: Dirk-Michael Brosig (dbrosig) 2018-01-20 04:23:51.419-0600

Kevin, thank you for your reply and help. The first check shows that the unregistration is not successful with chan_sip. If there a table whos shows the differences between sip and pjsip? I must write a new configuration for pjsip and have not found options for tlscafile and tlsprivatekey.

But I think this is a other issue. Please close this one.

Best regrards Dirk

By: Kevin Harwell (kharwell) 2018-01-22 10:37:09.673-0600

I don't know of a table that lists _all_ the differences specifically. However, a good place to get started is on the migrating from chan_sip to res_pjsip wiki page[1]. That page mentions a script you can use to help you convert your conf file if you so desire. With regards to configuring options for TLS information can be found, with examples, on the pjsip transport selection[2] and the secure calling tutorial [3] pages.

Also I should mention that the pjsip channel driver for Asterisk will only send unregisters at shutdown if the system is _not_ shutdown using "core stop now"[4] or some other similar method that abruptly stops Asterisk (kill, killall, etc...)

[1] https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip
[2] https://wiki.asterisk.org/wiki/display/AST/PJSIP+Transport+Selection
[3] https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial
[4] https://wiki.asterisk.org/wiki/display/AST/Stopping+and+Restarting+Asterisk+From+The+CLI