Skip to main content
Version: 2.0.0

Registry Service

The Registry component sends outbound registration to trunking services. The service will activate for Trunks with the spec.sendRegister field set to true. The Registry service relies on the Requester service to send requests to the EdgePort.

Configuration Spec

To configure the Registry Service, you must provide a YAML or JSON configuration with the following structure.

PropertyDescriptionRequired
requesterAddrAddress of service to send requestsYes
apiAddrAddress of API serviceYes
registerIntervalInterval for sending registration requests (Defaults to 60s)No
cacheCache configurationNo
cache.providerAccepts either memory or redisNo
cache.parametersComma-separated key-value pairsNo
methodsAcceptable SIP Methods (reserved for future use)No
edgePortsList of EdgePorts for outbound registrationsYes
edgePorts.addressAddress of EdgePortYes
edgePorts.regionRegion of EdgePort (reserved for future use)No

The cache.parameters property is only needed if you are using the Redis provider.

The following table shows the available parameters for the Redis provider.

PropertyDescriptionRequired
usernameUsername (if required by Redis)No
passwordPassword (if required by Redis)No
hostRedis host (Defaults to localhost)No
portRedis port (Defaults to 6379)No
secureUse secure connection for RedisNo

Here is an example of a configuration file:

Filename: registry.yaml or registry.json

kind: Registry
apiVersion: v2beta1
spec:
requesterAddr: requester:51909
apiAddr: apiserver:51907
cache:
provider: memory
methods:
- INVITE
- MESSAGE
edgePorts:
- address: sip01.edgeport.net:5060
region: us-east1
- address: sip02.edgeport.net:6060

Communication and Protobuf Spec

The registry communicates with the Requester service using gRPC. The Requester, in turn, communicates with the EdgePort using SIP. The contract for communication with the Requester service is defined in the following protobuf:

syntax = "proto3";

package fonoster.routr.requester.v2beta1;

import "common.proto";
import "sipmessage.proto";
import "processor.proto";

// Requester service
service Requester {
// Send Message Request
rpc SendMessage (SendMessageRequest) returns (SendMessageResponse) {}
}

message SendMessageRequest {
string target = 1;
fonoster.routr.processor.v2beta1.Method method = 2;
fonoster.routr.common.v2beta1.Transport transport = 3;
fonoster.routr.sipmessage.v2beta1.SIPMessage message = 4;
}

message SendMessageResponse {
fonoster.routr.sipmessage.v2beta1.SIPMessage message = 1;
}

Link to the protobuf definition.

Launching the Registry Service with Docker

The Registry Service is available as a Docker image from Docker Hub. To launch the Registry Service with Docker, you can use the following command:

docker run -it -v $(pwd)/registry.yaml:/etc/routr/registry.yaml fonoster/routr-registry

The previous example will pull the latest version of the Location Service from Docker Hub and launch it with the default configuration. The Registry Service will connect to the Requester service using the address requester:51909 and the API service using the address apiserver:51907.