1. Create an Omni-Channel Flow.
2. Use InvokeTelephonyIntegrationApiFunction lambda from the Contact Flow.
The lambda function after executing Omni-Channel Flow will return Agent ARN if the Omni-Channel Flow Routed to an Agent or Queue ARN if it is routing to a Queue.Use Set contact attributes to capture the ARN Values.
Use the Agent or Queue ARN in the Set working queue before calling the Transfer to Queue block to route the Voice Call.
3. Make sure the Queues used in the Salesforce Omni-Channel Flow are mapped under Queue Mapping in the Contact Center.
4. Make sure Contact Center Channels have an entry for the Phone Number and Omni-Channel Flow.