こんにちは、こんにちは。疑問に迫る会議通話中に番号に電話をかけ、その参加者を現在の会議に追加したいと思います。 私は会議hereののJavaのサンプルコードを試しました。入力を集めて番号を呼び出し、参加者を同じ会議に追加する方法はありますか?Twilioで電話会議の途中で電話をかけることはできますか?
ここは私が試したものです。私は会議を作成しているし、今会議の参加者の一つを次の応答
<Response>
<Dial hangupOnStar="true">
<Conference startConferenceOnEnter="true" endConferenceOnExit="true">My Conference</Conference>
</Dial>
<Gather timeout="10" action="/twilio-tut/add/participant?confName=My%20Conference" finishOnKey="#">
<Say>Please enter the number you want to connect followed by hash key.</Say></Gather>
</Response>
を返しますどのプレス*
を言うと、他の人の番号をダイヤルし、彼は会議に追加したい人へ。
今Gather
動詞の行動に、私はstatusCallbackオン
Number number =
new Number.Builder(some_valid_phone_number)
.statusCallback("https://xxxxxxx.ngrok.io/twilio-tut/to/conference")
.statusCallbackMethod(Method.POST)
.statusCallbackEvents(Arrays.asList(Event.ANSWERED))
.build();
Dial dial = new Dial.Builder()
.number(number)
.conference(new Conference.Builder(conferenceName).build())
.build();
twiml = new VoiceResponse.Builder().dial(dial)
.build();
以下のように、私は、呼び出し元が一つであり、呼び出し元と呼び出し先の両方のための会議にリダイレクトするようにコールを更新しています数のコードをダイヤルしています*
、つまりAを押して会議を終了した人は、some_valid_phone_numberです。コードは
Call callee = Call.updater(callSid)
.setUrl("https://xxxxx.ngrok.io/twilio-tut/voice").setMethod(HttpMethod.POST).update();
Call caller = Call.updater(parentCallSid)
.setUrl("https://xxxxx.ngrok.io/twilio-tut/voice").setMethod(HttpMethod.POST).update();
呼び出し先の下に示されているようで、私は何をしたいことはコール他のいくつかの数で、最終的に彼らは同じに接続する例外
com.twilio.exception.ApiException: Call is not in-progress. Cannot redirect.
と、発信者の接続を切断します会議。 は、他の番号を呼び出して同じ会議で追加できる必要があります。私は数字を接続するために携帯電話を使用しています。
ありがとうございます。
ありがとう、フィル。私は会議に参加者を追加することができます。 :) –