[asterisk-bugs] [JIRA] (ASTERISK-25476) chan_sip loses registrations after a while

Steve Davies (JIRA) noreply at issues.asterisk.org
Wed Nov 11 03:41:33 CST 2015


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

Steve Davies commented on ASTERISK-25476:
-----------------------------------------

Adding my 2p since I am surprised that we've not seen 11.20.1 and 13.6.1 releases yet!

In my assumed scenario:

- chan_sip is up and running, and several registrations are current.
- one of these registrations has a peer->expire sched_id value of 0
- SIP RELOAD is called, resulting in a call to set_peer_defaults(peer)

set_peer_defaults(peer) contains the following code:

        if (peer->expire == 0) {
                /* Don't reset expire or port time during reload
                   if we have an active registration
                */
                peer->expire = -1;
                peer->pokeexpire = -1;
                peer->keepalivesend = -1;
                set_socket_transport(&peer->socket, SIP_TRANSPORT_UDP);
        }

At which point we leak a scheduled expire_register call. The knock on effect of this is an hourly line de-registration that is only resolved by stopping the phone for an hour to let the leaked event trickle out. We may also leak 'pokeexpire' and 'keepalivesend' - Should they not be cleared using AST_SCHED_DEL_UNREF?

NOTE: There are 2 more peer->expire > 0 comparisons in chan_sip but they only affect a CLI command so I'll let them get mopped up as I've already seen them mentioned.



> chan_sip loses registrations after a while
> ------------------------------------------
>
>                 Key: ASTERISK-25476
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25476
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 11.20.0
>         Environment: AstLinux 1.2.4, Linux 3.2.66, x86 32bit
>            Reporter: Michael Keuter
>         Attachments: 11.20.0-SIP-options.txt, asterisk-11-issue-ASTERISK-25476.patch, asterisk-13-issue-ASTERISK-25476.patch, ASTERISK-25476-13.diff
>
>
> In Asterisk 11.20.0 chan_sip looses registrations of some IP-phones (on several different systems) after a while. In Asterisk the phone then shows "unreachable", while the phone's status shows "Registered". Reverting back to Asterisk 11.19.0 solves the problem. The phones are mostly Yealink phones, different models with different firmwares on different systems, none of the phones firmware was recently upgraded. Dis-/enbling the phone's SIP account or rebooting the phone makes it work again for a while, but then  Asterisk shows the phone again as unreachable.
> I attach a SIP trace of a Yealink W52P DECT base with 2 handsets (331/332). "qualify=yes" is enabled, after a while Asterisk stops sending Option packets to ext. 331 while keeps sending packets to 332.



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



More information about the asterisk-bugs mailing list