# Class: CallManager

## Constructor

#### new CallManager()

## Methods

#### createCall(callService) → {AvayaClientServices.Services.Call.Call}

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callService` | AvayaClientServices.Services.Call.CallService |

  ##### Returns:

  { AvayaClientServices.Services.Call.Call }

#### createMakeCall(callService, callId, remoteAddress, ucid, parentUcid, contextId) → {AvayaClientServices.Services.Call.Call}

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `callService` | AvayaClientServices.Services.Call.CallService |  |
  `callId` |  |  |
  `remoteAddress` |  |  |
  `ucid` | string | <optional> | UCID
  `parentUcid` | string | <optional> | parent UCID
  `contextId` | string | <optional> | contextId

  ##### Returns:

  { AvayaClientServices.Services.Call.Call }

#### createRemoteOrIncomingCall(callService, callId, remoteAddress, remoteDisplayName, isAuraAsserted, isPrivate, isVideoCall, alertType, subject) → {AvayaClientServices.Services.Call.Call}

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callService` | AvayaClientServices.Services.Call.CallService |
  `callId` |  |
  `remoteAddress` |  |
  `remoteDisplayName` |  |
  `isAuraAsserted` |  |
  `isPrivate` |  |
  `isVideoCall` |  |
  `alertType` |  |
  `subject` |  |

  ##### Returns:

  { AvayaClientServices.Services.Call.Call }

#### deleteCall(call)

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `call` | AvayaClientServices.Services.Call.Call |

#### getAllCalls() → {Array.<AvayaClientServices.Services.Call.Call>}

  Returns all calls including local and remote

  ##### Returns:

  { Array.<AvayaClientServices.Services.Call.Call> }

#### getCallById(callId) → {AvayaClientServices.Services.Call.Call}

  Returns call associated with a callId

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callId` | String |

  ##### Returns:

  { AvayaClientServices.Services.Call.Call }

#### getCallCount() → {Number}

  Gets the current number of calls.

  ##### Returns:

  { Number }

#### getEndingCall() → {AvayaClientServices.Services.Call.Call|undefined}

  Get call in ENDING state. Assumes no two calls can be ending at the moment

  ##### Returns:

  { AvayaClientServices.Services.Call.Call | undefined }

#### getIgnoredCalls() → {Array.<AvayaClientServices.Services.Call.Call>}

  Returns calls in IGNORED state

  ##### Returns:

  { Array.<AvayaClientServices.Services.Call.Call> }

#### getLastMissedCall() → {AvayaClientServices.Services.Call.Call}

  Returns the last missed call

  ##### Returns:

  { AvayaClientServices.Services.Call.Call }

#### hasHeldCall() → {Boolean}

  Is there an active call in held state

  ##### Returns:

  { Boolean }

#### hasInitiatingCall() → {Boolean}

  Is there a call being initiated.

  ##### Returns:

  { Boolean }

#### setCallMode(call, mode)

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `call` | AvayaClientServices.Services.Call.Call |
  `mode` | AvayaClientServices.Services.Call.Modes.AbstractCallMode |

#### setCalls(calls)

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `calls` | AvayaClientServices.Services.Call.Calls |

#### setLastMissedCall(missedCall)

  Sets the last missed call

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `missedCall` | AvayaClientServices.Services.Call.Call |