New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on restcomm start - update inProgress Call CDRs to completed status. #1675

Closed
maria-farooq opened this Issue Dec 22, 2016 · 13 comments

Comments

Projects
None yet
3 participants
@maria-farooq
Collaborator

maria-farooq commented Dec 22, 2016

on start of an instance : restcomm removes all registrations in db belonging to that instance.
which is correct bcz restcomm just started and there should be no already existed registration in db.

we can do the same for calls on start of restcomm (not to delete them but update the status of calls of that instance, from in-progress to completed)
this needs to be implmenet at CallManager

@anhntnguyen

This comment has been minimized.

Collaborator

anhntnguyen commented Dec 29, 2016

Hi @maria-farooq
Could I contribute on this issue:
Please confirm my idea here:

Pseudo code:
in CallManager.java, I need to create a function and call this function in contructor of CallManager class:

firstTimeCleanup(){
CallDetailRecordsDao callDetailRecordsDao = storage.getCallDetailRecordsDao();
List results = callDetailRecordsDao.getCallDetailRecordsByStatus("in-progress");
for (CallDetailRecord result : results) {
result.setStatus(completed);
callDetailRecordsDao.updateCallDetailRecord(result);
}
}

@maria-farooq

This comment has been minimized.

Collaborator

maria-farooq commented Dec 29, 2016

Hi @anhntnguyen ,
Thanks for your interest.

Feedback on Pseudo code:

It is cool that in provided pseudo code you have covered pretty much main idea of this task.
There are few things we also need to take care of:

  • While getting the call records, we only get records of current instance.
  • We need to check if we can use the enum Instead of using string constants for status ("in-progress", "completed" etc) they are already available in one of the restcomm package

How to proceed:

Thanks again for your interest.
Maria

@anhntnguyen

This comment has been minimized.

Collaborator

anhntnguyen commented Dec 29, 2016

Hi @maria-farooq
I have signed to contributor agreement,Could you assign this ticket to me.

@maria-farooq

This comment has been minimized.

Collaborator

maria-farooq commented Dec 29, 2016

Hi @anhntnguyen ,

It looks like due to some new github rules i am unable to assign you the issue
We will have to add you in some contributor group and then it will be possible
But no worried we will take care of it with help of administrators.

Meanwhile feel free to check out restcomm repository and play around with it, build locally etc..
We will assign you the issue soon.

Thanks for your cooperation
Maria

@maria-farooq

This comment has been minimized.

Collaborator

maria-farooq commented Dec 29, 2016

@deruelle can you help assign this issue to @anhntnguyen
Thanks
Maria

@deruelle

This comment has been minimized.

Member

deruelle commented Dec 29, 2016

@anhntnguyen can you accept the invite at https://github.com/RestComm/Restcomm-Connect/invitations so we can assign the issue to you ?

@anhntnguyen

This comment has been minimized.

Collaborator

anhntnguyen commented Dec 30, 2016

Hello @deruelle

I have accepted your invitation.

@maria-farooq

This comment has been minimized.

Collaborator

maria-farooq commented Dec 30, 2016

thanks @anhntnguyen i have assigned you the issue.

@anhntnguyen

This comment has been minimized.

Collaborator

anhntnguyen commented Jan 2, 2017

Hi @maria-farooq
I have found 3 issues when I test for my code that I need you to confirm:
1/ When Restcomm-connect receives a call, the "status" in db will be saved in upper case String (IN_PROGRESS), I think that they want to do it for convenience when showing the logs-call. It's cause problems in existing API getTotalRunningCallDetailRecordsByConferenceSid ("status" ='in-progress';) is getting a list with size equal to 0.
2/ If the call is in another status like RINGING etc.., do we need to update it to COMPLETED also?
3/ When using Restcomm dashboard to query current call logs info, It just show up the call logs in the past, and does not update to show the current new call is ongoing even I click a lot of times to log call but it does not refresh to get the new one. The log will be updated if I reload the page again.
4/ I see that we are using the restcomm.script to create dummy data for call detail record, but it seems the script is run after the restcomm finished start. So that I cannot create a dummy data before the restcomm start to test my code. Do you have any idea on this?

Best Regards
Anh Nguyen

@maria-farooq

This comment has been minimized.

Collaborator

maria-farooq commented Jan 2, 2017

Hi @anhntnguyen ,
Thanks a lot for updating us with your progress and findings, its highly appreciated.

1.

Yes currently we have status inconsistency between inbound and outbound calls and we have an open issue for that #1522
the reason its not impacting conference because conference is joined by an inbound call and for all inbound calls status is in-progress.
For your issue: you can use an OR condition to handle both.

2.

Good Question!
I would suggest to move all call in (In_progress, ringing and Queued status) to (Completed)
@gvagenas would you agree?

3.

@anhntnguyen can you please open an issue with your findings here

4.

First of all add unit test and test your code with that
Later for manual testing instead of HSQL, you can install MySql and integrate Restcomm with it.
please see this guide

Please feel free to let us know if you need any help or you feel block on any point.

Thanks
Maria

@maria-farooq

This comment has been minimized.

Collaborator

maria-farooq commented Jan 4, 2017

Hi @anhntnguyen

Thanks for creating Pull Request.
Please see my Comments in #1687

Regards
Maria

@maria-farooq

This comment has been minimized.

Collaborator

maria-farooq commented Jan 31, 2017

Hello @anhntnguyen ,

For testing mariadb sql (xml mapping) files, we can setup MySql and integrate it with Restcomm.
Please see the documentation here.
Please feel free to ask if any questions

Thanks
Maria

maria-farooq added a commit that referenced this issue Mar 7, 2017

Merge pull request #1687 from anhntnguyen/master
#1675  update inProgress Call CDRs to completed status
@maria-farooq

This comment has been minimized.

Collaborator

maria-farooq commented Mar 7, 2017

thanks a lot @anhntnguyen for your contribution.
this PR is now merged.

@maria-farooq maria-farooq modified the milestone: 8.1.0 Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment