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 CSOtherPhoneService object is obtained from the Client SDK's CSUser object. Start by obtaining it.

CSOtherPhoneService *otherPhoneService = user.otherPhoneService;

Then define an object that implements the <CSOtherPhoneServiceDelegate> protocol and add this delegate to the CSOtherPhoneService in order to track activation status.

@interface AppOtherPhoneServiceHandler() 
...
@end

@implementation AppOtherPhoneServiceHandler

- (void)otherPhoneServiceDidActivate:(CSOtherPhoneService*)otherPhoneService {
    NSLog(@"Other Phone mode Activation successful");
}

- (void)otherPhoneServiceDidDeactivate:(CSOtherPhoneService*)otherPhoneService {
    NSLog(@"Other Phone mode Dectivation successful");
}
...

@end

You can instantiate a Other Phone service handler (AppOtherPhoneServiceHandler) and add it as a delegate to the CSOtherPhoneService instance.

AppOtherPhoneServiceHandler* otherPhoneServiceHandler = 
    [[AppOtherPhoneServiceHandler alloc] init];
otherPhoneService.otherPhoneServiceDelegate = otherPhoneServiceHandler;

Activate Other Phone Mode

Once you have obtained the OtherPhoneService instance, you are ready to activate Other Phone Mode. Call the activateOtherPhoneModeWithNumber:completionHandler: method of the CSOtherPhoneService instance providing Other Phone number.

[otherPhoneService activateOtherPhoneModeWithNumber:otherPhoneNumber 
                                  completionHandler:^(NSError *error) {
            if (error) {
                NSLog(@"Other phone mode activation failed: %@", error);
            } else {
                NSLog(@"Other phone mode activation succeeded.");
            }
        }
];

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

Deactivate Other Phone Mode

To deactivate Other Phone Mode, call the deactivateOtherPhoneModeWithCompletionHandler: method of the CSOtherPhoneService instance.

[otherPhoneService deactivateOtherPhoneModeWithCompletionHandler: 
    ^(NSError *error) {
        if (error) {
            NSLog(@"Other phone mode deactivation failed: %@", error);
        } else {
            NSLog(@"Other phone mode deactivation succeeded.");
        }
    }
];