我想将加入会议的第一个用户设置为主持人,我正在使用twilio-python 文档来帮助我,但我没有看到任何关于此的内容。
第一个参与者应该是主持人,以便让另一个参与者静音,踢等,但老实说,我不知道这是否真的需要,所以我对“不需要主持人”持开放态度。
另外我想知道与令牌相关的名称是否在参与者中,以便用这个而不是 SID 来检索它。(在文档中没有看到任何内容)
这里是服务器端代码:
@app.route('/call', methods=['GET', 'POST'])
def call():
resp = twilio.twiml.Response()
from_value = request.values.get('From')
to = request.values.get('To')
conferenceName = request.values.get('conferenceName')
account_sid = os.environ.get("ACCOUNT_SID", ACCOUNT_SID)
auth_token = os.environ.get("AUTH_TOKEN", AUTH_TOKEN)
app_sid = os.environ.get("APP_SID", APP_SID)
clientTwilio = TwilioRestClient(account_sid, auth_token)
elif to.startswith("conference:"):
# allows to user conference call
# client -> conference
conferencesList = client.conferences.list(friendly_name=conferenceName)
#there's no conference with the conferenceName so the first person should be the moderator and join it
if len(conferencesList) == 0
#do somestuff to set a moderator [...]
resp.dial(callerId=from_value).conference(to[11:])
else:
#there's already a conference just join it
resp.dial(callerId=from_value).conference(to[11:])
对于与我想用来检索参与者的令牌/客户端相关的“名称”:
//http://foo.herokuapp.com/token?client=someName"
self.phone = [[TCDevice alloc] initWithCapabilityToken:token delegate:self];
NSDictionary *params = @{@"To": @"conference:foo"};
self.connection = [self.phone connect:params delegate:self];
[self closeNoddersView:nil];
//the user is connected as participant in the conference, is it possible to retrieve it with the "someName" ? (server side route which take a "someName" in param)
有什么线索吗?:/