def connect_vapi(self):
logging.info("Instructing VAPI to connect")
response = client.create_call({'to': [{
"type": "websocket",
"uri": "ws://{host}/socket".format(host=CONFIG.host),
"content-type": "audio/l16;rate=16000",
"headers": {
"app": "audiosocket"
}
}],
'from': {'type': 'phone', 'number': CONFIG.phone_number},
'answer_url': ['https://{host}/ncco'.format(host=CONFIG.host)]})
logging.debug(repr(response))
self.vapi_connected = True
return True
评论列表
文章目录