Avaya Client SDK

< Back to Package Overview

Other Phone Service

Overview

Other Phone Service, or Telecommuter, allows a developer to create an application which can make and receive calls through any device which can be externally dialed. Such devices can be a user's home, hotel or mobile number. Functionality supported include:

  • Make Call. With Other phone mode the Client SDK act as a Back to Back user agents calling out to the Other Phone and when answered on this device, it calls out to the destination number and then joins these two call legs.
  • Your application must specify the phone number of device which will be used as the Other Phone and select this number prior to make or receiving a call.
  • Answer call. The incoming call is presented (notification) to the Application. The Application rings the Other Phone number and when answered the incoming call list answered and the two legs of the call are then joined.
  • Your application can place a Other phone Mode call on Hold and resume this call.
  • Incoming/outgoing/missed calls can be logged.
  • Call redirection features such as; Send All Calls, extend call, call forward (all-modes), on Other Phone mode calls.
  • Multiple calls can be handled with auto hold and resume.
  • Audio calls only.

For example, to make an outgoing call Client SDK calls the Other Phone number configured by user. Once the call is answered on the Other Phone, then another call is placed towards the dialed number. Once the call is answered on the dialed endpoint, a media path will be established between the Other Phone and the dialed endpoint.

There are limitations in Other Phone Mode:

  • Other Phone Mode provides basic voice services only.
  • Video calls are not supported in Other Phone mode.
  • HTTPUA calls are not supported in Other Phone mode.

Other Phone mode can be activated using Other Phone Service.

Subscribe OtherPhoneService events

The OtherPhoneService object is obtained from the Client SDK's User object. Start by obtaining it.

OtherPhoneService otherPhoneService = user.OtherPhoneService;

Then implement handlers for OtherPhoneService events in order to track activation status.

private void OnOtherPhoneServiceActivated(object sender, EventArgs e)
{
    Log("OnOtherPhoneServiceActivated");
}

private void OnOtherPhoneServiceDeactivated(object sender, EventArgs e)
{
    Log("OnOtherPhoneServiceDeactivated");
}

Add created event handlers to the OtherPhoneService instance.

otherPhoneService.Activated += OnOtherPhoneServiceActivated;
otherPhoneService.Deactivated += OnOtherPhoneServiceDeactivated;

Activate Other Phone Mode

Once you have obtained the OtherPhoneService instance, you are ready to activate Other Phone Mode. First, implement completion handler for this operation.

private void OtherPhoneActivationCompletionHandler(
    OtherPhoneActivationFailureException error)
{
    if (error != null)
    {
        Log("Other phone mode activation failed: {0}  message:{1}",
            error.Reason.ToString(), error.Message);
    }
    else
    {
        Log("Other phone mode activation succeeded.");
    }
}

Then call the Activate method of the OtherPhoneService instance providing Other Phone number.

otherPhoneService.Activate(otherPhoneNumber, 
    OtherPhoneActivationCompletionHandler);

After Other Phone Mode activation completes, you can make or answer calls using CallService API as usual to originate and answer calls.

Deactivate Other Phone Mode

To deactivate Other Phone Mode, implement completion handler for this operation.

private void OtherPhoneDeactivationCompletionHandler(
    OtherPhoneActivationFailureException error)
{
    if (error != null)
    {
        Log("Other phone mode deactivation failed: {0}  message:{1}",
            error.Reason.ToString(), error.Message);
    }
    else
    {
        Log("Other phone mode deactivation succeeded.");
    }
}

Then call the Deactivate method of the OtherPhoneService instance.

otherPhoneService.Deactivate(OtherPhoneDeactivationCompletionHandler);