-
Notifications
You must be signed in to change notification settings - Fork 0
Placing calls
To place the call, you need to use the performCall method and pass username on the RTC server of the user that you want to call.
sylrtc.performCall(username);
To initiate the call to somebody (e.g. between your users) you need to know the username that person has on the Talaria RTC server. Username on the RTC server gets assigned when the user connects to the RTC server and is set using init or configure methods with provided user param. Username is formed using prefix (optional), is and full_name in the user configuration param separated with the dash character:
<prefix>-<id>-<full_name>
Here are some examples:
sylrtc.configure({
user: {
id: '0001',
full_name: 'Jon Doe'
},
credentials: {
client_id: 'acme',
client_token: '01234567890'
}
});
Once connected, the user will be registered with the username '-0001-Jon Doe'.
sylrtc.configure({
user: {
prefix: 'acme1',
id: '0001',
full_name: 'Jon Doe'
},
credentials: {
client_id: 'acme',
client_token: '01234567890'
}
});
Once connected, the user will be registered with the username 'acme1-0001-Jon Doe'. To call Jon Doe in the examples above, in the first case, you will issue the command:
sylrtc.performCall('-0001-Jon Doe');
and in the second case:
sylrtc.performCall('acme1-0001-Jon Doe');
When you issue the command, is the username that you have specified present in the room where the current user is connected, you will see outgoing call dialog. If the given user is not online (or is non-existent), you will receive the message that the user is not online.