Skip to content

[mtp3] UPU enum value normalisation#52

Merged
sebastiw merged 2 commits into
sebastiw:mainfrom
jacob-wg2:mtp-upu-enum-value-normalisation
May 20, 2026
Merged

[mtp3] UPU enum value normalisation#52
sebastiw merged 2 commits into
sebastiw:mainfrom
jacob-wg2:mtp-upu-enum-value-normalisation

Conversation

@jacob-wg2

@jacob-wg2 jacob-wg2 commented May 18, 2026

Copy link
Copy Markdown
Contributor

Currently unavailability_cause uses different atoms to encode the same cause in otc_m3ua and otc_mtp3. otc_mtp3 also uses an integer user_part_id while otc_m3ua uses atoms for the corresponding field. The specs use identical text representations for both, similar to what otc_m3ua uses.

  • rename the unavailability_cause atoms in otc_mtp3
  • convert the user_part_id to an atom ({reserved, R} for unsupported values)

@jacob-wg2

jacob-wg2 commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Note that this contains the commit from #51, so it should be merged after it.
Setting it to "draft" to prevent it from being merged by accident.

@jacob-wg2 jacob-wg2 marked this pull request as draft May 18, 2026 15:57
@jacob-wg2 jacob-wg2 force-pushed the mtp-upu-enum-value-normalisation branch from d01189b to c3f1be0 Compare May 18, 2026 20:44
@jacob-wg2 jacob-wg2 marked this pull request as ready for review May 18, 2026 20:45
Comment thread src/otc_mtp3.erl Outdated
Comment on lines +375 to +376
parse_unavailability_cause(?MTP3_UPU_CAUSE_UNEQUIPPED) -> unequipped_remote_user;
parse_unavailability_cause(?MTP3_UPU_CAUSE_INACCESSIBLE) -> inaccessible_remote_user.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Should we update the macro-names as well for clarity?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Given that they sit in an exported hrl file we probably should.

Comment thread src/otc_mtp3.erl
parse_user_part_id(?MTP3_SERVIND_MTP_TEST) -> mtp_test;
parse_user_part_id(?MTP3_SERVIND_BROADBAND_ISUP) -> broadband_isup;
parse_user_part_id(?MTP3_SERVIND_SATELLITE_ISUP) -> satellite_isup;
parse_user_part_id(R) -> {reserved, R}.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

not exactly reserved, but spare. are you sure it's allowed?
Usually we make sure to crash in OTC for weird values e.g. spares set.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is just mirroring the otc_m3ua:parse_user_identity/compose_user_identity functions. It didn't crash before either, as just the integer was passed, and I didn't want to change semantics.
But I'm fine with crashing, like the other mapping functions in that module do.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Didn't find an explicit Q.700 requirement for the handling of spare/reserved values. But I came across several quotes elsewhere indicating that related values should be ignored. So I'd rather keep this consistent with otc_m3ua for now.

Comment thread src/otc_mtp3.erl Outdated
compose_user_part_id(sccp) -> ?MTP3_SERVIND_SCCP;
compose_user_part_id(tup) -> ?MTP3_SERVIND_TUP;
compose_user_part_id(isup) -> ?MTP3_SERVIND_ISUP;
compose_user_part_id(dup_call) -> ?MTP3_SERVIND_DUP_CALL;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

ITU-T Q.704 15.17.4 says it's only DUP for this one and not the split as service indicator for DUP (call and circuit-related messages) and DUP (facility registration and cancellation messages). what are your thoughts on it, something to care about?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good question. I've used dup_call because it's encoded by the same integer, but I'm not sure there is a need to align the names with service indicator. DUPU user identity doesn't use either of them, so dup is probably fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
compose_user_part_id(dup_call) -> ?MTP3_SERVIND_DUP_CALL;
compose_user_part_id(dup) -> ?MTP3_SERVIND_DUP_CALL;

still using the other macro. Should we rather have a separate set of macros for user part id?

@jacob-wg2 jacob-wg2 requested a review from sebastiw May 20, 2026 09:49

@sebastiw sebastiw left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

thanks

@sebastiw sebastiw merged commit 2455283 into sebastiw:main May 20, 2026
1 check passed
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.

2 participants