[asterisk-bugs] [JIRA] (ASTERISK-24673) outgoing sip registers cannot be removed or modified without doing restart (or doing module unload chan_sip.so)

Stefan Engström (JIRA) noreply at issues.asterisk.org
Mon Jan 19 12:18:34 CST 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224532#comment-224532 ] 

Stefan Engström edited comment on ASTERISK-24673 at 1/19/15 12:17 PM:
----------------------------------------------------------------------

It seems in 12.6.0 sip_registry_destroy was called in the sip_reload process:

[2015-01-16 16:29:01] DEBUG[14757]: chan_sip.c:31547 reload_config: --------------- SIP reload started
[2015-01-16 16:29:01] DEBUG[14757]: chan_sip.c:3425 registry_unref: SIP Registry wx3.se: refcount now 1
[2015-01-16 16:29:01] DEBUG[14757]: chan_sip.c:6431 sip_registry_destroy: Destroying registry entry for testreg at 192.168.1.227:8060
[2015-01-16 16:29:01] DEBUG[14757]: chan_sip.c:31561 reload_config: --------------- Done destroying registry list

But in 13.1.0 it's not.

I tried to compile 13.1.0 with ref debug on, and it seems like something is not unreffed properly? feel free to take a look at:

http://pastebin.com/VFJvhGZd



was (Author: stefaneng86):
After looking at the differences between 12.6.0 and 13.0.0 we think that sip_registry_destroy is never called when unrefing during the reload. The following debug comes from 12.6.0:

[2015-01-16 16:29:01] DEBUG[14757]: chan_sip.c:31547 reload_config: --------------- SIP reload started
[2015-01-16 16:29:01] DEBUG[14757]: chan_sip.c:3425 registry_unref: SIP Registry wx3.se: refcount now 1
[2015-01-16 16:29:01] DEBUG[14757]: chan_sip.c:6431 sip_registry_destroy: Destroying registry entry for testreg at 192.168.1.227:8060
[2015-01-16 16:29:01] DEBUG[14757]: chan_sip.c:31561 reload_config: --------------- Done destroying registry list

And 13.0.0 says this:

[Jan 13 10:46:12] DEBUG[10583] chan_sip.c: --------------- SIP reload started
[Jan 13 10:46:12] DEBUG[10583] chan_sip.c: --------------- Done destroying registry list

Maybe this helps to locate the problems? Unfortunately we do not understand neither the old nor the new ref countng, so it is hard for us to solve with out help.


> outgoing sip registers cannot be removed or modified without doing restart (or doing module unload chan_sip.so)
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-24673
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24673
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Registration
>    Affects Versions: 13.0.0, 13.1.0
>         Environment: fedora 20, x86_64
>            Reporter: Stefan Engström
>            Assignee: Stefan Engström
>         Attachments: console-register-problems-real-account.txt, console-register-problems.txt, debug-register-problems, debug-register-problems-real-account, procedure-register-problems.txt
>
>
> Let sip.conf contain a register line such as:
> register => test97:foo at boo.se/266
> asterisk -rx "sip show registry" now outputs a single registry entry:
> Host                                    dnsmgr Username       Refresh State                Reg.Time
> boo.se:5060                             N      test97             105 Registered           Thu, 08 Jan 2015 15:39:03
> Comment out the above register-line (;register => test97:foo at boo.se/266)
> Issue asterisk -rx "sip reload" 
> ==>the registration is still alive! that is, asterisk -rx "sip show registry"  still has an entry.
> When I had asterisk version 12.6.0 installed, commenting out the line and issuing that 'sip reload' would destroy the sip registration as expected. ( asterisk -rx "sip show registry" would output 0 SIP registrations). However, it doesn't for version 13.0.0 or for version 13.1.0... 
> Modifying an existing line 'register=>...' line in sip.conf (and not removing it) produces similar bad behaviour as well as this creates multiple active registrations (old+new). 
> Having to restart the asterisk process (or unload+reload chan_sip.so) every time I want to change the callbackextension(266 above) for a sip-registry is not very fun.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list