Failed to push call stats, status code: 403 | ERROR TCMetricsPublisher | Twilio

陌路散爱 提交于 2019-12-05 19:58:27

Receiving status code: 403, usually suggests that you are providing the wrong credentials. Meaning, your account SID and Auth Token are either not supplied or you supplied the wrong ones.

You may want to validate that you are passing capability tokens properly. When you setup your capability token you need to use capability.allow_client_outgoing(application_sid) to enable outgoing calls.

from twilio.util import TwilioCapability

account_sid = "ACXXXXXXXXXXXXXXX"
auth_token = "secret"
application_sid = "AP123123"

capability = TwilioCapability(account_sid, auth_token)
capability.allow_client_incoming("tommy")
capability.allow_client_outgoing(application_sid)
print capability.generate()

If you find the former is set up correctly, some people have also run into this issue because they are not actually forwarding the call.

You are probably hearing this:

'Welcome to Twilio'

And then the call hangup. This is because your TwiML app is configured that way. If you would like to forward your call to another number. You have to configure your Twilio for call forwarding, like so:

<Response><Dial callerId='[replace with Twilio number]'>+86xxxxxxxxxxxxxx</Dial></Response>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!