Skip to content

SWML Connect/Dial: from_name Parameter #192

@briankwest

Description

@briankwest

SWML Connect/Dial: from_name Parameter

Overview

The from_name parameter sets the caller ID name (CNAM) on outbound SIP legs in connect and dial methods. It can be specified at the top level or per-device in serial/parallel arrays.
When specified at the top level, from_name is automatically inherited by all devices in serial, parallel, and serial_parallel arrays. A per-device from_name overrides the inherited value.

Note: from_name only applies to SIP device types. It has no effect on phone (PSTN) devices.

Parameter

Name Type Required Description
from_name string No Caller ID name to set on outbound SIP INVITE. When set at the top level, inherited by all devices unless overridden per-device.

Usage

Simple Connect

Set from_name on a single SIP connect:

version: 1.0.0
sections:
  main:
    - connect:
        from: "+15551000001"
        from_name: "Sales Department"
        to: "sip:agent@pbx.example.com"
        timeout: 30
        max_duration: 3600

The outbound SIP INVITE to agent@pbx.example.com will have caller ID name set to "Sales Department".

Serial Connect with Inherited from_name

Set from_name at the top level so all serial devices inherit it:

version: 1.0.0
sections:
  main:
    - connect:
        from: "+15551000001"
        from_name: "Support Team"
        timeout: 30
        max_duration: 3600
        serial:
          - to: "sip:agent1@pbx.example.com"
          - to: "sip:agent2@pbx.example.com"
          - to: "sip:agent3@pbx.example.com"

Each agent is tried sequentially. All three SIP INVITEs will have caller ID name "Support Team".

Serial Connect with Per-Device Override

Set a default from_name at the top level, then override it on specific devices:

version: 1.0.0
sections:
  main:
    - connect:
        from: "+15551000001"
        from_name: "Main Office"
        timeout: 30
        max_duration: 3600
        serial:
          - to: "sip:agent1@pbx.example.com"
          - to: "sip:agent2@pbx.example.com"
            from_name: "Billing Dept"
          - to: "sip:agent3@pbx.example.com"
  • agent1 and agent3 see caller ID name "Main Office" (inherited)
  • agent2 sees caller ID name "Billing Dept" (overridden)

Parallel Connect with Inherited from_name

Set from_name at the top level so all parallel devices inherit it:

version: 1.0.0
sections:
  main:
    - connect:
        from: "+15551000001"
        from_name: "Ring Group"
        timeout: 30
        max_duration: 3600
        parallel:
          - to: "sip:agent1@pbx.example.com"
          - to: "sip:agent2@pbx.example.com"
          - to: "sip:agent3@pbx.example.com"

All three agents are rung simultaneously. All SIP INVITEs will have caller ID name "Ring Group".

Parallel Connect with Per-Device Override

version: 1.0.0
sections:
  main:
    - connect:
        from: "+15551000001"
        from_name: "Company Default"
        timeout: 30
        max_duration: 3600
        parallel:
          - to: "sip:agent1@pbx.example.com"
          - to: "sip:agent2@pbx.example.com"
            from_name: "Priority Line"
          - to: "sip:agent3@pbx.example.com"
  • agent1 and agent3 see caller ID name "Company Default" (inherited)
  • agent2 sees caller ID name "Priority Line" (overridden)

Inheritance Rules

  1. If from_name is set at the top level and a device does not specify its own from_name, the top-level value is used.
  2. If a device specifies its own from_name, it takes precedence over the top-level value.
  3. If neither the top level nor the device specifies from_name, no caller ID name is set.
  4. These rules apply identically to connect and dial methods.
  5. These rules apply to serial, parallel, and serial_parallel routing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions