Customize calling out

Customize dialing out

Some account supports Dial-Out feature. To customize the behavior of the Dial-Out feature, implement the onClickedDialOut method:

//To enable the customization of Dial-Out, the partner should implement the delegate method - (void)onClickedDialOut:(UIViewController*)parentVC isCallMe:(BOOL)me, the partner can start dial-out using this method.
- (void)onClickedDialOut:(UIViewController*)parentVC isCallMe:(BOOL)me
{
  MobileRTCMeetingService *ms = [[MobileRTC sharedRTC] getMeetingService];
    if (!ms)
    return;
  if ([ms isDialOutInProgress]) {
    NSLog(@"There already exists an ongoing call");
    return;
  }
  NSString *callName = me ? nil : @"Dialer";
  BOOL ret = [ms dialOut:@"+866004" isCallMe:me withName:callName];
  NSLog(@"Dial out result: %zd", ret);
}

To get the dial-out status, implement the onDialOutStatusChanged method.

// And partner can get dial-out status by the following code:
- (void)onDialOutStatusChanged:(DialOutStatus)status
{
  NSLog(@"onDialOutStatusChanged: %zd", status);
}

Customize calling out to H.323/SIP Room

To customize call out to H.323/SIP Room System, use the following.

//After joining a meeting the Partner can call the Room System directly using the following:
//For Call-In Room Device
ms sendPairingCode:@"xxxyyy"];
//For Call-Out Room Device
MobileRTCRoomDevice *device = [[MobileRTCRoomDevice alloc] init];
device.deviceName = @"abc";
device.ipAddress = @"111.111.111.1111"; device.e164num = 0;
device.deviceType = MobileRTCDeviceType_H323;
device.encryptType = MobileRTCDeviceEncryptType_None;
[ms callRoomDevice:device];

You can also get the call out status by implementing these methods.

//The Partner can get the Call Room System status using the following code:
- (void)onSendPairingCodeStateChanged:(NSUInteger)state
{
    NSLog(@"onSendPairingCodeStateChanged %zd", state);
}
- (void)onCallRoomDeviceStateChanged:(NSUInteger)state
{
    NSLog(@"onCallRoomDeviceStateChanged %zd", state);
}