Skip to content
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

IncomingNumbers listing filtered by applicationSid #2608

Open
otsakir opened this issue Nov 1, 2017 · 1 comment
Open

IncomingNumbers listing filtered by applicationSid #2608

otsakir opened this issue Nov 1, 2017 · 1 comment

Comments

@otsakir
Copy link
Contributor

otsakir commented Nov 1, 2017

Enhance IncomingPhoneNumbers endpoint so that it returns only numbers that are bound to an applicationSid. A new query parameter named 'applicationSid' will be added.

For example, while this will retrieve numbers for account X:

http:/.../Accounts/X/IncomingPhoneNumbers.json

the following will narrow down the results to the numbers that contain a reference to application AP81cf45088cba4abcac1261385916d582 in any of the fields voiceApplicationSid, smsApplicationSid, ussdApplicationSid or referApplicationSid.

http:/.../Accounts/X/IncomingPhoneNumbers.json?applicationSid=X

Implementation

IncomingPhoneNumbersEndpoint.java

Parse applicationSid query parameter and populate IncomingPhoneNumberFilter.

IncomingPhoneNumberFilter.java

Introduce 'applicationSid' member variable

incoming-phone-numbers.xml

Enhance mybatis getIncomingPhoneNumbersByFriendlyName select query to include 'applicationSid' filter attribute in the WHERE clause. Existing query already joins numbers with application tables so changes should minimal there.

@jaimecasero
Copy link
Contributor

since a number and app is a dynamic bidirectional association, it makes sense to provide this as suggested. The implemenation would be obvious anyway.

@otsakir otsakir added this to the FES - Sprint 04 milestone Nov 7, 2017
@otsakir otsakir self-assigned this Nov 7, 2017
otsakir added a commit that referenced this issue Nov 9, 2017
…t test and mybatis layer update (for test only)

Refers #2608
otsakir added a commit that referenced this issue Nov 9, 2017
… the codebase (tests, mysql descriptors etc.)

Refers #2608
gvagenas pushed a commit that referenced this issue Jan 13, 2022
…t test and mybatis layer update (for test only)

Refers #2608
gvagenas pushed a commit that referenced this issue Jan 13, 2022
… the codebase (tests, mysql descriptors etc.)

Refers #2608
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