Customize Call Out


Contents

1. Customize Dial-Out

2. Customize Call Out to H.323/SIP Room

1. Customize Dial-Out

Some account supports Dial-Out feature. If you would like to customize the behavior of the Dial-Out feature, you can 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);
}

You can get the dial-out status by implementing onDialOutStatusChanged method:

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

2. Customize Call Out to H.323/SIP Room

If you would like to customize call out to H.323/SIP Room System, you can 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 the following 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);
}