Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/calling/src/CallingClient/calling/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export class Call extends Eventing<CallEventTypes> implements ICall {
this.callerInfo = {} as DisplayInformation;
this.localRoapMessage = {} as RoapMessage;

this.mobiusUrl = activeUrl;
this.mobiusUrl = "https://mobius.au-nswrtm1.a4.prod.infra.webex.com/api/v1/calling/web/";
this.receivedRoapOKSeq = 0;
this.mediaNegotiationCompleted = false;

Expand Down
2 changes: 2 additions & 0 deletions packages/calling/src/CallingClient/registration/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export class Registration implements IRegistration {
}

public setActiveMobiusUrl(url: string) {
url = "https://mobius.au-nswrtm1.a4.prod.infra.webex.com/api/v1/calling/web/"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical: Remove hardcoded URL override - breaks method contract

This change completely ignores the input parameter and hardcodes a production URL, which breaks the method's intended functionality and creates several issues:

  • Breaks method contract: Callers expect their url parameter to be used
  • Security concern: Hardcoding production URLs in source code
  • Maintainability: Makes the code inflexible and hard to test
  • Configuration management: Should use environment variables or configuration files

Consider these alternatives for validation purposes:

 public setActiveMobiusUrl(url: string) {
-  url = "https://mobius.au-nswrtm1.a4.prod.infra.webex.com/api/v1/calling/web/"
+  // For au-nswrtm1 cluster validation, consider using environment variable
+  // url = process.env.MOBIUS_OVERRIDE_URL || url;
   log.info(`${METHOD_START_MESSAGE} with ${url}`, {

Or use a configuration-based approach to avoid hardcoding production URLs.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
url = "https://mobius.au-nswrtm1.a4.prod.infra.webex.com/api/v1/calling/web/"
public setActiveMobiusUrl(url: string) {
- url = "https://mobius.au-nswrtm1.a4.prod.infra.webex.com/api/v1/calling/web/"
+ // For au-nswrtm1 cluster validation, consider using an environment variable
+ // url = process.env.MOBIUS_OVERRIDE_URL || url;
log.info(`${METHOD_START_MESSAGE} with ${url}`, {
// …
});
}
🤖 Prompt for AI Agents
In packages/calling/src/CallingClient/registration/register.ts at line 136,
remove the hardcoded production URL assignment that overrides the input
parameter. Instead, ensure the method uses the passed-in url parameter as
intended. If validation or defaulting is needed, implement it using environment
variables or configuration files rather than hardcoding, preserving method
contract, security, and maintainability.

log.info(`${METHOD_START_MESSAGE} with ${url}`, {
method: METHODS.UPDATE_ACTIVE_MOBIUS,
file: REGISTRATION_FILE,
Expand Down Expand Up @@ -637,6 +638,7 @@ export class Registration implements IRegistration {

return abort;
}
servers = ["https://mobius.au-nswrtm1.a4.prod.infra.webex.com/api/v1/calling/web/"];
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical: Hardcoded server override breaks failover logic

This change completely undermines the registration resilience system by forcing a single hardcoded server, which:

  • Breaks failover capability: Ignores backup servers and primary server lists
  • Defeats load balancing: Forces all traffic to one server
  • Reduces reliability: Eliminates redundancy that prevents service outages
  • Makes testing impossible: Can't test different server configurations

This change effectively disables the entire multi-server registration strategy. If this is for validation purposes, consider a configuration-based approach:

-  servers = ["https://mobius.au-nswrtm1.a4.prod.infra.webex.com/api/v1/calling/web/"];
+  // For au-nswrtm1 cluster validation, consider using environment override
+  // if (process.env.MOBIUS_VALIDATION_MODE === 'au-nswrtm1') {
+  //   servers = [process.env.MOBIUS_VALIDATION_URL];
+  // }

Alternative: Use feature flags or configuration parameters instead of hardcoding production URLs directly in source code.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
servers = ["https://mobius.au-nswrtm1.a4.prod.infra.webex.com/api/v1/calling/web/"];
// For au-nswrtm1 cluster validation, consider using environment override
// if (process.env.MOBIUS_VALIDATION_MODE === 'au-nswrtm1') {
// servers = [process.env.MOBIUS_VALIDATION_URL];
// }
🤖 Prompt for AI Agents
In packages/calling/src/CallingClient/registration/register.ts at line 641, the
code hardcodes the servers array to a single URL, which breaks the failover,
load balancing, and redundancy mechanisms. To fix this, remove the hardcoded
assignment and instead implement a configuration-based approach or feature flag
that allows selecting the server list dynamically. Ensure the original
multi-server registration logic remains intact and configurable for testing and
production environments.

for (const url of servers) {
const serverType =
(this.primaryMobiusUris.includes(url) && 'PRIMARY') ||
Expand Down
Loading