SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Setting Different Caller IDs for Twilio Flex Outbound Calls and Transfers

Objective

To guide users on how to configure Twilio Flex so that different outbound caller IDs (output numbers) are used when making outbound calls from the Flex dialpad or during call transfers, using Flex Plugins.

 

Product

Twilio Flex

 

Environment

Twilio Console

 

User Account Permission/Role(s) Required

  • Twilio Console access with Admin or Developer permissions
  • Ability to deploy and manage Flex Plugins

 

Procedure

  1. Understand Default Behavior:
    By default, Twilio Flex uses a pre-configured caller ID for all outbound calls made from the Flex dialpad. There is no built-in UI option for agents to select a different caller ID per call or per queue.
  2. Customizing Caller ID with a Flex Plugin:
  • To set different outbound numbers based on queue, agent, or other criteria, you need to develop a Flex Plugin.
  • Use the Flex Plugins CLI to create a new plugin or modify an existing one.
  • Override the StartOutboundCall action in your plugin code.
  • Set the callerId property dynamically based on your business logic (e.g., selected queue, agent, or a custom UI selection).

Example Code Snippet:

flex.Actions.replaceAction("StartOutboundCall", (payload, original) => {
  // Custom logic to determine the callerId
  payload.callerId = "+1234567890"; // Replace with dynamic logic as needed
  return original(payload);
});
  1. Customizing Caller ID for Transfers:
    • Similar logic can be applied to call transfer actions by overriding the relevant transfer actions in your plugin.
    • This allows you to control the caller ID presented during a transfer.
  2. Deploy and Test:
    • Deploy your plugin to your Flex environment.
    • Test outbound calls and transfers to ensure the correct caller ID is used according to your logic.

 

Additional Information

  • The native Flex dialpad does not support agent-to-agent direct calls or external transfers unless using the legacy dialpad.
  • Caller ID selection is not exposed as a UI option for agents; it must be set programmatically.
  • For more details on Flex Plugins, see the Twilio Flex Plugin documentation.
  • For information on call transfer logic, refer to the Flex End User Guide: Warm Transfer and Dialpad Use.

If you have further questions or need tailored code examples, consider reaching out to Twilio support.

Have more questions? Submit a request
Powered by Zendesk