Skip to content

PSTN/1:N Enable ringing tone during connecting and ringing state #5808

Merged
edwardlee-msft merged 6 commits intomainfrom
elee/add-ringing-to-samples
Apr 30, 2025
Merged

PSTN/1:N Enable ringing tone during connecting and ringing state #5808
edwardlee-msft merged 6 commits intomainfrom
elee/add-ringing-to-samples

Conversation

@edwardlee-msft
Copy link
Copy Markdown
Contributor

What

Enable ringing tone during connecting and ringing state

Why

No audible indication that a call is ringing or connecting to a pstn/1:N participant

How Tested

MacOS, Calling Sample.
Called Teams number, Telus number, Freedom number.

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

CallWithChat bundle size is not changed.

  • Current size: 12413574
  • Base size: 12413574
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

Calling bundle size is not changed.

  • Current size: 12413561
  • Base size: 12413561
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

Chat bundle size is not changed.

  • Current size: 1781063
  • Base size: 1781063
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 58502 / 94885
61.65%
58502 / 94885
61.65%
1184 / 2710
43.69%
3427 / 5786
59.22%
Current 58494 / 94879
61.65%
58494 / 94879
61.65%
1184 / 2710
43.69%
3389 / 5764
58.79%
Diff -8 / -6
0%
-8 / -6
0%
0 / 0
0%
-38 / -22
-0.43%

@github-actions
Copy link
Copy Markdown
Contributor

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 28326 / 45691
61.99%
28326 / 45691
61.99%
794 / 1451
54.72%
2351 / 3738
62.89%
Current 28321 / 45691
61.98%
28321 / 45691
61.98%
794 / 1451
54.72%
2374 / 3752
63.27%
Diff -5 / 0
-0.01%
-5 / 0
-0.01%
0 / 0
0%
23 / 14
0.38%

!isPhoneNumberIdentifier(callees[0]) &&
(call.state === 'Ringing' || call.state === 'Connecting')
) {
if (callees && callees[0] && (call.state === 'Ringing' || call.state === 'Connecting')) {
Copy link
Copy Markdown
Contributor Author

@edwardlee-msft edwardlee-msft Apr 30, 2025

Choose a reason for hiding this comment

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

FYI: Removed the phonenumberidentifier check entirely as the fix is to only apply ringing in connecting and ringing states. We will not produce ringing in "EarlyMedia" state in case there is a clash with remote ringing tones coming from carriers.

Spoken with Sola Akanmu (PSTN poc), they noted there is no pstn check preventing remote ringing from occuring in EarlyMedia state. Hence why the local ringing tone will only be present during "Ringing" and "Connecting" states. (Contoso provides ringing audio file)

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.

In the future, If there is feedback from Contoso requesting that there be an option to add a ringing tone during early media as well, we can provide an options bag for them to do so.

});

test('should not play sound when call is made to PSTN user', () => {
test('should play sound when call is made to PSTN user and stop when EarlyMedia', () => {
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.

Tests were updated to reflect the new changes.
PSTN calls will now have ringing incorporated but will not have it incorporated in "EarlyMedia" state.
Contoso can easily override this behavior by providing no audio track for ringing.

@edwardlee-msft edwardlee-msft merged commit 4ae8894 into main Apr 30, 2025
41 checks passed
@edwardlee-msft edwardlee-msft deleted the elee/add-ringing-to-samples branch April 30, 2025 21:07
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.

3 participants