[asterisk-bugs] [JIRA] (ASTERISK-25381) res_pjsip: AoRs deleted via ARI (or other mechanism) do not destroy their related contacts
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Mon Sep 7 11:37:33 CDT 2015
Matt Jordan created ASTERISK-25381:
--------------------------------------
Summary: res_pjsip: AoRs deleted via ARI (or other mechanism) do not destroy their related contacts
Key: ASTERISK-25381
URL: https://issues.asterisk.org/jira/browse/ASTERISK-25381
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Resources/res_pjsip
Reporter: Matt Jordan
Severity: Minor
Say we have created an AoR, and then had a REGISTER request arrive that mapped to that AoR's endpoint. This will create a non-persistent contact object in Sorcery, which by default is stored in the AstDB. If the AoR is subsequently destroyed via ARI (using {{DELETE /asterisk/config/dynamic}}), the non-persistent contact is not removed. Persistent contacts, on the other hand, are removed as a result of being stored in the AoR's {{persistent_contacts}} container.
At first, this is relatively harmless, other than continuing qualify spam occurring for the now defunct contact. However, if we re-create the same AoR, the contact in the AstDB is treated as if it were a persistent contact (as it looks like one when the object set apply handler is called). This creates a weird situation where two things will occur:
(a) Asterisk will fail to raise all of the necessary state changed events, as it will believe that the contact already existed.
(b) The AoR will end up with two contacts, even if {{max_contacts=1}}: the original dynamic contact, and the fake pseudo-persistent contact it accidentally created from the dynamic contact.
The proper thing to do is to destroy all contacts when an AoR is deleted via sorcery.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list