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.
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
Twitter: @fonoster
Issue tracker: Use the GitHub issue tracker for the various Routr repositories to file bugs and features request. If you need support, please send your questions to the routr-users mailing list rather than filing a GitHub issue.
Please do not ask individual project members for support. Use the channels above instead, where the whole community can help you and benefit from the solutions provided. Please get in touch with us for Commercial Support if community support is insufficient for your situation.
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 files as a data source
- YAML files as a data source
- TOML files as a data source
- Postgres as a data source
- Server management with the gRPC API
- Server management with CLI and WebApp
- NodeJS and WebSDK
- Endpoint Authentication with JWT (For web phones)
- RTPEngine Middleware
- Support for STIR/SHAKEN
- Helm Chart for Kubernetes Deployments
To learn more, read the documentation. 📚
If you like this project or plan to use it in the future, please give it a star. Thanks 🙏
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 combine the Peer
and Number
resources and the Location
service.
First, you will start by creating a Peer configuration for your Asterisk server similar to the following one:
{
"apiVersion": "v2draft1",
"kind": "Peer",
"ref": "peer-01",
"metadata": {
"name": "Asterisk (Media Server)"
},
"spec": {
"username": "asterisk",
"aor": "backend:conference",
"credentialsRef": "credentials-01",
"contactAddr": "192.168.1.2:6060"
}
}
Every Asterik server that registers using the crd6t67r1
credentials will be grouped under the backend:conference
Address of Record (AOR). Next, we need to tell Routr to map all inbound calls from given number to the conference room in Asterik. For that, we use the aorLink
and sessionAffinityHeader
on the desired Number. Here is an example:
{
"apiVersion": "v2draft1",
"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": [{
"name": "x-room-id",
"value": "jsa-shqm-iyo"
}]
}
}
}
Finally, we configure the Location service to load-balance the traffic based on the least-sessions
algorithm.
We need Session Affinity to ensure all calls for a given
x-room-id
go to the same Asterisk server.
{
"kind": "Location",
"apiVersion": "v2draft1",
"metadata": {
"region": "us-east1"
},
"spec": {
"bindAddr": "0.0.0.0:51902",
"cache": {
"provider": "memory"
},
"backends": [
{
"ref": "conference",
"balancingAlgorithm": "least-sessions",
"withSessionAffinity": true
}
]
}
}
The last scenario is just one of the many possible scenarios you can accomplish with Routr (v2). Please spend some time getting familiar with the configuration files.
For a quick demo of Routr follow the next two steps:
➊ Clone the repository and run the server
git clone https://github.com/fonoster/routr
docker-compose up
➋ Connect to Routr using Zoiper or another softphone
In the config/resources
, you will find the domains.json
and agents.json
files. Those files contain the configuration to run a simple local network with two SIP Agents (John and Jane).
Routr's one-click interactive deployment will familiarize you with the server in development mode.
Deploying Routr in Kubernetes is coming soon.
For bugs, questions, and discussions, please use the Github Issues
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
Copyright (C) 2022 by Fonoster Inc. MIT License (see LICENSE for details).