Add from_name (caller ID name) to SWML connect#363
Open
Devon-White wants to merge 1 commit into
Open
Conversation
Add a from_name property to ConnectDeviceBase so the caller ID name (CNAM) can be set on outbound SIP legs in the SWML connect method. Because every serial/parallel/serial_parallel device is a ConnectDeviceSingle that inherits ConnectDeviceBase, from_name is available at the top level and per-device: the top-level value is inherited by each destination unless overridden. Applies to SIP calls only; no effect on calls to phone numbers. - specs: add from_name to ConnectDeviceBase, regenerate JSON schema - docs: document from_name at top level and per-destination, add an inheritance/override example
Contributor
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
Adds a
from_nameproperty to the SWMLconnectmethod, letting you set the caller ID name (CNAM) shown alongside thefromnumber on outbound SIP legs. No effect on calls to phone numbers.Because every
serial/parallel/serial_paralleldevice is aConnectDeviceSinglethat inheritsConnectDeviceBase, addingfrom_nameonce gives it both at the top level and per-destination — the top-level value is inherited by each destination unless that destination sets its ownfrom_name.Changes
from_name?: stringtoConnectDeviceBaseinspecs/swml/calling/Methods/connect/main.tsp; regenerate the JSON schema (tsp compile).from_nameat the top level and per-destination in theconnectreference page, with a focused YAML+JSON example showing top-level inheritance plus one per-device override. Descriptions written in plain, customer-facing language.Scope note — REST "dial" not included (intentional)
The REST Create Call ("dial") endpoint is a separate, Rails-validated model that does not reuse
ConnectDeviceBase. Its request contract (call/contracts/create.rb) whitelists onlyfromandcaller_idfor caller identity — there is no caller-ID-name parameter, and unknown keys are silently dropped. Addingfrom_nameto the REST spec would document unsupported API surface, so the REST spec is correctly left unchanged. Enabling CNAM on REST Create Call would require a backend change first.Verification
tsp compilesucceeds;from_nameemitted in all four Connect device defs in the generated JSON schema.fern check— 0 errors.