• Stars
    star
    1,343
  • Rank 34,228 (Top 0.7 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

โšก The future of programmable SIP servers.

Contribute with Gitpod Sponsor this Discord GitHub Twitter Follow

Routr is a lightweight sip proxy, location server, and registrar that provides a reliable and scalable SIP infrastructure for telephony carriers, communication service providers, and integrators.

Table of Content

Community

We are building Routr in the open. The best to communicate with us via GitHub Discussions.


Special Announcement:

We now have a Discord Channel
There we plan to discuss roadmaps, feature requests, and more
Join us today


Features

Routr's main features are:

  • Common SIP Server functions; Proxy, Registrar, Location Service
  • Programmable Routing
  • Load balancing strategies against Media Servers like Asterisk and FreeSWITCH
  • Session Affinity
  • Multi-Tenant/Multi-Domain with Domain level Access Control List
  • Region-based routing
  • Configurable routing strategies; Intra-Domain, Domain Ingress, Domain Egress, and Peer Egress
  • No single point of failure
  • Transport: TCP, UDP, TLS, WS, WSS
  • In-memory and Redis Location Service
  • JSON and YAML files as a data source
  • Postgres as a data source
  • Server management with the gRPC API
  • NodeSDK
  • Command-Line Tool
  • RTPEngine Middleware
  • Helm Chart for Kubernetes Deployments
  • Endpoint Authentication with JWT (For web phones)
  • Support for STIR/SHAKEN
  • Web Application

To learn more, read the documentation ๐Ÿ“š

The official handbook

This handbook is designed to provide a detailed understanding of the innovative features, challenges, and opportunities that Routr presents in the realm of programmable SIP Servers.

Get the eBook.

Give a Star! โญ

If you like this project or plan to use it in the future, please give it a star. Thanks ๐Ÿ™

Example configuration

Consider a situation where you want to deploy the server and send all PSTN traffic to a conference room in Asterisk. For such a scenario, you must configure a Peer to present your feature server and a Number to route calls from the PSTN.

First, start by creating a Peer configuration for your Asterisk server similar to the following one:

apiVersion: v2beta1
kind: Peer
ref: peer-01
metadata:
  name: Asterisk (Media Server)
spec:
  aor: backend:conference
  username: asterisk
  credentialsRef: credentials-01
  loadBalancing:
    withSessionAffinity: true
    algorithm: least-sessions

Notice that the loadBalancing section sets the withSessionAffinity to true. We need session affinity to ensure that all calls related to the conference arrive on the same Asterisk server. Every Asterisk server that registers using the asterisk username will be grouped under the backend:conference Address of Record (AOR).

Next, we need to tell Routr to map all inbound calls from a given Number to the conference room in Asterisk. For that, we use the aorLink and sessionAffinityHeader on the desired Number. Here is an example:

apiVersion: v2beta1
kind: Number
ref: number-01
metadata:
  name: "(706)604-1487"
  geoInfo:
    city: Columbus, GA
    country: USA
    countryISOCode: US
spec:
  trunkRef: trunk-01
  location:
    telUrl: tel:+17066041487
    aorLink: backend:conference
    sessionAffinityHeader: X-Room-Id
    extraHeaders:
      # Appends the X-Room-Id header to all inbound calls
      - name: X-Room-Id
        value: jsa-shqm-iyo

The last scenario is one of the many possible scenarios you can accomplish with Routr (v2). Please spend some time getting familiar with the configuration files.

Deployment

Instant Server deployment with Docker and Compose

For a quick demo of Routr, follow the next two steps:

  1. Clone the repository and run the server
git clone https://github.com/fonoster/routr
docker-compose up 
  1. Connect to Routr using Zoiper or another softphone

In the config/resources, you will find the domains.yaml and agents.yaml files. Those files contain the configuration to run a simple local network with two SIP Agents (John and Jane).

Kubernetes

Routr can be installed in Kubernetes using Helm. The following instructions assume that you have a Kubernetes cluster up and running. If you donโ€™t have one, you can use Minikube or Docker Desktop to create a local cluster.

First, add the Helm repository:

helm repo add routr https://routr.io/charts
helm repo update

Then, create a namespace for Routr:

kubectl create namespace sipnet

Next, install Routr with the following command:

helm install sipnet routr/routr-connect --namespace sipnet

Finally, wait a few minutes for the pods to start. You can check the status of the pods with the following command:

kubectl get pods -n sipnet

You should see a list of pods and their status. If you see the status Runnning, then you are ready to go.

For a more detailed explanation please refer to the chart's readme.

Deploying in development mode with Gitpod

Routr's one-click interactive deployment will familiarize you with the server in development mode.

Open in Gitpod

To connect to your instance, follow these steps:

First, add your public SSH-keys to your Gitpod account by going to Gitpod account keys and adding your public key.

Next, find your Gitpod workspace and click on the "More" button. Then, select "Connect via SSH."

Finally, copy the SSH Command and run it in your terminal by pasting it and pressing Enter. The command should look like this:

ssh -L 5060:localhost:5060 <workspace-ssh-connection>

Replace with your own workspace SSH connection.

For example, your command might look like this:

ssh -L 5060:localhost:5060 fonoster-routr-mn8nsx0d9px@fonoster-routr-mn8nsx0d9px.ssh.ws-us90.gitpod.io

This command forwards traffic from your local port 5060 to your Gitpod workspace's port 5060, allowing you to access your instance.

Bugs and Feedback

For bugs, questions, and discussions, please use the Github Issues

Contributing

For contributing, please see the following links:

Sponsors

We're glad to be supported by respected companies and individuals from several industries.

Find all our supporters here

Become a Github Sponsor

Authors

License

Copyright (C) 2023 by Fonoster Inc. MIT License (see LICENSE for details).

More Repositories

1

fonoster

๐Ÿš€ The open-source alternative to Twilio.
JavaScript
6,123
star
2

goodtok

A better shopping experience ๐Ÿค™
TypeScript
78
star
3

astive

Media controller for Asterisk PBX (FastAGI Server)
Java
44
star
4

seet

SEET: Orchestrating multiple user-agents for complex SIP testing scenarios.
TypeScript
20
star
5

wphone

WebRTC phone based on SIP.js
JavaScript
18
star
6

routr-ui

A webui for Routr
JavaScript
16
star
7

webui

The Web UI for Fonoster
TypeScript
16
star
8

routr-ctl

The Routr Command Line Tool
JavaScript
10
star
9

blog

Fonoster's blog publications
10
star
10

marketplace

๐Ÿงฉ Find the integrations and VoIP providers that suit you, then use them in your Voice Applications with a single easy-to-use API.
9
star
11

mediaserver

Docker image with a headless Asterisk PBX for Fonoster
Shell
9
star
12

website

Fonoster's website and other assets
CSS
8
star
13

grpc-health-check

An implementation of gRPC health checks, for node.js-based apps that uses @grpc/grpc-js as a base.
TypeScript
7
star
14

nodejs-voiceapp

A template with everything you need to create a Voice Application with Fonoster
JavaScript
7
star
15

sipp-js

A Javascript wrapper for SIPp
TypeScript
6
star
16

nodejs-service

A template with common practices at Fonoster
JavaScript
6
star
17

rtpel7lb

This repository features a layer 7 load balancer to serve requests to instances of rtpengine.
TypeScript
6
star
18

nodejs-processor

A template with everything you need to start creating custom Routr processors
TypeScript
4
star
19

rox

๐Ÿค– Rox AI is a tool that connects Fonoster with Dialogflow ES/CX
TypeScript
4
star
20

routr-website

Site + docs for Routr
CSS
4
star
21

roadmap

Fonoster public roadmap
4
star
22

docker-base

Base image for Fonoster services
Dockerfile
3
star
23

pollytts

Amazon Polly Plugin for Fonoster Voice Apps
TypeScript
3
star
24

grpc-gateway

Fonos GRPC Gateway
JavaScript
2
star
25

rox-ui

Roxanne is a voice assistant fully capable of interpreting human requests and processing them as intentions.
TypeScript
2
star
26

instrumentation

Create a set of connection data on behalf of a user
JavaScript
1
star
27

.github

Org Profile
1
star
28

uploader-helper

Watches a volume for any new files, and uploads those items to the corresponding bucket
JavaScript
1
star
29

openfaas-client

Swagger generated client for OpenFaaS API Gateway
TypeScript
1
star
30

plugin-funcs

๐Ÿ”ฅ Funcs Plugin
TypeScript
1
star
31

opentelemetry-user-interaction

TypeScript
1
star
32

plugin-secrets

๐Ÿ’ฏ Secrets Plugin
TypeScript
1
star
33

metrics-ui

Internal application to obtain counts and metrics from different sources to manage Fonoster statistics
TypeScript
1
star