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 result code. This value is filled in only after the call ends. The variable is only 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 reports.

Call result codes:

1

Voicemail detector

2

Initiated by the callee

3

End of the scenario

200

The call was accepted

486

The number is busy

408

The callee has not answered

487

The callee has not answered

500

The callee has not answered

603

The call has been declined

404

Invalid number

480

The callee is unavailable

403

Call is forbidden

0

There was no call

4

The call was interrupted by the Stop button

  • {{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.