InstantMessagingCall.BeginEstablish Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
BeginEstablish(ToastMessage, CallEstablishOptions, AsyncCallback, Object) |
Begins the operation of establishing the instant messaging call on existing Conversation. |
BeginEstablish(String, ToastMessage, CallEstablishOptions, AsyncCallback, Object) |
Begins the operation of establishing the instant messaging call with the remote participant. |
BeginEstablish(ToastMessage, CallEstablishOptions, AsyncCallback, Object)
Begins the operation of establishing the instant messaging call on existing Conversation.
public:
IAsyncResult ^ BeginEstablish(Microsoft::Rtc::Collaboration::ToastMessage ^ toastMessage, Microsoft::Rtc::Collaboration::CallEstablishOptions ^ options, AsyncCallback ^ userCallback, System::Object ^ state);
public IAsyncResult BeginEstablish (Microsoft.Rtc.Collaboration.ToastMessage toastMessage, Microsoft.Rtc.Collaboration.CallEstablishOptions options, AsyncCallback userCallback, object state);
override this.BeginEstablish : Microsoft.Rtc.Collaboration.ToastMessage * Microsoft.Rtc.Collaboration.CallEstablishOptions * AsyncCallback * obj -> IAsyncResult
Parameters
- toastMessage
- ToastMessage
A short message which can be displayed to the recipient upon receipt. Can be null.
- options
- CallEstablishOptions
Optional parameters to establish the call.
- userCallback
- AsyncCallback
The method to be called when the asynchronous operation is completed.
- state
- Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.
Returns
An IAsyncResult that references the asynchronous operation.
Exceptions
Thrown when the
options
parameter contains invalid or restricted signaling headers, or when
the call is used as a third party call controller with custom MIME parts or with early media support.
Thrown when the call is not in a valid state to perform this operation or does not have valid media provider to bind to.
Remarks
toastMessage
specifies the message that is displayed on the client when the callee is notified of an incoming call.
Applies to
BeginEstablish(String, ToastMessage, CallEstablishOptions, AsyncCallback, Object)
Begins the operation of establishing the instant messaging call with the remote participant.
public:
IAsyncResult ^ BeginEstablish(System::String ^ destinationUri, Microsoft::Rtc::Collaboration::ToastMessage ^ toastMessage, Microsoft::Rtc::Collaboration::CallEstablishOptions ^ options, AsyncCallback ^ userCallback, System::Object ^ state);
public IAsyncResult BeginEstablish (string destinationUri, Microsoft.Rtc.Collaboration.ToastMessage toastMessage, Microsoft.Rtc.Collaboration.CallEstablishOptions options, AsyncCallback userCallback, object state);
override this.BeginEstablish : string * Microsoft.Rtc.Collaboration.ToastMessage * Microsoft.Rtc.Collaboration.CallEstablishOptions * AsyncCallback * obj -> IAsyncResult
Parameters
- destinationUri
- String
Destination URI of the remote participant
- toastMessage
- ToastMessage
A short message that can be displayed to the recipient upon receipt. Can be null.
- options
- CallEstablishOptions
Optional parameters to establish the call.
- userCallback
- AsyncCallback
The method to be called when the asynchronous operation is completed.
- state
- Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.
Returns
Returns an IAsyncResult that references the asynchronous operation.
Exceptions
Thrown when the destinationUri
parameter is null, empty or invalid SIP URI or tel URI, or when the
options
parameter contains invalid or restricted signaling headers, or when
the call is used as a third-party call controller with custom MIME parts or with early media support.
Thrown when the call is not in a valid state to perform this operation or does not have valid media provider to bind to.
Examples
This example shows how to establish a call to a Uri with a toast message. This example assumes that the platform and endpoints have already been initialized.
C# Establish call with toast message
call.BeginEstablish(
destinationUri,
new ToastMessage("Do you have a minute?"),
null /*options*/,
this.EstablishCompleted,
call /*state*/);
private void EstablishCompleted(IAsyncResult result)
{
try
{
InstantMessagingCall call = result.AsyncState as InstantMessagingCall;
call.EndEstablish(result);
}
catch (RealTimeException exception)
{
// TODO: Replace with exception handling code.
Console.WriteLine("Call establish failed: {0}", exception.Message);
}
finally
{
// TODO: Add clean up code here.
}
}
Remarks
toastMessage
specifies the message that is displayed on the client when the callee is notified of an incoming call.