Skip to content

Ambiguous/misleading CDR status field writing: "COMPLETED" and "completed" #2162

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

Closed
FerUy opened this issue May 18, 2017 · 6 comments
Closed
Assignees

Comments

@FerUy
Copy link

FerUy commented May 18, 2017

Tied to Zendesk ticket #34316, Restcomm-Connect is generating CDRs with either status COMPLETED and completed. To maintain coherence, as all other status are written in lower caps, status field COMPLETED should be removed/replaced by completed.

@FerUy
Copy link
Author

FerUy commented Aug 8, 2017

@gvagenas I believe the root problem for this issue (which as for the aforementioned Zendesk ticket, it belongs to USSD CDR's), relies in the following two lines of the following XML files (for mariadb & hsql respectively):

https://github.com/RestComm/Restcomm-Connect/blob/master/restcomm/restcomm.application/src/main/webapp/WEB-INF/scripts/mariadb/sql/call-detail-records.xml#L212

https://github.com/RestComm/Restcomm-Connect/blob/master/restcomm/restcomm.application/src/main/webapp/WEB-INF/sql/call-detail-records.xml#L210

If yes, before making a PR, I would like to understand better the motivation behind updateInCompleteCallDetailRecordsToCompletedByInstanceId, as it might make sense for voice calls, but maybe not for USSD.

Thanks in advance!

@croufay
Copy link
Contributor

croufay commented Aug 9, 2017

@FerUy ,

Have you tested the above to make sure it works and does what you expect it to do? What happens if you change it to lowercase?

Charles

@FerUy
Copy link
Author

FerUy commented Aug 9, 2017

@croufay, yesterday I had to jump into other issues, so I programmed to test it today... that's why I asked what I asked to @gvagenas, to maybe win some time.

Anyway, after testing, it became clear that indeed this was the issue, and it applies to either voice calls or USSD, so, I believe I should make the PR as for following explanation.

I reproduced the problem with TelScale latest release (8.2.0.1560) and the release generated in my workspace with the aforementioned changes. For example, by generating a USSD session/CDR on "in-progress", then restarting Restcomm-Connect while the call was being processed. While in TelScale latest release (8.2.0.1560) the CDR is rewritten to "COMPLETED", in the release generated in my workspace, it turns to "completed". See images before and after next (with the release generated in my workspace with the aforementioned changes):

Before (call being processed, CDR with status in-progress):
before_in-progress

After (CDR with status set to completed)::
after_completed

Meanwhile, if TelScale latest release (8.2.0.1560) is used to reproduce the test shown above, it is set to COMPLETED like shown next (according to the issue and related Zendesk ticket #34316):
telscale_version8 2 0 1560_in_progress_to_completed

So, I believe a PR including these two minor changes in the XML scripts applies to either voice calls and USSD sessions, thus should actually not only solve the issue for the latter, but for the former too. Agreed?

A sideline finding, was that the select drop-down list includes two Completed options (the second one gets no records, while the first one only the completed, which is clearly a bug -this tested either in TelScale version or new release-). Should I raise an issue for this or is it already known/raised?

completed_call_status

@FerUy
Copy link
Author

FerUy commented Aug 10, 2017

One more thing I forgot to point out in my previous comment, which was part of the goal of my first question to @gvagenas yesterday. Instead of changing to completed when updateInCompleteCallDetailRecordsToCompletedByInstanceId applies, we could select another meaningful word (as otherwise there won't be any chance to discriminate them from the really completed ones)... options that pop up my mind: updated, finalized, concluded, reset, ended, moved...anything meaningful instead of COMPLETED, as it's ambiguous/confusing/inappropriate) and the root cause of the related support ticket).

@FerUy
Copy link
Author

FerUy commented Aug 14, 2017

Hi @gvagenas, after discussing with @abhayani, we decided to not introduce another status as this will impact too many existing deployments. So, I will do a PR with completed status to solve this issue and create another issue for changing to another status than completed when updateInCompleteCallDetailRecordsToCompletedByInstanceId applies.

@FerUy
Copy link
Author

FerUy commented Aug 23, 2017

Closed by merged PR #2422.

@FerUy FerUy closed this as completed Aug 23, 2017
maria-farooq pushed a commit that referenced this issue Aug 25, 2017
* master:
  Change CDR status to lowercase 'completed' when 'updateInCompleteCallDetailRecordsToCompletedByInstanceId' applies. Issue #2162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants