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

Add new return parameters Country Code and Country Name #21

Conversation

ravindrapalaskar17
Copy link
Contributor

  • Add new return parameters Country Code and Country Name

More Details for Roaming Status #18 :- With reference to this issue on CAMARA we added new return parameter

  1. Country Code
  2. Country Name

* Add new return parameters Country Code and Name 

More Details for Roaming Status camaraproject#18 :- With reference to this issue on CAMARA we  added new return parameter 
1. Country Code
2. Country Name

* Added description and e.g. for Country Code & Name

* YAML Update version number
Comment on lines 167 to 170
CountryCode:
description: The country calling code as an identifier for the country and the dependent areas.
type: string
example: "49"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API should return the mobile country code (MCC) rather than country calling code. Some mobile networks do not have an associated country calling code. MCC for Germany is 262.

Return type should be integer, not a string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for feedback we updated YAML and pushed commit in this PR.

YAML: We updated YAML to change the country calling code to Mobile country code and data type from string to integer
Copy link
Collaborator

@monamok monamok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these new fields always return value? What happens if "eventStatus" is "ROAMING_OFF"? It returns the country information where the mobile belongs to?

type: integer
example: 262
CountryName:
description: The ISO Code of the country.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it better to say "Alpha‑2 code" for example or mention it's a two character code? Don't you think ISO Code can be ambiguous?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thing is that, it seems that in some cases there isn't a 1:1 relationship between: MCC and ISO Country code:

340 BL/GF/GP/MF/MQ
647 YT/RE

What we expect to happen in those cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your feedback. I will update the same with Alpha-2-code

Copy link
Contributor

@maxl2287 maxl2287 Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @monamok: Please rename it to:

CountryName:
      description: The ISO 3166 ALPHA-2 code of the country. It can also include a list of codes, if more than one country have the same MCC.

@@ -8,7 +8,7 @@ info:
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: 0.2.0
version: 0.2.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we add it as a fix or should we start with 0.3.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I also agree that this is big change so instead of fixing we should go with 0.3.0

Comment on lines 110 to 111
- countryCode
- countryName
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

countryCode and countryName should not be required. Even if we agree that the home countryCode and countryName can be returned when the device is not roaming (this information can probably be deduced from ueId anyway), we need to consider user consent.

The user may consent to their roaming status being made available to the API caller, but not the country in which they are roaming. Providing the roaming country provides much more information on the device location than just knowing that the device is not in the home country.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to consider user consent.
The user may consent to their roaming status being made available to the API caller, but not the country in which they are roaming. Providing the roaming country provides much more information on the device location than just knowing that the device is not in the home country.

You're right about user consent. How are we going to manage and seperate these cases? By having different scopes?

YAML Update:- With reference to review comments we  updated the API version and description of Country Name and removed countryName and countryCode from required
@bigludo7
Copy link
Collaborator

bigludo7 commented Feb 9, 2023

Hello
If we could have a list of country for one MCC probably cleaner to have an array of countryName instead of one string and pipe to distinguish occurrence.
Thanks

@eric-murray
Copy link
Collaborator

If we could have a list of country for one MCC probably cleaner to have an array of countryName instead of one string and pipe to distinguish occurrence.

Also, for some MCC (principally 901), there is no associated country. So we need to decide whether a device roaming on an international network should return no countryName field at all, a blank countryName ("") or empty array ([]), or some other value. I have seen "XX" used for "unknown" but this is a user-assigned code not part of the standard.

@maxl2287
Copy link
Contributor

maxl2287 commented Feb 9, 2023

If we could have a list of country for one MCC probably cleaner to have an array of countryName instead of one string and pipe to distinguish occurrence.

Also, for some MCC (principally 901), there is no associated country. So we need to decide whether a device roaming on an international network should return no countryName field at all, a blank countryName ("") or empty array ([]), or some other value. I have seen "XX" used for "unknown" but this is a user-assigned code not part of the standard.

Maybe for such 9xx we can go with "worldwide"?

With reference to comment:- list of country for one MCC probably cleaner to have an array of countryName instead of one string. We have updated country name data type to array.
@ravindrapalaskar17
Copy link
Contributor Author

Hello If we could have a list of country for one MCC probably cleaner to have an array of countryName instead of one string and pipe to distinguish occurrence. Thanks

We updated data type of country name from string to array for multiple country name.

type: array
items:
type: string
example: [BL,GF,GP,MF,MQ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see multiple examples here (using keyword examples rather than example):

  • No associated country []
  • Single associated country e.g. ["DE"]
  • Multiple associated countries e.g. ["BL","GF","GP","MP","MQ"]

The current example with multiple countries would be rare in practice. The usual response would be a single country, so the description should be extended to explain why multiple countries or no country may be returned.

My current preference for no associated country is an empty array, but an alternative would be ["XX"].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple Country Code
Single Country Code
No Country Code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We Updated YAML with all three Examples with extended description.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @ravindrapalaskar17
I agree with @eric-murray about "No associated country" case. I think an empty array [] is a better choice. Is there any reason why you prefer to return ["XX"]?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravindrapalaskar17 let's go with an empty array for an undefined countryName.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for feedback we updated YAML with empty array.

We added  three examples of (no-countrycode,   single-countrycode --multiple-cc) with some extended description.
maxl2287
maxl2287 previously approved these changes Feb 15, 2023
value:
ueId:
msisdn: 123456789
uePort: 5090
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor point, but parameter uePort is superfluous here. This parameter is only required if the UE is identified by IPv4 address. But as all three example use msisdn, then uePort is not required. It's not incorrect to include it, but the examples would be cleaner if this was removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update YAML:- Removed uePort from examples

@eric-murray
Copy link
Collaborator

@NoelWirzius
Can this PR be merged?

@eric-murray eric-murray mentioned this pull request Feb 20, 2023
@hdamker hdamker requested a review from NoelWirzius February 23, 2023 13:54
@hdamker hdamker changed the title Add new return parameters Country Code and Country Name (#1) Add new return parameters Country Code and Country Name Feb 23, 2023
@NoelWirzius
Copy link
Collaborator

@eric-murray yes we can go merge this

@eric-murray eric-murray merged commit 1b67431 into camaraproject:main Feb 23, 2023
@eric-murray
Copy link
Collaborator

Now merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants