Common Connector

This section contains Common Connector proto files.

mediamanager/connector/connector_service.proto

ConnectorService

This service provides connectivity operations for Media Manager connectors. A connector must have a dedicated connector ID created by Media Manager, which is used for session creation. Multiple connectors of the same type can share the same connector ID. However each connector will have it’s own session. The connector must create a session first by calling CreateSession. If successful, the connector needs to initialize using the provided configuration. Once configured, the connector should call StartSession using the connector session ID returned by the CreateSession operation. If the session is disconnected, the connector should retry using the same connector_session_id. When a connector shuts down or restart, it should call DeleteSession. This will invalidate the session.

gRPC method definitions

gRPC method definitions
Method Name Request Type Response Type Description
CreateSession CreateSession
Request
CreateSession
Response
Creates a new connector session.
StartSession ConnectorMessage stream ConnectorManagerMessage stream Starts a bi-directional stream for a connector session. StartSession can be called at anytime when connector believes necessary. e.g.: when connector believes it has lost connection with connector manager, connector can call StartSession with the same connector_session_id to re-establish the connection. If within a configurable time, a connector with losing connection does not call StartSession, the connector_session_id will be deleted by media manager. Then connector needs to call CreateSession again to obtain a new connector_session_id. The first message after the StartSession should be StartSessionRequest. Media Manager will respond with a StartSessionResponse message. Connector can send ConnectorMessage messages at any time, providing a ConnectorStatusDetails message. Media Manager will send a ConnectorManagerMessage containing a StatusCommand message. The connector should respond providing a ConnectorStatusDetails message. After a configured number of retries (usually 3), if the connector does not respond, Media Manager will deem the connector as inactive and will stop sending commands. A ConnectorCommand must be processed and responded with a ConnectorCommandResponse with the corresponding command ID.
DeleteSession DeleteSession
Request
DeleteSession
Response
Deletes a connector session.
GetConnectorConfig GetConnectorConfig
Request
GetConnectorConfig
Response
Provides the current connector configuration. Should be called when the connector receives a ReloadConfigCommand message.

ConnectorCommand

Message containing a connector command.

ConnectorCommand
Field Type Description
command_id string Required. Unique command ID.
command google.protobuf.Any Required. A generic command holder.
realm_id string Required. The realm ID associated with this command.

ConnectorCommandResponse

Connector command response containing the execution result of a command

ConnectorCommandResponse
Field Type Description
command_id string Required. The command identifier. Must match the corresponding command ID from a ConnectorCommand.
status ConnectorCommandResponse.Status Required. The execution status of the command.
message string Optional. A message providing details about the error.
command_response google.protobuf.Any Corresponding connector command response.
diagnostic_details repeated nuance.rpc.DiagnosticDetail Optional. Provides detailed diagnostic info in case of a failure processing a request.

ConnectorManagerMessage

Output message that defines parameters returned by StartSession. A message that originates from Media Manager.

ConnectorManagerMessage
Field Type Description
One of connector_manager_message:  
   start_session_response StartSessionResponse Connector start session response.
   connector_command ConnectorCommand A command that must be executed by the connector.

ConnectorMessage

Input message that defines parameters for StartSession. A message that originates from the connector.

ConnectorMessage
Field Type Description
One of connector_message:  
   start_session_request StartSessionRequest Required. Connector start session.
   connector_status_details ConnectorStatusDetails Required. Connector status details.
   connector_command_response ConnectorCommandResponse Required. Connector command response.

ConnectorStatusDetails

Message containing connector status details.

ConnectorStatusDetails
Field Type Description
status ConnectorStatus Required. Current connector status.
status_details string Optional. Connector status details (maximum length 250).
active_connector_config_id string Required. The active connector config identifier.
connector_metrics ConnectorMetrics Required. Connector metrics.

CreateSessionRequest

Input message that defines parameters for CreateSession.

CreateSessionRequest
Field Type Description
connector_id string Mandatory. Connector identifier.
connector_type ConnectorType Mandatory. Specifies the connector type. The connector type should match with the connector type configured in Media Manager.
external_connector_id string Optional. Identifier associated to a connector instance.
connector_address string Optional. This address is only needed for OVS connector. The connector_address must be in the format of “dns://host:port” or “static://ipv4-address:port”

CreateSessionResponse

Output message that defines parameters returned by CreateSession.

CreateSessionResponse
Field Type Description
status nuance.rpc.Status General operation status.
tenant_id string The tenant identifier.
connector_session_id string Connector session identifier.
connector_config ConnectorConfig The current connector configuration.

DeleteSessionRequest

Input message that defines parameters for DeleteSession.

DeleteSessionRequest
Field Type Description
connector_session_id string Required. Connector session identifier.

DeleteSessionResponse

Output message that defines parameters returned by DeleteSession.

DeleteSessionResponse
Field Type Description
status nuance.rpc.Status General operation status.

GetConnectorConfigRequest

Input message that defines parameters for GetConnectorConfig.

GetConnectorConfigRequest
Field Type Description
connector_id string Mandatory. Connector identifier.

GetConnectorConfigResponse

Output message that defines parameters returned by GetConnectorConfig.

GetConnectorConfigResponse
Field Type Description
status nuance.rpc.Status General operation status.
connector_config ConnectorConfig The current connector configuration.

ReloadConfigCommand

Command that instructs the connector to fetch a new configuration and reinitialize if necessary.

StartSessionRequest

First message to be sent by the connector after calling StartSession.

StartSessionRequest
Field Type Description
connector_session_id string Required. Connector session identifier.

StartSessionResponse

Start session response message.

StartSessionResponse
Field Type Description
status nuance.rpc.Status General operation status.

StatusCommand

ConnectorCommandResponse.Status

Connector response status

Name Number Description
STATUS_UNSPECIFIED 0 The status is not specified.
OK 1 The command was executed successfully.
ERROR 2 There was an error executing the command.

mediamanager/connector/connector_resources.proto

AgentInfo

Provides information about an Agent

AgentInfo
Field Type Description
agent_id string Optional. Agent id.
extension string Required. Agent extension.

CallIdentifier

Provides information about a Call Identifier.

CallIdentifier
Field Type Description
call_id string Required. Call id.

ConfigParameter

ConfigParameter message data elements.

ConfigParameter
Field Type Description
name string Required. Name of the ConfigParameter (minimum length 2 maximum length 50).
One of value:  
Required. ConfigParameter value.
   string_value string  
   boolean_value bool  
   integer_value int32  
   long_value int64  
   float_value float  

ConnectorConfig

ConnectorConfig message data elements.

ConnectorConfig
Field Type Description
connector_config_id string Required. Connector configuration identifier.
connector_config_info ConnectorConfigInfo Required. Connector Type.

ConnectorConfigInfo

ConnectorConfigInfo message data elements.

ConnectorConfigInfo
Field Type Description
connector_type ConnectorType Required. Connector Type.
description string Optional. Connector description (max length 250).
tenant_id string Required. Tenant identifier.
realm_id string Required. Realm identifier.
config_parameters repeated ConfigParameter Required.

ConnectorMetrics

Provides information about a Connector metrics.

ConnectorMetrics
Field Type Description
current_load int32 Required. ConnectorMetrics current load.
metric_details repeated ConnectorMetrics.MetricDetailsEntry Required. ConnectorMetrics details.

ConnectorMetrics.MetricDetailsEntry

ConnectorMetrics.MetricDetailsEntry
Field Type Description
key string  
value int32  

DiagnosticTrace

Provides diagnostic information information about request processing steps.

DiagnosticTrace
Field Type Description
connector_type ConnectorType Mandatory. The type of connector involved in the request processing.
connector_id string Mandatory. The ID of the connector involved in the request processing.
external_connector_id string Mandatory. The ID of the specific connector instance involved in the request processing.

MediaCoordinationInfo

Provides Media Connector port and session info

MediaCoordinationInfo
Field Type Description
connector_session_id string Mandatory. Represents the Media Connector session id obtained from Connector Manager.
side_1_port int32 Mandatory. Represents the Side One port. Used for mono or stereo.
side_2_port int32 Mandatory. Represents the Side Two port. Used for stereo only.

ConnectorStatus

ConnectorStatus listing of the possible status of a given connector.

Name Number Description
CONNECTOR_STATUS_UNSPECIFIED 0 Connector unspecified status.
CONNECTOR_STATUS_INITIALIZING 1 Connector initializing status.
CONNECTOR_STATUS_ACTIVE 2 Connector active status.
CONNECTOR_STATUS_PASSIVE 3 Connector passive status.
CONNECTOR_STATUS_STOPPING 4 Connector stopping status.
CONNECTOR_STATUS_ERROR 5 Connector error status.
CONNECTOR_STATUS_FATAL 6 Connector fatal status.

ConnectorType

ConnectorType listing of valid connector types.

Name Number Description
CONNECTOR_TYPE_UNSPECIFIED 0 Unspecified connector type.
CONNECTOR_TYPE_MEDIA 1 Media connector.
CONNECTOR_TYPE_CTI 2 CTI connector.
CONNECTOR_TYPE_SIPREC 3 SIPREC connector. Deprecated.
CONNECTOR_TYPE_GENERIC 4 Generic connector.
CONNECTOR_TYPE_RCC 5 Recording controller connector.
CONNECTOR_TYPE_OVS 6 OVS connector.