Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Dynamic Telephony Transfer

 

Hey there,

I'm trying to transfer calls to a phone number that changes dynamically. I'm getting this number from a tool that's run by a playbook, and the whole thing is set up in a Dialogflow flow using the newest features.

Unfortunately, the phone number doesn't seem to be working in the Dialogflow interface. It's not accepting the parameter when I try to use it for the transfer.

Has anyone else had this issue? Is there any workaround?image.png

 

Solved Solved
0 1 120
1 ACCEPTED SOLUTION

Hi @KenethM1,

Welcome to Google Cloud Community!

The issue arises because Dialogflow validates phone numbers during design, not runtime, causing errors when using dynamically generated numbers.

The possible solution is to use a fulfillment webhook. Instead of directly setting the phone number in the "Telephony transfer call" response within the Dialogflow interface, configure your flow to call a fulfillment webhook/function. This allows you to:

  • Receive the dynamic phone number from Dialogflow.
  • Construct the "Telephony Transfer Call" response within the webhook, using the retrieved phone number.
  • Send the response back to Dialogflow, initiating the call transfer.

This approach enables dynamic phone number handling by shifting the transfer logic to runtime where the actual phone number is available.

You can also read the following documentation for more details:

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

View solution in original post

1 REPLY 1

Hi @KenethM1,

Welcome to Google Cloud Community!

The issue arises because Dialogflow validates phone numbers during design, not runtime, causing errors when using dynamically generated numbers.

The possible solution is to use a fulfillment webhook. Instead of directly setting the phone number in the "Telephony transfer call" response within the Dialogflow interface, configure your flow to call a fulfillment webhook/function. This allows you to:

  • Receive the dynamic phone number from Dialogflow.
  • Construct the "Telephony Transfer Call" response within the webhook, using the retrieved phone number.
  • Send the response back to Dialogflow, initiating the call transfer.

This approach enables dynamic phone number handling by shifting the transfer logic to runtime where the actual phone number is available.

You can also read the following documentation for more details:

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.