Rate this page:

Using standard variables

Standard variables are the default system variables built in the Scenario editor which you can call in your scripts. Standard variables store the information the system tracks automatically, such as caller’s phone number or agent's name.

Supported standard variables:

  • {{CALL.variable}}

  • {{AGENT.variable}}

  • {{HEADERS.variable}}

CALL object

Copy URL

The CALL object stores variables required to start and process a call.

CALL variables:

  • {{CALL.phone_a}} – Caller's phone number (for outbound calls – it is your Сaller ID).

  • {{CALL.phone_b}} – Recipient's phone number (for outbound calls – it is {{phone}}).

  • {{CALL.record_url}} – Call recording URL (if the call recording is enabled). You can use it to pass the call recording to the customer’s data base, if required.

  • {{CALL.id}} – Call attempt identifier. This value is filled in only after the call ends. The variable is only used in HTTP-requests upon scenario completion (Outbound call block). In other cases, this value is empty.

  • {{CALL.result_code}} – Call attempt result code. This value is filled in only after the call ends. The variable is used in HTTP-requests upon scenario completion. It helps you evaluate whether a customer dropped the call, or the scenario reached its ending point. Call result codes are available in call history.

Call attempt result codes:

Code

Attempt result

Campaign type

Description

1

Voicemail detected

Automated and agent campaigns

For automated campaigns, the code defines that the call was redirected to the callee's answer machine. For agent campaigns, the code defines that the call was accepted by an answer machine only if the Voicemail detection switch is enabled in the campaign settings. If the switch is disabled, the call is considered answered.

2

Initiated by the callee

Automated and agent campaigns

For automated campaigns, the code defines that the callee dropped the call in the scenario. For agent campaigns, the code defines that the customer dropped the call while waiting in the queue for an available agent.

3

End of the scenario

Automated campaigns

The scenario reached its ending point according to the predifined flow.

200

The call answered

Automated and agent campaigns

The callee answered the call.

486

The number is busy

Automated and agent campaigns

The callee was talking on the phone or dropped the call.

408, 487, 500

The callee didn’t answer

Automated and agent campaigns

The destination phone number was switched off.

603

The call declined

Automated and agent campaigns

The callee did not answer or dropped the call.

404

Invalid number

Automated and agent campaigns

Incorrect destination phone number.

480

The callee is unavailable

Automated and agent campaigns

The destination phone number is unavailable (switched off or out of network coverage).

403

Call not allowed

Automated and agent campaigns

The destination phone number is in the DNC list, dialing not allowed.

0

No call performed

Automated and agent campaigns

The call was interrupted before reaching the callee.

4

The call interrupted by the Stop button

Automated campaigns

The call was interrupted by the "Stop" button while testing the scenario. Does not display in the call history.

5

Failed to reach an agent

Agent campaigns

The campaign failed to reach an agent.

610

Telecom operator error

Automated and agent campaigns

The campaign failed to reach a customer due to telecom operator issues.

  • {{CALL.attempt_num}} – Call attempt number. The variable is only applicable for dialing campaigns. For other calls, the value is 1.

  • {{CALL.session_id}} - Voximplant session ID.

  • {{CALL.callerid}} – This value is the same as {{CALL.phone_a}} but differs for SIP inbound calls.

  • {{CALL.destination}} – This value is the same as {{CALL.phone_b}} but differs for SIP inbound calls.

  • {{CALL.display_name}} – Display name in SIP calls. In PSTN, it matches the caller's phone number.

  • {{CALL.fromURI}} – Callers' SIP URI in inbound SIP calls.

  • {{CALL.toURI}} – Recipient's SIP URI in inbound SIP calls.

  • {{CALL.IVR_RESULT_X}} – Customer's response message recognized in the Interactive menu block, where X is the number of block repetitions (from 1 to 4). The variable gets reset every time the scenario reaches the Interactive menu block.

AGENT object

Copy URL

The AGENT object stores the information about the agent who answered the call in the Call to Queue block.

AGENT variables:

  • {{AGENT.id}} – The identifier of the agent who answered the call from queue.

  • {{AGENT.full_name}} - Agent's full name. The value is taken in the Personal settings.

  • {{AGENT.first_name}} - Agent's first name. The value is taken in the Personal settings.

  • {{AGENT.middle_name}} - Agent's middle name. The value is taken in the Personal settings.

  • {{AGENT.last_name}} - Agent's last name. The value is taken in the Personal settings.

  • {{AGENT.username}} – Agent's username. A username usually looks like admin or user-123.

  • {{AGENT.email}} – Agent's email address. The value is taken from the Email address field in the Personal settings.

HEADER object

Copy URL

When a call is received via SIP, you may also receive meaningful headers with it.

By default, all headers are stored in the {{HEADERS}} variable.

Voximplant Kit can process the following headers:

  • X - A SIP header that begins with X can be used to convey any information. For example, an X-Header is often used to convey a subscriber account number for billing.

  • P - P-Headers are special header fields whose applicability is limited to private networks with a certain topology and characteristics of lower layers' protocols.

  • Diversion - The diversion header contains the redirection information of the call, including the reason for diversion.

All headers are stored in a single variable and may look like this: {“X-name”:”value”, “X-time”:”int”}.

To access header information, use the general variable {{HEADERS}}. For example, to get the value of the “X-name” header, call {{HEADERS.X-name}}.

From the Voximplant Kit side, you can ONLY send X-Headers in SIP call transfers.