使用Plivo API和Asp.Net Web API进行呼叫/记录

时间:2014-07-29 15:08:40

标签: xml record asp.net-web-api phone-call plivo

我正在尝试使用Plivo网络API。我想要实现的是通过plivo api进行调用并记录调用并将数据返回到存储到数据库中。

我想用以下节点创建xml文件,然后使用该文件记录调用。

任何人之前都尝试过这个api,并且有一些代码片段或步骤来实现这个功能,这将是一个很大的帮助。

<Response> <Wait> <Speak> <Record> <Dial> <Number>

1 个答案:

答案 0 :(得分:1)

我使用Plivo是新手,但如果你想记录一个你需要的电话,那就是AFAIK:

<Response>
    <Record action="http://www.example.com/get_recording/" startOnDialAnswer="true" redirect="false"/>
    <Dial>
      <Number>15551234567</Number>
    </Dial>
  </Response>

您可以像这样添加WaitSpeak标记:

<Response>
  <Wait length="10" />
  <Speak> Hello </Speak>
  <Record action="http://www.example.com/get_recording/" startOnDialAnswer="true" redirect="false"/>
  <Dial>
     <Number>15551234567</Number>
  </Dial>
</Response>

您将在RecordUrl上收到http://www.example.com/get_recording/参数,因此您可以将该网址保存在数据库中。