[asterisk-bugs] [JIRA] (ASTERISK-19531) Realtime SIP peers that explicitly unregister have incorrect device state.

Joshua Colp (JIRA) noreply at issues.asterisk.org
Tue Dec 19 06:07:08 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-19531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp updated ASTERISK-19531:
-----------------------------------

    Affects Version/s: 13.18.4

> Realtime SIP peers that explicitly unregister have incorrect device state.
> --------------------------------------------------------------------------
>
>                 Key: ASTERISK-19531
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-19531
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Registration
>    Affects Versions: 1.8.10.0, 13.18.4
>         Environment: Asterisk 1.8.10.0, Cent OS 6.2 x64
>            Reporter: Andrew Ofisher
>         Attachments: asterisk-log-output-19531.txt
>
>
> I have realtime setup using OpenLDAP for sipusers. The user I was testing with is setup with host=dynamic, nat=yes, qualify=yes. In my sip.config I have rtcachefriends=yes, rtsavesysname=yes, rtupdate=yes, rtautoclear=yes, ignoreregexpire=no. This user is also in a queue. When the softphone registers and then explicitly unregisters, the queue will still show the user as "Not in use". Enabling debug output confirms that the device state is remaining "Not in use" instead of Unavailable. This does not happen if the softphone's registration expires. 
> It looks like ASTERISK-14953 is what broke this. Previously, the peer's fullcontact field was wiped out on unregister which subsequently caused the field to be wiped out in realtime. What happens now is that destroy_association, called from expire_register, will properly clear out the field in realtime but not the peer object. When parse_register_contact returns, register_verify will call update_peer (chan_sip.c:14836) which will cause fullcontact and other fields to be written back into realtime. When the queue checks the device state of the user and the user is loaded from realtime, sip_devicestate will return AST_DEVICE_NOT_INUSE instead of AST_DEVICE_UNAVAILABLE because p->addr won't be null.
> I'll attach a full debug output showing the phone registering and unregistering and the devicestate still being Not in use.



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



More information about the asterisk-bugs mailing list