CallAgent interface
The CallAgent is used to handle calls.
- Extends
Properties
calls | Get the calls. |
display |
Get the display name of the local participant for all new calls. |
Inherited Properties
connection |
Get the connection state. |
kind | Get the kind of call agent object. |
Methods
join(Group |
Join a group call. To join a group call, pass a groupId. |
join(Group |
Join a group chat call. To join a group chat call, pass a threadId. |
join(Meeting |
Join a Teams meeting. To join a Teams meeting, pass a meeting link or meeting coordinates. |
join(Room |
Join a rooms call. To join a rooms call, pass a roomId. |
join(Teams |
Join a Teams meeting. To join a Teams meeting, pass a meeting id and passcode. |
join(Teams |
Join a Teams meeting. To join a Teams meeting, pass a meeting link. |
off("calls |
Unsubscribe function for callsUpdated event. |
off("connection |
Unsubscribe function for connectionStateChanged event. |
off("incoming |
Unsubscribe function for incomingCall event. |
on("calls |
Subscribe function for callsUpdated event. |
on("connection |
Subscribe function for connectionStateChanged event. |
on("incoming |
Subscribe function for incomingCall event. |
start |
Initiate a call to the participants provided. |
start |
Initiate a call to the participants provided. |
Inherited Methods
dispose() | Dispose of this Call Agent |
feature<TFeature>(Call |
Retrieves an initialized and memoized Feature object with extended API. Check the object Features.* for all available extended call agent features in this package. |
handle |
Handles a push notification. |
Property Details
calls
Get the calls.
calls: readonly Call[]
Property Value
readonly Call[]
displayName
Get the display name of the local participant for all new calls.
displayName?: string
Property Value
string
Inherited Property Details
connectionState
Get the connection state.
connectionState: ConnectionState
Property Value
Inherited From CallAgentCommon.connectionState
kind
Get the kind of call agent object.
kind: CallAgentKind
Property Value
Inherited From CallAgentCommon.kind
Method Details
join(GroupCallLocator, JoinCallOptions)
Join a group call. To join a group call, pass a groupId.
function join(groupLocator: GroupCallLocator, options?: JoinCallOptions): Call
Parameters
- groupLocator
- GroupCallLocator
Group call information.
- options
- JoinCallOptions
Call start options.
Returns
The Call object associated with the call.
join(GroupChatCallLocator, JoinCallOptions)
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Join a group chat call. To join a group chat call, pass a threadId.
function join(groupChatCallLocator: GroupChatCallLocator, options?: JoinCallOptions): Call
Parameters
- groupChatCallLocator
- GroupChatCallLocator
GroupChat call information.
- options
- JoinCallOptions
Call start options.
Returns
The Call object associated with the call.
join(MeetingLocator, JoinCallOptions)
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Join a Teams meeting. To join a Teams meeting, pass a meeting link or meeting coordinates.
function join(meetingLocator: MeetingLocator, options?: JoinCallOptions): Call
Parameters
- meetingLocator
- MeetingLocator
Meeting information.
- options
- JoinCallOptions
Call start options.
Returns
The Call object associated with the call.
join(RoomCallLocator, JoinCallOptions)
Join a rooms call. To join a rooms call, pass a roomId.
function join(roomLocator: RoomCallLocator, options?: JoinCallOptions): Call
Parameters
- roomLocator
- RoomCallLocator
Room call information.
- options
- JoinCallOptions
Call start options.
Returns
The Call object associated with the call.
join(TeamsMeetingIdLocator, JoinCallOptions)
Join a Teams meeting. To join a Teams meeting, pass a meeting id and passcode.
function join(meetingLocator: TeamsMeetingIdLocator, options?: JoinCallOptions): Call
Parameters
- meetingLocator
- TeamsMeetingIdLocator
Meeting information.
- options
- JoinCallOptions
Call start options.
Returns
The Call object associated with the call.
join(TeamsMeetingLinkLocator, JoinCallOptions)
Join a Teams meeting. To join a Teams meeting, pass a meeting link.
function join(meetingLocator: TeamsMeetingLinkLocator, options?: JoinCallOptions): Call
Parameters
- meetingLocator
- TeamsMeetingLinkLocator
Meeting information.
- options
- JoinCallOptions
Call start options.
Returns
The Call object associated with the call.
off("callsUpdated", CollectionUpdatedEvent<Call>)
Unsubscribe function for callsUpdated event.
function off(event: "callsUpdated", listener: CollectionUpdatedEvent<Call>)
Parameters
- event
-
"callsUpdated"
event name.
- listener
callback fn that was used to subscribe to this event.
off("connectionStateChanged", ConnectionStateChangedEvent)
Unsubscribe function for connectionStateChanged event.
function off(event: "connectionStateChanged", listener: ConnectionStateChangedEvent)
Parameters
- event
-
"connectionStateChanged"
event name.
- listener
- ConnectionStateChangedEvent
callback fn that will be called when value of this property will change.
off("incomingCall", IncomingCallEvent)
Unsubscribe function for incomingCall event.
function off(event: "incomingCall", listener: IncomingCallEvent)
Parameters
- event
-
"incomingCall"
event name.
- listener
- IncomingCallEvent
callback fn that was used to subscribe to this event.
on("callsUpdated", CollectionUpdatedEvent<Call>)
Subscribe function for callsUpdated event.
function on(event: "callsUpdated", listener: CollectionUpdatedEvent<Call>)
Parameters
- event
-
"callsUpdated"
event name.
- listener
callback fn that will be called when this collection will change, it will pass arrays of added and removed elements.
on("connectionStateChanged", ConnectionStateChangedEvent)
Subscribe function for connectionStateChanged event.
function on(event: "connectionStateChanged", listener: ConnectionStateChangedEvent)
Parameters
- event
-
"connectionStateChanged"
event name.
- listener
- ConnectionStateChangedEvent
callback fn that will be called when value of this property will change.
on("incomingCall", IncomingCallEvent)
Subscribe function for incomingCall event.
function on(event: "incomingCall", listener: IncomingCallEvent)
Parameters
- event
-
"incomingCall"
event name.
- listener
- IncomingCallEvent
callback fn that will be called when this callAgent will receive an incoming call.
startCall((PhoneNumberIdentifier | CommunicationUserIdentifier | MicrosoftTeamsAppIdentifier | UnknownIdentifier)[], StartCallOptions)
Initiate a call to the participants provided.
function startCall(participants: (PhoneNumberIdentifier | CommunicationUserIdentifier | MicrosoftTeamsAppIdentifier | UnknownIdentifier)[], options?: StartCallOptions): Call
Parameters
- participants
-
(PhoneNumberIdentifier | CommunicationUserIdentifier | MicrosoftTeamsAppIdentifier | UnknownIdentifier)[]
- options
- StartCallOptions
Start Call options.
Returns
The Call object associated with the started call.
startCall(CommunicationIdentifier[], StartCallOptions)
Initiate a call to the participants provided.
function startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call
Parameters
- participants
- options
- StartCallOptions
Start Call options.
Returns
The Call object associated with the started call.
Inherited Method Details
dispose()
Dispose of this Call Agent
function dispose(): Promise<void>
Returns
Promise<void>
Inherited From CallAgentCommon.dispose
feature<TFeature>(CallAgentFeatureFactory<TFeature>)
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Retrieves an initialized and memoized Feature object with extended API. Check the object Features.* for all available extended call agent features in this package.
function feature<TFeature>(factory: CallAgentFeatureFactory<TFeature>): TFeature
Parameters
- factory
-
CallAgentFeatureFactory<TFeature>
The factory for the call agent feature constructor that provides an extended API.
Returns
TFeature
Inherited From CallAgentCommon.feature
handlePushNotification(IncomingCallPushNotificationData)
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Handles a push notification.
function handlePushNotification(data: IncomingCallPushNotificationData): Promise<void>
Parameters
Push notification data
Returns
Promise<void>
Inherited From CallAgentCommon.handlePushNotification