Variable

Overview

VoIPBIN provides a powerful feature called Variables, enabling users to define, manipulate, and reference dynamic values throughout the lifecycle of a flow execution. Variables act as flexible placeholders for data that may change over time—such as user input, call metadata, or results from other applications—and can be injected into any compatible action in the flow.

This mechanism introduces contextual awareness and reactivity to flow logic, allowing users to build intelligent, data-driven call and messaging workflows that adapt in real time to current conditions and external inputs.

Using Variables in Flows

Variables can be used within flow actions by referencing them using the following syntax:

Hello, ${voipbin.call.destination.name}.

-> Hello, Batman.

At runtime, VoIPBIN resolves this placeholder and replaces it with the actual value stored in the variable. This process occurs at the time the action is executed, ensuring that the most up-to-date value is used—even if the variable was set earlier or modified by another action.

Variable substitution

Variables can be used in any field that supports templating. For example:

  • Setting dynamic text in TTS or message actions

  • Referencing phone numbers or user identifiers for routing or lookup

  • Embedding values in external API calls via webhooks

  • Controlling logic in conditional (branch) or fork actions

VoIPBIN supports nested variables and safely resolves deep paths like:

Hello, ${voipbin.invalid.variable}.

-> Hello, .

If a variable does not exist or is null, the placeholder will be replaced with an empty string unless otherwise specified.

Capturing and Setting Dynamic Values

Variables can be populated in several ways:

Automatically by the system

VoIPBIN injects key metadata about the call or message, such as:

  • voipbin.call.source.name

  • voipbin.call.destination.number

  • voipbin.message.source.number

By actions within the flow

Certain actions can store values as variables based on runtime results:

  • transcribe can store transcription results

  • recording can store the recording info

  • queueing can store the queueed call info.

Manually via variable_set action

Developers can explicitly define or override values in the flow.

{
    "type": "variable_set",
    "option": {
        "key": "user_selected_option",
        "value": "some_value"
    }
}

Variables set during execution are scoped to the current flow instance, meaning they persist only during the lifetime of that flow unless explicitly passed elsewhere.

Integration with Applications

Each application in VoIPBIN can expose its own set of variables, which can be used by other parts of the flow. For example:

  • Call Application: Sets variables like caller name, number, codec, and session info.

  • SMS Application: Sets sender/receiver numbers and message content.

  • AI and Chatbot Actions: Store extracted entities, intent, and raw responses.

  • Webhook Application: Allows injection of third-party data as variables.

Email, Recording, or Summary Services: Can expose post-processing data such as email status or transcription content.

Variables act as a shared communication layer between applications. This allows a webhook that receives CRM data to feed into an AI chatbot, or enables a transcription result to be emailed after a call ends—all within the same flow logic.

Best Practices and Considerations

  • Always validate input: Use branch or conditional logic to handle cases where variables may be missing or malformed.

  • Avoid name collisions: Prefer namespaced keys (e.g., user.profile.email) to reduce risk of overwriting important data.

  • Debugging: Use logging or flow monitoring to inspect variable states at different stages.

  • Data persistence: Variables do not persist beyond a single flow execution unless saved externally (e.g., via webhook or external DB).

In conclusion, VoIPBIN’s Variable system is a core feature that enables dynamic, data-aware flows. By using variables effectively, developers can create tailored communication experiences that respond intelligently to the context of each interaction—whether through voice, messaging, or external integrations.

Variable

Activeflow

  • voipbin.activeflow.id: Activeflow’s ID.

  • voipbin.activeflow.reference_type: Activeflow’s reference type.

  • voipbin.activeflow.reference_id: Activeflow’s reference ID.

  • voipbin.activeflow.reference_activeflow_id: Activeflow’s reference activeflow id.

  • voipbin.activeflow.flow_id: Activeflow’s flow id.

Call

Source address

  • voipbin.call.source.name: Source address’s name.

  • voipbin.call.source.detail: Source address’s detail.

  • voipbin.call.source.target: Source address’s target.

  • voipbin.call.source.target_name: Source address’s target name.

  • voipbin.call.source.type: Source address’s type.

Destination address

  • voipbin.call.destination.name: Destination address’s name.

  • voipbin.call.destination.detail: Destination address’s detail.

  • voipbin.call.destination.target: Destination address’s target.

  • voipbin.call.destination.target_name: Destination address’s target name.

  • voipbin.call.destination.type: Destination address’s type.

Others

  • voipbin.call.direction: Call’s direction.

  • voipbin.call.master_call_id: Call’s master call id.

  • voipbin.call.digits: Call;s received digits.

Message

Source address

  • voipbin.message.source.name: Source address’s name.

  • voipbin.message.source.detail: Source address’s detail.

  • voipbin.message.source.target: Source address’s target.

  • voipbin.message.source.target_name: Source address’s target name.

  • voipbin.message.source.type: Source address’s type.

Target destination address

  • voipbin.message.target.destination.name: Destination address’s name.

  • voipbin.message.target.destination.detail: Destination address’s detail.

  • voipbin.message.target.destination.target: Destination address’s target.

  • voipbin.message.target.destination.target_name: Destination address’s target name.

  • voipbin.message.target.destination.type: Destination address’s type.

Message

  • voipbin.message.id: Message’s id.

  • voipbin.message.text: Message’s text.

  • voipbin.message.direction: Message’s direction.

Queue

Queue info

  • voipbin.queue.id: Entered Queue’s ID.

  • voipbin.queue.name: Entered Queue’s name.

  • voipbin.queue.detail: Entered Queue’s detail.

Queuecall info

  • voipbin.queuecall.id: Created Queuecall’s ID.

  • voipbin.queuecall.timeout_wait: Created Queuecall’s wait timeout

  • voipbin.queuecall.timeout_service: Created Queuecall’s service timeout.

AI Call

  • voipbin.aicall.id: Created AI Call’s ID.

  • voipbin.aicall.ai_id: Created AI Call’s AI ID.

  • voipbin.aicall.ai_engine_model: Created AI Call’s AI engine model.

  • voipbin.aicall.confbridge_id: Created AI Call’s confbridge ID.

  • voipbin.aicall.gender: Created AI call’s voice gender.

  • voipbin.aicall.language: Created AI call’s voice language.

AI Summary

  • voipbin.ai_summary.id: Created AI Summary’s ID.

  • voipbin.ai_summary.reference_type: Created AI Summary’s reference type.

  • voipbin.ai_summary.reference_id: Created AI Summary’s reference ID.

  • voipbin.ai_summary.language: Created AI Summary’s language.

  • voipbin.ai_summary.content: Created AI Summary’s content.

Recording

  • voipbin.recording.id: Created Recording’s ID.

  • voipbin.recording.reference_type: Created Recording’s reference type.

  • voipbin.recording.reference_id: Created Recording’s reference ID.

  • voipbin.recording.format: Created Recording’s format.

  • voipbin.recording.recording_name: Created Recording’s name.

  • voipbin.recording.filenames: Created Recording’s filenames.

Transcribe

  • voipbin.transcribe.id: Created Transcribe’s ID.

  • voipbin.transcribe.language: Created Transcribe’s language.

  • voipbin.transcribe.direction: Created Transcribe’s direction.