The Call Handler
A call handler class simply defines how a call should be handled by the bot. For each call object, the SDK raises multiple events and notifications as they are received from the server. These events are raised on the ISignalingHandler implementation.
The samples use a CallHandler
class that implements this interface and defines the required methods, which in turn are called by the SDK. A call handler is set by the bot logic using the CallDescription
object for each call in the CallInitializedAsync
method.
Note
The CallHandler
often has an instance of the ICall can acts as object to handle all the calling business logic. Bot developers can choose to keep track of all their CallHandler
objects, or access them in the SDK when it's defined as stateful through the CreateCallAsync(string callLegId, Uri callLink) method.