我通过 Twilio 拨打电话不太走运……我希望在办公室时点击一个按钮,让我接通我在网页中输入的客户号码。
我可以做“点击通话”: http: //www.twilio.com/docs/howto/click-to-call,但那是让用户给公司打电话 - 我要的是我的公司电话给用户打电话。
我认为这是在 InitiateOutboundCall 中设置 From/To 字段并将 URL 字段留空的简单案例。它根本没有用。
然后我尝试了一个空的 XML 页面,因为我想“当呼叫连接时,我不希望系统做任何其他事情,比如说一条消息,我只想让两个人说话!
例如:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Response> </Response>
当我这样做时,客户的电话响了,上面写着“X公司”,但是当电话被拿起时它响了,
我试过这个:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Response>
<Dial>
<Number>123456</Number>
</Dial>
</Response>
它先拨通了客户的电话,然后拨通了员工的电话——但这就是我上面提到的点击通话。
请帮忙!
Protected sub makeCall()
Dim options As New CallOptions()
Dim ACCOUNT_SID = ""
Dim AUTH_TOKEN = ""
options.Url = xxxxxxxxxxxxxxxxxxxx?
options.From = "+Number listed in Twilio callers page"
options.To = "+My mobile number"
WriteLine(""):WriteLine(""):WriteLine("")
Dim TwilClient As New TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
WriteLine("TwilClient created.")
Dim outboundCall = TwilClient.InitiateOutboundCall(options)
WriteLine("Call created.")
WriteLine("Call status: " & outboundCall.Status)
If Not IsNothing(outboundCall.RestException )
WriteLine("ERROR!: " & outboundCall.RestException.Message)
End If
IndentLevel +=1
WriteLine("")
WriteLine("SID: " & outboundCall.Sid)
Session("mycallsid") = outboundCall.Sid
Unindent
End Sub