09 Transfer Parameters: `blxferVariables`
09 Transfer Parameters: blxferVariables
blxferVariablesblxferVariables is used to pass channel variables in transfer operations such as blxfer() (blind transfer). Common use cases include cross-department transfers and SIP header passthrough.
1. Data structure
- Type:
ChannelVariable[] - Max items: up to 5
Example:
[
{ "name": "mainUniqueId", "value": "${cdr_main_unique_id}", "type": 2 },
{ "name": "userFiled", "value": "${BASE64_ENCODE(${cdr_main_unique_id})}", "type": 2 }
]Field meanings (aligned with 06-Types.md):
| Field | Meaning |
|---|---|
| name | Variable name |
| value | Variable value (channel variable value or SIP header value) |
| type | Variable type (see below) |
2. type values
type values| type | Category | Notes |
|---|---|---|
| 1 | Normal channel variable | Supports ${} references to existing channel variables |
| 2 | SIP header variable | When placing a call, the system may prepend X-Asterisk- to the header name; P-Tinet- keeps its prefix; P-User- indicates a custom header name with automatic prefix removal |
| 3 | Normal variable (auto-wrap value with ${}) | For downstream systems that do not accept ${} in input |
| 4 | SIP header (auto-wrap value with ${} and no prefix per convention) | For downstream systems that do not accept ${} in input |
2.1 type=1 (channel variable)
[{ "name": "userFiled", "value": "111222", "type": 1 }]
[{ "name": "userFiled", "value": "${cdr_main_unique_id}", "type": 1 }]2.2 type=2 (SIP header variable)
Two common patterns for value:
// Pattern A: client encodes base64
[{ "name": "userFiled", "value": "MTExMjIy", "type": 2 }]
// Pattern B: server-side expression does BASE64_ENCODE (common for passing a local-department variable cross-department)
[{ "name": "userFiled", "value": "${BASE64_ENCODE(${cdr_main_unique_id})}", "type": 2 }]Header naming rules (summary):
- Name
abc→ actual headerX-Asterisk-abc - Name starts with
P-Tinet-→ keep header name asP-Tinet-xxx - Name starts with
P-User-→ remove the prefix and send header asxxx
3. Cross-department caller ID (example)
By default, the caller ID may be the outbound caller ID of the originating department. If you want the customer’s real number to be used as caller ID:
{ "name": "cust_callee_clid", "value": "${cdr_customer_number}", "type": 1 }4. How the destination department retrieves values (examples)
4.1 Read SIP header in an IVR variable node
Variable name: parent_unique_id
Variable value: ${PJSIP_HEADER(read,X-Asterisk-parent_unique_id)}
Value type: expression4.2 Decode the value in HTTP interaction / hangup push
parent_unique_id=${BASE64_DECODE(${parent_unique_id})}Updated 4 days ago