Skip to content

feat: follow the latest changes of the 2026-10-22 API document - #69

Merged
Skumring merged 2 commits into
prereleasefrom
feat/api-contract-update-2026-11
Nov 10, 2026
Merged

Skumring merged 2 commits into
prereleasefrom
feat/api-contract-update-2026-11

Conversation

@Skumring

Copy link
Copy Markdown
Contributor

Brings the SDK level with the latest changes of the 2026-10-22 API document.

What changes

Trunk media

  • SipConfiguration: codecs (List<Codec>, codec names in priority order) replaces the codec ids. New iceMode, rtcpMuxMode and rtcpFeedbackMode (DISABLED, ACCEPT, INITIATE).
  • VoiceOutTrunk: new codecs (List<VoiceOutCodec>, its own list), iceMode, rtcpMuxMode and rtcpFeedbackMode, on read, create and update.

Lowercase values

  • Pop: nyc, fra, lac, mia, sg, hk, ams.
  • Proof type entity_type: address, business, personal.
  • Export filters: new ExportServiceType (a2p, p2p); ExportTrunkType values are smpp_smsc, smpp_esme, sms_to_email, http_in (EMAIL is now SMS_TO_EMAIL); status values are snake_case. SDK enum constants in the filters map are sent as their wire values.

Rate limit

  • DidwwApiException.getRetryAfter() is the Retry-After of the answer, on API calls, export downloads and uploadEncryptedFile. A 429 is not retried automatically: check getHttpStatus() == 429 and wait getRetryAfter().
  • uploadEncryptedFile throws DidwwApiException on an error status instead of DidwwClientException.

Files

  • Price file and export downloads to a Path write to .didww-<hex>.tmp in the destination directory, so a long destination name no longer fails.

Docs and examples

  • Requirement mandatory fields are field names as the API spells them, tax_id instead of vat_id; price file columns Rate, Connection fee, Price; FILTERS.md lists the entity_type and export filter values; the migration section and "New in 5.0.0" cover these changes.

Checks

  • ./gradlew test javadoc compileExamplesJava on Java 11: 764 tests, 0 failures.
  • Checked against the API: an inbound SIP trunk created, read, updated and deleted with codecs and the media modes, Pop in lowercase, proof types and requirement fields in the new form, and a burst of requests answered with DidwwApiException 429 carrying getRetryAfter().

- Inbound SIP configuration: codecs (Codec names in priority order)
  replaces codec ids; new iceMode, rtcpMuxMode and rtcpFeedbackMode.
- Voice OUT trunks: new codecs (VoiceOutCodec), iceMode, rtcpMuxMode and
  rtcpFeedbackMode.
- Lowercase values: Voice IN trunk Pop, proof type entity_type, export
  filters service_type (ExportServiceType), trunk_type and status.
- DidwwApiException.getRetryAfter() from the Retry-After of the answer,
  on API calls, export downloads and encrypted file uploads; a 429 is not
  retried. uploadEncryptedFile throws DidwwApiException on an error status.
- Price file and export downloads use a short temp file name, so a long
  destination name no longer fails.
- README, FILTERS.md and examples: requirement mandatory fields, price
  file columns, migration notes.
@Skumring Skumring self-assigned this Nov 10, 2026
@Skumring
Skumring requested a balanced review from Copilot November 10, 2026 14:13
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8b9e68db-2d18-4814-a347-296bddcb5583

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The supplied review reports no active issues with the SDK’s API-contract update.

No open issues 🎉

What changed in this PR

Updates the DIDWW Java SDK to match the latest API 2026-10-22 contract, covering trunk media settings, wire values, error handling, and file downloads.

Changes:

  • Replaces inbound codec IDs with named codecs, adds outbound codecs and media modes, and aligns enum wire values.
  • Exposes Retry-After on API exceptions, standardizes upload errors, and shortens temporary download filenames.
  • Updates tests, fixtures, documentation, and examples for the revised API behavior.
File Description
src/​test/​resources/​fixtures/​voice_out_trunks/​update.json Adds updated outbound media values.
src/​test/​resources/​fixtures/​voice_out_trunks/​update_request.json Adds outbound media update payload.
src/​test/​resources/​fixtures/​voice_out_trunks/​show.json Adds outbound codec and mode response fields.
src/​test/​resources/​fixtures/​voice_out_trunks/​show_twilio.json Adds media defaults for Twilio authentication.
src/​test/​resources/​fixtures/​voice_out_trunks/​show_ip_only.json Adds media defaults for IP authentication.
src/​test/​resources/​fixtures/​voice_out_trunks/​index.json Adds media fields to listed trunks.
src/​test/​resources/​fixtures/​voice_out_trunks/​create.json Adds media settings to creation response.
src/​test/​resources/​fixtures/​voice_out_trunks/​create_twilio.json Adds media defaults to Twilio creation response.
src/​test/​resources/​fixtures/​voice_out_trunks/​create_request.json Adds codecs and modes to creation payload.
src/​test/​resources/​fixtures/​voice_in_trunks/​update_sip.json Replaces codec IDs and adds media modes.
src/​test/​resources/​fixtures/​voice_in_trunks/​update_sip_request.json Updates SIP media request fields.
src/​test/​resources/​fixtures/​voice_in_trunks/​index.json Updates codecs, modes, and lowercase point of presence.
src/​test/​resources/​fixtures/​voice_in_trunks/​create_with_pop.json Uses lowercase point-of-presence response value.
src/​test/​resources/​fixtures/​voice_in_trunks/​create_with_pop_request.json Uses lowercase point-of-presence request value.
src/​test/​resources/​fixtures/​voice_in_trunks/​create_sip_with_rerouting.json Updates SIP codecs and media modes.
src/​test/​resources/​fixtures/​voice_in_trunks/​create_sip_with_rerouting_request.json Updates SIP creation media payload.
src/​test/​resources/​fixtures/​voice_in_trunk_groups/​index.json Updates included trunks’ media fields.
src/​test/​resources/​fixtures/​voice_in_trunk_groups/​create.json Updates grouped trunks’ media fields.
src/​test/​resources/​fixtures/​proofs/​create.json Uses lowercase proof entity type.
src/​test/​resources/​fixtures/​proof_types/​index.json Uses lowercase proof entity types.
src/​test/​resources/​fixtures/​exports/​create_sms_in.json Uses lowercase export trunk filters.
src/​test/​resources/​fixtures/​exports/​create_sms_in_request.json Updates export filter request values.
src/​test/​resources/​fixtures/​emergency_requirements/​show.json Uses current mandatory-field names.
src/​test/​resources/​fixtures/​emergency_requirements/​index.json Aligns mandatory-field names and lists.
src/​test/​resources/​fixtures/​address_requirements/​show.json Updates mandatory fields and proof entity values.
src/​test/​resources/​fixtures/​address_requirements/​index.json Uses field names and empty requirement lists.
src/​test/​java/​com/​didww/​sdk/​TooManyRequestsTest.java Tests retry metadata and non-retried 429 responses.
src/​test/​java/​com/​didww/​sdk/​support/​ObservedBody.java Adds download-progress observation helper.
src/​test/​java/​com/​didww/​sdk/​resource/​VoiceOutTrunkTest.java Tests media settings and codec order.
src/​test/​java/​com/​didww/​sdk/​resource/​VoiceInTrunkTest.java Tests named codecs, modes, and removed codec-ID accessors.
src/​test/​java/​com/​didww/​sdk/​resource/​ProofTypeTest.java Verifies lowercase proof entity types.
src/​test/​java/​com/​didww/​sdk/​resource/​ExportTest.java Tests revised export filter values.
src/​test/​java/​com/​didww/​sdk/​resource/​enums/​EnumWireValuesTest.java Verifies codec, mode, and filter serialization.
src/​test/​java/​com/​didww/​sdk/​resource/​EmergencyRequirementTest.java Verifies revised mandatory-field lists.
src/​test/​java/​com/​didww/​sdk/​resource/​AddressRequirementTest.java Verifies mandatory fields and proof entity values.
src/​test/​java/​com/​didww/​sdk/​prices/​PriceFileTest.java Tests short temporary names and long destinations.
src/​test/​java/​com/​didww/​sdk/​prices/​PriceFileReaderTest.java Aligns CSV column expectations.
src/​test/​java/​com/​didww/​sdk/​ExportDownloadTest.java Tests long export destination filenames.
src/​test/​java/​com/​didww/​sdk/​EncryptedFileUploadTest.java Expects API exceptions for upload error statuses.
src/​main/​java/​com/​didww/​sdk/​resource/​VoiceOutTrunk.java Adds codecs and tracked media-mode setters.
src/​main/​java/​com/​didww/​sdk/​resource/​ProofType.java Documents lowercase entity types.
src/​main/​java/​com/​didww/​sdk/​resource/​Identity.java Documents the requirement tax_id mapping.
src/​main/​java/​com/​didww/​sdk/​resource/​Export.java Documents enum filters and current wire values.
src/​main/​java/​com/​didww/​sdk/​resource/​enums/​VoiceOutCodec.java Defines outbound codec wire values.
src/​main/​java/​com/​didww/​sdk/​resource/​enums/​RtcpMuxMode.java Defines RTCP multiplexing modes.
src/​main/​java/​com/​didww/​sdk/​resource/​enums/​RtcpFeedbackMode.java Defines RTCP feedback modes.
src/​main/​java/​com/​didww/​sdk/​resource/​enums/​Pop.java Serializes point-of-presence values in lowercase.
src/​main/​java/​com/​didww/​sdk/​resource/​enums/​IceMode.java Defines ICE negotiation modes.
src/​main/​java/​com/​didww/​sdk/​resource/​enums/​ExportTrunkType.java Updates wire values and renames the email constant.
src/​main/​java/​com/​didww/​sdk/​resource/​enums/​ExportServiceType.java Defines SMS export service types.
src/​main/​java/​com/​didww/​sdk/​resource/​enums/​Codec.java Replaces integer codec values with names.
src/​main/​java/​com/​didww/​sdk/​resource/​EmergencyRequirement.java Documents current mandatory-field names.
src/​main/​java/​com/​didww/​sdk/​resource/​configuration/​SipConfiguration.java Replaces codec IDs and adds media modes.
src/​main/​java/​com/​didww/​sdk/​resource/​AddressRequirement.java Documents mandatory-field names and tax mapping.
src/​main/​java/​com/​didww/​sdk/​repository/​ReadOnlyRepository.java Carries retry metadata into API exceptions.
src/​main/​java/​com/​didww/​sdk/​prices/​PricesService.java Shares retry parsing and documents temporary filenames.
src/​main/​java/​com/​didww/​sdk/​prices/​PriceFileReader.java Updates documented CSV header examples.
src/​main/​java/​com/​didww/​sdk/​internal/​RetryAfter.java Centralizes seconds-based retry-header parsing.
src/​main/​java/​com/​didww/​sdk/​internal/​AtomicFile.java Uses fixed-length temporary filenames.
src/​main/​java/​com/​didww/​sdk/​exception/​DidwwApiException.java Adds retry duration constructors and accessor.
src/​main/​java/​com/​didww/​sdk/​DidwwClient.java Standardizes upload errors and exposes retry metadata.
README.md Updates API usage, migration, and error guidance.
FILTERS.md Documents current proof and export filter values.
examples/​src/​main/​java/​com/​didww/​examples/​VoiceOutTrunksExample.java Demonstrates outbound codecs and ICE.
examples/​src/​main/​java/​com/​didww/​examples/​VoiceInTrunkSipRegistrationExample.java Uses the named-codec setter.
examples/​src/​main/​java/​com/​didww/​examples/​VoiceInTrunkGroupsExample.java Updates grouped SIP trunk codec configuration.
examples/​src/​main/​java/​com/​didww/​examples/​TrunksExample.java Demonstrates named codecs and ICE.
examples/​src/​main/​java/​com/​didww/​examples/​PricesDownloadExample.java Reads the current Rate column.
examples/​src/​main/​java/​com/​didww/​examples/​IdentityAddressProofsExample.java Selects proof types using lowercase values.
examples/​src/​main/​java/​com/​didww/​examples/​ExportsSmsExample.java Demonstrates typed export filters.
examples/​src/​main/​java/​com/​didww/​examples/​EmergencyRequirementsExample.java Displays all mandatory-field lists.
examples/​src/​main/​java/​com/​didww/​examples/​DidTrunkAssignmentExample.java Uses the named-codec setter.
examples/​README.md Updates trunk example descriptions.

Review effort: Balanced

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the SDK’s API-contract update.

No open issues 🎉

Review effort: Balanced

@Skumring
Skumring merged commit 41304ee into prerelease Nov 10, 2026
7 checks 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