Proxy Overwritting Incoming Phone Number Webhooks

Twilio Proxy needs a phone number to function. When configuring a phone number through the Twilio Console to make use of Proxy there is some logic that happens behind the scenes you should be aware of.

 

The Issue

By Default when using the Twilio Console to configure proxy, Proxy will attempt to update both the Voice and SMS incoming webhook URLS. To customize your Proxy experience to make use of just voice or just messaging while you send the other communication to some function, studio flow, etc or vice versa to go through proxy you will need to follow the instructions below. If your updating a phone number to make use of both Voice and Messaging you can follow the instructions we outline in the proxy quickstart guide.

 

In order to update only one of the phone number webhooks follow the instructions below.

 

The Solution

Some customers may find their Phone Number webhook is overwritten with the proxy configuration and when they go to add the webhook it overwrites the proxy integration. In order to get around this situation:

mceclip1.png

  • Select the phone number from the list and click the assign button.

mceclip2.png

mceclip3.png

  • Run the following API command to update the incoming webhook URL replacing with your Phone Number Sid(PNXXX):
    • For Voice/Fax Calls
      twilio api:core:incoming-phone-numbers:update \
      --sid PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
      --voice-url https:/somewebhookurl.com
    • For SMS/Messaging Texts
      twilio api:core:incoming-phone-numbers:update \
      --sid PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
      --sms-url https:/somewebhookurl.com
  • Verify your proxy and webhook are working by calling and texting the number you configured earlier. Is everything working as expected? Great! If not please see the still having trouble section.

 

The Solution for Studio Flows

  • To update the webhook to a studio service go to the Studio -> Flows page
  • Select the studio name you would like to forward calls or text messages to.
  • Click the trigger box.
  • Copy the webhook URL.

mceclip0.png

  • Run the webhook api command from the solution section only this time replace the webhook url with the Studio Flow webhook we copied earlier.
    • For example to update the voice webhook to redirect to studio:
      twilio api:core:incoming-phone-numbers:update \
      --sid PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
      --voice-url https://webhooks.twilio.com/v1/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • Verify your proxy and studio webhook are working by calling and texting the number you configured earlier. Is everything working as expected? Great! If not please see the still having trouble section.

 

Still Having Trouble?

If you can rule out all the above issues, Twilio's Support team can help investigate what went wrong with configuring your proxy service. Please open a support request with the following:

  • Phone Number SIDs (PNxxxx) from Active Number logs that occurred with the last 24 hours.
  • A screenshot of your Proxy -> Service -> ServiceName -> Numbers page configuration.
Have more questions? Submit a request
Powered by Zendesk