Open edimondi opened 2 years ago
There are two settings that may assist with that.
StreamBuffer: https://github.com/InnovateAsterisk/Browser-Phone/blob/cc81b20d884e18bf75f7bae2f5c2628aa7a2276a/Phone/phone.js#L114
This is performance control that limits the amount of items to display in a buddy stream. This is any kind of item, text or cdr. It simply doesn't show more than n items, but if you are looking for something, simply use the search function, to filter out items, and again, it shows n many items in results.
MaxDataStoreDays: https://github.com/InnovateAsterisk/Browser-Phone/blob/cc81b20d884e18bf75f7bae2f5c2628aa7a2276a/Phone/phone.js#L115
This setting will actually delete the data when this condition is met. Just remember tho, the condition is only considered when data is added (it doesn't run as a service). It will delete all data (correctly) that matches the condition. Example is: set MaxDataStoreDays to 5, and the system will only keep data for up to 5 days, when a new item is added.
The CDR data is complex and contains multiple bits in both the local (synchronous) storage area, and the in the indexDB (async) storage area. It is recommended to use this feature to keep the required storage of data to what is necessary.
can i just not save the call list because i dont need that much or remove them when closing the browser so i don't want to save on the localstorage i think its called sessionStorage . Thanks
now i understand what the MaxDataStoreDays is deleting, i thought that deletes the call list but it deletes the chat history, can you make to delete the entire call list not just the chat history? Thanks
It will delete any item in the Buddy Stream that is older than the MaxDataStoreDays. The actual Buddy/Contact is not removed from the list (left hand side list), this is only deleted when you click the delete buddy item.
The Buddy Stream: The buddy stream is a concept similar to Skype and WhatsApp, and most chat based apps, but brings this concept over to the voice communications side. The principal is simple, if you are going to call someone there is a strong possibility that there is or will be a relationship between you and the person you are calling, even if this is short lived. By arranging CDR data in a same was a chat history we are able to look at data by way of this relationship, with the idea being if you have made contact, there will be a strong possibility that further contact will be made, especially when the possibility of other formats is considered. In the future this could be opened up to SMS messages, email, and more.
For call centre type activity (when a single agent accepts calls from many thousands of unknown customers), you may need to have some sort of service script that deleted old users based on the last activity date of the buddy/contact. This is not currently a feature.
is there a way to just not save the contact list (left hand side list) at all ?
You can disable buddies, try: https://github.com/InnovateAsterisk/Browser-Phone/blob/23f61419ba6db9e2bfba1255cfaecd08c9ea71ec/Phone/phone.js#L131
But just to let you know this doesn't actually prevent the buddy from being created - they are embedded into the way the system works, but the effect of the above is that you should ever see the list.
yes it is still creating the data . I was thinking what about limiting the size of data to be saved in local storage, lets say to store only 100KB worth of data, is it possible? this is what i found, maybe you can take a look : https://stackoverflow.com/questions/2989284/what-is-the-max-size-of-localstorage-values
Thanks Again
can you do a button to clear all contact list ?
Let me create something a little less dramatic. Something that, with a setting, will keep the number of buddies down to a manageable amount. Either by number or last activity or both.
I can also implement something that I was going to do a while back, that does lazy loading fo the buddy data, so basically it will only draw the HTML and messages of the selected buddy on click (currently it makes the containers for each buddy). This should help with systems that have truly hundreds of contacts.
You can now use: https://github.com/InnovateAsterisk/Browser-Phone/blob/ee05ddfd4435bd8b5cc2ddfac8a3614c20302668/Phone/phone.js#L147 and https://github.com/InnovateAsterisk/Browser-Phone/blob/ee05ddfd4435bd8b5cc2ddfac8a3614c20302668/Phone/phone.js#L148
The system will check the older contacts first, and then the total. You can use either or both. The system defaults are now 1 year for MaxBuddyAge and 999 for MaxBuddies. (Values for both these settings must be greater than 1)
Perfect its all good now . One more thing if it can be done, is it possible to NOT delete the contacts that i add manually. Thanks again i really appreciate it
hi there, i was thinking if you show only the last 10 calls on the call list make it like pagination don't load all calls if you want to see other calls you just go next page, is it going to be faster or not because lots of calls makes the page slower ?