Twilio Gather,如何恢复正在进行的通话?

时间:2017-06-16 15:54:01

标签: python twilio

我的twilio工作流程如下:

# dial the number, include a whisper 
<Response>
  <Dial action="/calls/call-complete/">
    <Number url="/calls/whisper/">18325555555</Number>
  </Dial>
</Response>


/calls/whisper
# press any key and connect the call otherwise hangup
<Response>
  <Gather action="/calls/gather-result/" method="POST" numDigits="1" 
  timeout="3">
    <Say voice="alice">You are receiving a call, press any key to 
    accept</Say>
  </Gather>
  <Hangup/>
</Response>

/calls/gather-result
# returns an empty response if no digits were entered
<Response/>

/calls/gather-result
# python code
 r = VoiceResponse()
 if 'Digits' in req and not req['Digits']:
    r.hangup
 return r

我的想法是,在您输入任何密钥后,呼叫将继续并在呼叫/收集结果/空响应之后连接,但是两条线路都保持振铃从不连接。

如何在收集提示后连接正在进行的通话?

0 个答案:

没有答案
相关问题