feat: complete V3.5 SipConfiguration attributes for API 2026-04-16#51
Open
feat: complete V3.5 SipConfiguration attributes for API 2026-04-16#51
Conversation
Bring the Java SipConfiguration in line with the V3.5 server form.
Splits into two pieces:
1. Five writable V3.5 attributes that were missed during the original
2026-04-16 rollout (declared on the server form, exercised in the
server's request specs, but absent from both the SDK and the
public Postman collection):
- enabledSipRegistration (Boolean) -- enables SIP registration;
the server then generates incoming_auth_* credentials and
rejects a non-blank port.
- useDidInRuri (Boolean) -- DID number in R-URI; requires SIP
registration enabled.
- networkProtocolPriority (enum) --
force_ipv4 | force_ipv6 | any | prefer_ipv4 | prefer_ipv6.
- diversionInjectMode (enum) -- none | did_number.
- cnamLookup (Boolean) -- enables CNAM resolution.
2. Two read-only attributes returned when SIP registration is
enabled:
- incomingAuthUsername
- incomingAuthPassword
Both are server-generated and only present in responses; the API
returns 400 Param not allowed if a client tries to write them.
Annotated with @JsonProperty(access = WRITE_ONLY) so Jackson
deserializes them from server responses but never echoes them
back when serializing the configuration to a request body.
Bump to 4.0.1.
Sandbox testing confirmed that when enabled_sip_registration is true, both 'host' and 'port' must be blank (server returns 422 otherwise). And when disabling sip_registration on an existing trunk, the same PATCH must also set 'host' to a non-blank value and 'use_did_in_ruri' to false.
Captured wire shape from sandbox: when enabled_sip_registration is true, host/port/username come back as null. Drop the misleading host='example.com' from the test fixtures and reflect the real read-shape.
The 2026-04-16 server returns six new keys on every SIP configuration response: network_protocol_priority, enabled_sip_registration, use_did_in_ruri, diversion_relay_policy, diversion_inject_mode, cnam_lookup, incoming_auth_username, incoming_auth_password. Patch every existing voice_in_trunks SIP-response fixture to include the V3.5 default shape captured against the live sandbox API.
Demonstrates user-facing usage of the new V3.5 SIP-configuration attributes by setting them in the SIP create-with-rerouting test and updating the matching request fixture.
- create-with-rerouting: send use_did_in_ruri=false (documents field; server returns 422 if true without enabled_sip_registration). Align response fixture diversion_relay_policy=as_is and cnam_lookup=true to match what the request sends. - New testCreateWithEnabledSipRegistrationReturnsPopulatedIncomingAuthCredentials: asserts that when SDK sends enabled_sip_registration=true, the response surfaces server-generated incoming_auth_username and incoming_auth_password as populated (not null).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Completes the V3.5 (
2026-04-16)SipConfigurationattribute set. Mirrors the Ruby reference PR #80.5 writable attributes (missed during the original 2026-04-16 rollout)
These exist on the server form (
apps/v3_api/app/forms/v3_5/voice_in_configuration/sip_form.rb), are exercised in the server'svoice_in_trunks_controller_spec.rb, and are listed in the public 2026-04-16 changelog, but were absent from both this SDK and the public Postman collection. Per project source-of-truth ranking (server > rspec > Postman), server is authoritative — added all five:enabledSipRegistrationenabled_sip_registrationBooleanuseDidInRuriuse_did_in_ruriBooleannetworkProtocolPrioritynetwork_protocol_priorityNetworkProtocolPriorityenumdiversionInjectModediversion_inject_modeDiversionInjectModeenumcnamLookupcnam_lookupBooleanTwo new enums added:
DiversionInjectMode—none,did_numberNetworkProtocolPriority—force_ipv4,force_ipv6,any,prefer_ipv4,prefer_ipv62 read-only attributes
Server-generated, returned only when
enabledSipRegistration: true:incomingAuthUsernameincomingAuthPasswordThe API rejects writes (
400 Param not allowed). Both fields are annotated with@JsonProperty(access = JsonProperty.Access.WRITE_ONLY), which in Jackson's terminology means "deserialize from JSON, never serialize back to JSON" — exactly the read-only-on-write semantics required.Misc
4.0.1inbuild.gradle.kts.Test plan
./gradlew test— passesSipConfigurationthat has the 2 read-only fields populated (simulating round-trip after a GET); assert the resulting JSON does NOT includeincoming_auth_username/incoming_auth_password. This is the regression-prevention test for the read-only contract.4.0.1, JitPack auto-builds, publish GitHub Release