Skip to content

feat(contact-center): Dial number validation supports international#4759

Open
zachraymer wants to merge 2 commits intowebex:nextfrom
zachraymer:next
Open

feat(contact-center): Dial number validation supports international#4759
zachraymer wants to merge 2 commits intowebex:nextfrom
zachraymer:next

Conversation

@zachraymer
Copy link

@zachraymer zachraymer commented Mar 9, 2026

COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7303

This pull request addresses

< DESCRIBE THE CONTEXT OF THE ISSUE >
Changes the dial number validation logic to use dial number entries and match at least one available regex pattern if present, otherwise we retain the previous validation which matches US and canada dial formats.
Feature has been covered by unit testing, and manually verified by e2e testing of SDK -> widgets -> consuming app

by making the following changes

  • updates the dial number validation method to filter through dial plan entries, which have regex patterns for dialing
  • adds unit testing
  • retains fallback to US and canada dialing format to preserve previous logic

< DESCRIBE YOUR CHANGES >

Vidcast demonstrating changes

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  1. US & Intl dial numbers pass when US and international formats are accepted
  2. Us numbers pass when only US formats are accepted
  3. US numbers pass when no dial plans are present using fallback for US format

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.

@zachraymer zachraymer requested a review from a team as a code owner March 9, 2026 17:32
@zachraymer zachraymer changed the title feat: dial number validation uses dial number profile regex and retai… feat(contact-center): Dial number validation supports international Mar 9, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6283a358a8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4759.d3m3l2kee0btzx.amplifyapp.com

@zachraymer zachraymer added the validated If the pull request is validated for automation. label Mar 9, 2026
Copy link
Contributor

@Kesari3008 Kesari3008 left a comment

Choose a reason for hiding this comment

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

Approving with one minor comment

Copy link
Contributor

@rarajes2 rarajes2 left a comment

Choose a reason for hiding this comment

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

Approving with some minor comments

INVALID_DIAL_NUMBER: {
message:
'Enter a valid US dial number. For help, reach out to your administrator or support team.',
'Enter a valid dial number. For help, reach out to your administrator or support team.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we include the supported country list here?

@Kesari3008 @mkesavan13

Copy link
Author

@zachraymer zachraymer Mar 10, 2026

Choose a reason for hiding this comment

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

Thank you for the review Rajesh. Can we satisfy this item or go forward with merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants