Skip to content

Adds avatar upload functionality#3

Open
aaker wants to merge 80 commits intomainfrom
claude/analyze-test-coverage-bDQf3
Open

Adds avatar upload functionality#3
aaker wants to merge 80 commits intomainfrom
claude/analyze-test-coverage-bDQf3

Conversation

@aaker
Copy link
Copy Markdown
Owner

@aaker aaker commented Mar 14, 2026

Adds the ability to upload avatar images to users via a new API endpoint.

Also includes new avatar images for testing and updated .gitignore to ignore certain files.

API-456

aaker added 30 commits January 10, 2026 12:03
Adds the ability to upload avatar images to users via a new API endpoint.

Also includes new avatar images for testing and updated .gitignore to ignore certain files.

API-456
Improves avatar update process by adding a count check.

This change ensures that avatars are only updated when necessary,
potentially optimizing resource usage. It introduces a mechanism to
retrieve the current avatar count before attempting an update.
Avoids overloading the API during avatar updates
by adding a short delay between requests.

Related to API-123
Adds timeout to avatar count check and upload to avoid indefinite delays.
Logs avatar concurrency state for debugging purposes.
Improves error handling during avatar processing.

Relates to API-345
Implements a timeout mechanism for API requests to prevent indefinite waiting.

Adds error handling for timeout situations and re-throws errors so the caller knows the request failed.
This ensures that the application doesn't get stuck due to unresponsive API endpoints.
Relates to API-345
Refactors avatar updates to process them asynchronously, resulting in performance improvements.

Removes unnecessary await, and now processes `avatarBatch` in the same asynchronous manner as `macDataBatch`.

API-546
Adds a log message to indicate when avatar uploads are still in progress during domain building.

Ensures avatar filenames are case-insensitive when checking file extensions and includes jpg support.
Reduces log verbosity by commenting out a log statement.

The log statement reported when an avatar update was skipped
because the avatar already existed. This information is not
deemed necessary for regular operation and clutters the logs.
Increases timeout for avatar updates and checks to enhance reliability.

Prints elapsed time in seconds for better readability.
Corrects the elapsed time calculation for avatar
uploads to accurately reflect the duration.

Ensures correct timing is logged even in error
cases.

Relates to API-345
Adds the ability to configure the number of resellers to generate,
and adjusts default value calculations for `maxResellers` to ensure
it's at least 1. Also prints the number of resellers when server
configs are loaded from JSON. API-123
Streamlines reseller creation process with logging.
Refines domain name sanitization by removing redundant underscores and handling ampersands.

Improves domain creation logic to enhance reseller selection
and provide more informative logging.
Adds a README with instructions to build and install SIPp from source.

Improves compatibility of the inbound script with older SIPp versions by introducing logic to handle different media port parameters.
Ensures folder is present after pull.

Related to API-402
Reduces the default number of media ports allocated to one.

This change simplifies port management and relies on a single port
for media transmission, streamlining the configuration.

Removes redundant logic related to checking and setting a range of
RTP ports, further simplifying the code.

API-456
Reduces agent, batch, and device delays to speed up processing.

Limits the maximum concurrent avatar uploads to reduce server load.

Only processes avatars for domains starting with "a" or "b" for testing purposes.
Enables configuration of maximum concurrent domains from an environment variable.

This allows for dynamic adjustment of concurrency levels without requiring code deployments.

Updates default batch sizes for enhanced processing efficiency.

Relates to API-345
Updates the CSV file paths to align with the new directory structure when running in legacy single-server mode.

This change ensures that the scripts correctly locate and use the necessary CSV files in the absence of a server ID.
Increases the available port ranges for SIP, control, and media traffic.

Combines multiple CSV files into a single temporary file for processing,
improving efficiency and load distribution.

Adds a cleanup mechanism to remove temporary files after processing, ensuring
a clean environment.

Improves transport type selection for variety.
Randomizes user selection in the input file for registration.

Improves transport type variety by using the minute of the hour, instead of the file count modulo.

API-456
Improves debugging by logging the full SIPp command.
Disables temporary file cleanup during registration.
This change is related to API-555.
Modifies call rate calculation for registration script.

Increases pause durations in UAC/UAS scenarios, enhancing realism of call simulations.

Relates to API-474
Adds the [field3] variable to several SUBSCRIBE messages
in the SIPp script.

This allows for greater flexibility in message customization.
Improves session teardown robustness by randomizing the BYE request timeout.

This avoids potential synchronization issues and ensures more realistic call flows.

Reduces pause time to speed up testing and adjusts XML to use new timeout variable.

Related to API-444
Corrects how the timeout value is passed to the sipp command to ensure proper execution.

Ensures the BYE request receives the correct timeout value.

Relates to API-345
aaker and others added 30 commits January 15, 2026 19:47
Replaces the 'goto' action with 'nop' to control the script flow.

'nop' provides a more direct way to specify the next action,
improving script clarity and maintainability.
Updates call ID generation in the REGISTER method, removing unnecessary prefixes and improving overall clarity.

Improves efficiency and readability of call tracking.

Relates to API-456
Ensures the target extension is generated as an integer string.

It uses a floating-point number sample, then converts to an integer string.
Refactors the method for creating a target extension.

It now uses the call number to generate the extension, avoiding floating-point operations and string conversions for efficiency.
Simplifies target extension generation by moving
it to the calling script.

Removes extension generation logic from the XML
scenario file, making the script more maintainable
and easier to understand.

API-456
Ensures Call-ID field in SIP INVITE, ACK, and BYE
messages includes a prefix. This helps to
distinguish Call-IDs and avoid potential conflicts
with other systems.

Relates to API-4444
Removes redundant "inv-" prefix from Call-ID, streamlining
identification.

Fixes an issue where a retry label was causing issues when
authenticating with a proxy.

Updates authentication handling in the presence of a proxy,
improving overall reliability.
Removes the header extraction since it is no longer necessary, simplifying the scenario definition.

API-123
Adds a mechanism to retry authentication with a new INVITE after a 407 response.

It enhances resilience in scenarios where authentication challenges are expected.
Refines the SIP user agent client scenario to fully
support authentication challenges during call setup.

Handles 407 Proxy Authentication Required responses,
re-sending the INVITE with appropriate credentials.

Updates call flow to handle more SIP responses.
Allows more realistic call scenarios by using a CSV file to generate random target extensions instead of a single extension.

Uses a unique call ID for each INVITE dialog, improving call tracking and debugging.

Relates to API-456
Refactors the SIPp scenario to focus solely on inviting
another extension with authentication, streamlining the call flow.

Removes registration phase from the scenario, simplifying
the script and focusing on call functionality.

Reduces the range of random target extensions generated, which
makes testing more efficient by lowering the number of possible
targets that need to be attempted during the SIPp testing run.
Simplifies target extension generation by using a single CSV file.

The previous implementation generated temporary CSV files with a random suffix, which was unnecessary.

API-456
Updates the script to use relative file paths
for CSV files, removing the need for the /tmp/
directory. This change makes the script more
portable and reduces potential permission issues.

Related to API-42
Refactors registration process to consolidate CSV files per transport type, ensuring even distribution of registrations over a 10-minute window.

- Adjusts cron schedule to run every 10 minutes
- Spreads registrations over a larger window
- Modifies transport distribution logic based on window
Enables/disables RTP media to test signaling load.

Introduces a configuration option to disable RTP media transmission during calls, allowing focus on signaling performance.
The setting can be configured on the server level in servers.json or globally in the .env file.
Adds logging to indicate whether RTP is enabled or disabled.
Adds runtime tracking to SIPp processes.

Calculates and logs the runtime of the SIPp process in minutes, enhancing monitoring and debugging capabilities.
The runtime is logged upon process completion.

Related to v46-enhancements
Adds a maximum duration for the registration process.

This prevents the registration script from running indefinitely.

The duration is set to 80 minutes to accommodate ramp-up,
the main registration loop, and a buffer for incoming calls.
Refactors the script to use numeric variables instead of named variables for loop counters.

This improves efficiency and reduces the complexity of the script, simplifying loop management by assigning numbers to loop variables.
Implements a graceful shutdown mechanism for the registration script.

It introduces a soft shutdown via control port, followed by SIGTERM, and finally SIGKILL if the process persists beyond defined thresholds.

This prevents zombie processes and ensures clean termination.
Improves the registration script with detailed process
monitoring, logging, and screen dumping for better
visibility into the SIPp execution.

Adds expected timeline calculation, periodic status logging,
and proactive warnings for deviations, aiding in debugging
and performance analysis.

Features minute-based screen captures of SIPp output.
Modifies the script to better simulate user behavior by adding rate limiting and removing duration limits.
This ensures a more realistic test scenario.

Relates to API-321
Introduces a debug mode for the registration script.

Enables verbose logging and screen dumps for easier troubleshooting.
Adds more frequent status checks when debug mode is enabled.
Updates logging to include debug mode status.
Makes sed patterns idempotent by matching complete line states. Previous version would add comment markers on already-commented lines, causing infinite repetition of "RTP_DISABLED:" prefixes.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
Increases the percentage of agents allocated to a queue and raises the minimum agent count. This adjustment ensures better service capacity and more robust agent coverage within each queue, supporting anticipated increases in demand.
Reduces call pause duration for quicker test completion.
Cleans up SDP fmtp attribute formatting.
Shortens the timeout duration for BYE requests in the scenario.
Aims to accelerate test execution and improve script responsiveness, allowing for quicker completion of call teardown phases.
Adjusts the Opus RTP payload type to a more standard value in SIPp UAS scenarios. This helps prevent potential conflicts with other codecs.
Adds a fallback mechanism for identifying the server. When the server ID cannot be determined from metrics filenames (parsed as 'default'), it now checks for and uses the `TARGET_SERVER` environment variable. This improves compatibility for legacy single-server deployments that rely on `.env` configuration.
Introduces 113 tests across 10 test files covering utils, sipp-parser,
stats-tracker, randomdata, prometheus-metrics, config, nsapi, and
metrics-server HTTP endpoints. Achieves 100% coverage on prometheus-metrics,
98% on stats-tracker, 90% on config, 86% on sipp-parser, and 84% on utils.

https://claude.ai/code/session_01SahV3QSCR2m5P6ET97aeZq
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