-
Notifications
You must be signed in to change notification settings - Fork 0
SWML Connect/Dial: from_name Parameter #192
Description
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_nameonly 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: 3600The 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"agent1andagent3see caller ID name "Main Office" (inherited)agent2sees 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"agent1andagent3see caller ID name "Company Default" (inherited)agent2sees caller ID name "Priority Line" (overridden)
Inheritance Rules
- If
from_nameis set at the top level and a device does not specify its ownfrom_name, the top-level value is used. - If a device specifies its own
from_name, it takes precedence over the top-level value. - If neither the top level nor the device specifies
from_name, no caller ID name is set. - These rules apply identically to
connectanddialmethods. - These rules apply to
serial,parallel, andserial_parallelrouting.