[ASTPPCOM-401] SIP devices and IP settings are orphaned after deleting provider account Created: 15/Apr/18 Updated: 27/Oct/19 Resolved: 28/May/18 |
|
| Status: | Done |
| Project: | ASTPP Community |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | ||
| Reporter: | powerpbx | Assignee: | Samir Doshi |
| Resolution: | Done | Votes: | 0 |
| Labels: | bug_fixed | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
It appears that deleting an account only makes the settings disappear from the GUI but not the DB. However, it is not just the row in the account table that remains but also associated settings in other tables. This creates problems when trying to add new settings as they will fail validation if they have the same SIP username or IP etc. There are probably other settings that are orphaned as well. Maybe all of them? Maybe this is by design and if so why? |
| Comments |
| Comment by Samir Doshi [ 03/May/18 ] |
|
When you delete an account, we are deleting records from all modules which belong to that account except for accounts and cdrs. For account, we do soft delete which means only flag will be changed and it will disappear from the UI. The purpose to do soft delete of account and to keep CDR is, in many countries admin need to keep cdr records for all the customers for few months or years. Now if we hard delete those records then admin might be in trouble. To avoid that issue, we implemented soft delete concept. Now regarding your point for sip device and ip settings, I just tested it in version 3.6 and I am not facing any problem. I am able to create same sip device and ip settings. If you are still facing the problem then highlight the exact issue. |
| Comment by powerpbx [ 09/May/18 ] |
|
This appears to happen on provider accounts but not customer accounts. To reproduce, create a provider account and add a sip device and IP settings. Note the sip device username and IP address. Now delete that provider account. The sip device and IP setting will still exist in the database but no longer shows up in the GUI. So it's orphaned data. This is not the the same behavior as customer accounts. Deleting a customer account from the GUI removes the respective devices and IP settings from the database. Now create a customer account or another provider account and a sip device with the exact same device username or IP settings with the same IP address as before. It will fail validation because that sip device username and IP setting still exists in the database as orphaned device and IP even though they are no longer in the GUI. |
| Comment by Samir Doshi [ 15/May/18 ] |
|
Just tried same thing which you mentioned and it worked without any Here is the video of it : http://nimb.ws/BqpSnb Best RegardsSamir Doshi Disclaimer: On Thu, May 10, 2018 at 12:19 AM, powerpbx <notifications@github.com> wrote: > Create a customer account and add a sip device. Now delete that customer |
| Comment by powerpbx [ 15/May/18 ] |
|
That video shows you deleting a customer. Not a provider. The orphaned devices only occur when you delete providers with devices. |
| Comment by powerpbx [ 15/May/18 ] |
|
This is the clean up function that is run for customer that does not exist for provider as far as I can tell. |
| Comment by (Community) DN (Inactive) [ 28/May/18 ] |
|
[~powerpbx] Bug fixed. |