2016-06-18 69 views

回答

3

Twilio開發人員傳道這裏。

爲此,您需要使用REST API。您應該已經在爲您的Twilio Client應用程序使用基於服務器的應用程序generate tokens,因此您需要另一個可以接受會議SID並查找participants using the REST API的終端。完成之後,您需要從Android應用程序調用您的服務器以獲取當前的參與者數量。

使用Python(因爲這是例子Twilio客戶端服務器實現的),它可能看起來有點像這樣:

from twilio.rest import TwilioRestClient 

# Your Account Sid and Auth Token from twilio.com/user/account 
account_sid = "your_account_sid" 
auth_token = "your_auth_token" 
client = TwilioRestClient(account_sid, auth_token) 

# A list of participant objects with the properties described above 
participants = client.participants('CFbbe4632a3c49700934481addd5ce1659').list() 
len(participants) 

你也可以用WebSocket連接連接到Web服務器應用程序或類似的,當您收到conference event時查找並播放參與者。

讓我知道這是否有幫助。

+0

http://stackoverflow.com/questions/27463301/how-is-the-twilio-conferencesid-generated你能幫助我嗎? –

+0

@philnash你能幫我在這裏http://stackoverflow.com/questions/38476090/twilio-conference-call-android-app –