Skip to content

CDR resulting from sub-account-client inbound calls has parent 'accountSid' #1939

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
otsakir opened this issue Mar 13, 2017 · 6 comments
Closed
Assignees
Milestone

Comments

@otsakir
Copy link
Contributor

otsakir commented Mar 13, 2017

When a registered client makes a call the related CDR record does not belong to the account the client belongs too but to its parent.

I've reproduced the issue like this:

  • On a local instance i created a sub-account of [email protected]. I named it [email protected]
  • Created a SIP client named 'orestis'
  • Registered with 'orestis' using jitsi
  • Made a call to the cloud instance at sip:[email protected] call succeeded.
  • Checked CDRs using the Calls API. No CDRs under '[email protected]' account.
  • Check CDRs using parent [email protected] account. The call is there having account SID "ACae6e420f425248d6a26948c17a9e2acf" (administrator).

looks like the owner of the CDR is wrong

@maria-farooq
Copy link

some more insights are:
it is happening for inbound calls, for outbound call account_sid is correct.
reason behind is that for inbound calls to a number, we are picking sid from account of number_number. if phone number belongs to parent then CDR will have account sid of parent, which is wrong.

@maria-farooq
Copy link

another test proved that:
if sub account make an inbound call to a phone-number owned by sub-account itself, in that case account-sid in CDR is correct (i.e. = sub-account-sid)

@maria-farooq
Copy link

Comprehensive Problem Statement:

When a sub-account-client dials a phone-number owned by parent-account: resultant CDR account-sid is parent-account-sid instead of sub-account-sid. Reason behind is that CallManager is picking sid based on account-sid of phone-number, since phone-number belongs to parent hence cdr belongs to parent account-sid.
This impacts Calls Api, as sub-account-holders are unable to see CDRs that were made toward parent-phone-number.

@maria-farooq maria-farooq changed the title CDR resulting from client call has wrong 'accountSid' CDR resulting from sub-account-client inbound call has parent 'accountSid' Mar 22, 2017
@maria-farooq maria-farooq changed the title CDR resulting from sub-account-client inbound call has parent 'accountSid' CDR resulting from sub-account-client inbound calls has parent 'accountSid' Mar 22, 2017
@maria-farooq
Copy link

Solution need to be decided here

@maria-farooq
Copy link

maria-farooq commented Mar 23, 2017

final solution as discussed with @deruelle is here
@gvagenas can you please also review

@maria-farooq
Copy link

maria-farooq commented Mar 28, 2017

so solution 3 is final, now time to impl:

Will add test cases for following case:

maria-farooq pushed a commit that referenced this issue Mar 29, 2017
maria-farooq pushed a commit that referenced this issue Mar 29, 2017
@maria-farooq maria-farooq added this to the 8.2.0 milestone Mar 29, 2017
gvagenas added a commit that referenced this issue Apr 23, 2017
@ghost ghost removed the in progress label Apr 24, 2017
maria-farooq pushed a commit that referenced this issue Apr 24, 2017
* master:
  Documentation for issue #1939
  Minor fix
  Revert SMPP SMS encoding to GSM. And use -d encoding for API.
  Patch to support dialling a registered client if request comes from external network This close #2086
  added comment
  fixed #2011, cc: #1939
  removed unused import
  unignored
  added some useful tests
  updated test
  modify  calltool to getCall from another account's resource #1939
  set account sid to the account sid of from client account #1939
  completed test for #1939
  register sub-account-client with restcomm
  access cdr from subaccount
  teporarily ignored rest of test to test new one
  added shallow test
  added data for sub-account and sub-account-client
  Revert "added space"
  added space

Conflicts resolved in:
	restcomm/restcomm.testsuite/src/test/resources/restcomm.script_callLifecycleTest
maria-farooq pushed a commit that referenced this issue Apr 26, 2017
* master: (149 commits)
  Fixes for testsuite for LCM This refer to #1135
  Update MGCP driver to 6.0.22 This refer to #2015
  Documentation for issue #1939
  Minor fix
  Revert SMPP SMS encoding to GSM. And use -d encoding for API.
  Patch to support dialling a registered client if request comes from external network This close #2086
  Restructure syntax in config-rvd-logging.sh to work with old versions of xmlstarlet in Amazon linux
  Fixes mktemp syntax issue in config-rvd-logging.sh for mac-os
  Updated logs_collect and set-log-level configuration scripts
  Modification on config-rvd-logging configuration script
  Added rvd logging configuration script
  Changed project's version to 8.2.0-SNAPSHOT
  added DTMF_DETECTOR_TONE_DURATION=80
  Moved project version back to 8.1.0 in order to include patch for #2053 Provided patch for missing CallTinestamp parameter. This close #2053
  Test case for issue #2053
  Moved project to 8.2.0-SNAPSHOT
  Fixes for Restcomm testsuite This close #1974
  Patch to ensure RVD Migration is disabled This refer to #1422
  Fixes for UssdPush This close #2051
  patched #2024 https://telestax.atlassian.net/browse/RESTCOMM-841
  ...

Conflicts resolved in:
	restcomm/restcomm.testsuite/src/test/resources/org/restcomm/connect/ussd/restcomm.script_ussdPullTest
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

3 participants