1

我认为问题的标题毫无意义。让我在这里解释一下你的情况:

1)我打电话Twilio Broker bumber

2)Twilio使用以下代码将呼叫转移到给定号码。

#callToRN.XML
<?xml version="1.0" encoding="UTF-8" ?>
     <Response>     
       <Play>https://kaar-ma.com/1.wav</Play>
       <Dial action = "_actionURL">442-333-xxxx</Dial> 
     </Response>
</xml>

这连接给定的数字,即442-333-xxxx。现在我想在我的应用程序中添加一个新功能,即:

a) Someone picked the call.
b) He started to talk the caller.
c) Now he/she can transferred the call to  another four-five person simultaneously after pressing "#" key.
d) Or he/she can satisfy the caller and end the call.

为了捕捉这种情况,我TwiML在以下代码中调用了另一个Java

TwilioEnum reqst= TwilioEnum.valueOf(reqst);
    try {
        switch (reqst) {
        case hunting:
            output = CallHunting(request);
            break;

我将_actionURLin <Dial action = "_actionURL">442-333-xxxx</Dial>替换为baseURL + TwilioEnum.huntingwherebaseURLTwilio响应 in的 URL #callToRN.XML

方法定义hunting如下:

hunting(){
  FileBase = "/twilio.CallToAll.xml";
  output = readFile(FileBase );
  return output
}

现在请告诉我我应该在CallToAll.xmlTwiML 文件中进行哪些更改以便它允许我做a,b and c点?

#CallToAll.xml:
<?xml version="1.0" encoding="UTF-8" ?> 
<Response>     
  <Play>https://kaar-ma.com/1.wav</Play>
<Dial>4x2-xxx-7271</Dial>
<Dial>4x2-xxx-7271</Dial>
.....
</Response>

请建议我一个解决方案。

PS:一切Twilio Configuration都是正确的,因为调用/结束过程在应用程序中运行良好。

4

0 回答 0