Skip to content

Commit

Permalink
New updates to the docs. Pending proofreading...
Browse files Browse the repository at this point in the history
  • Loading branch information
Fonoster Team committed Jan 1, 2019
1 parent ba523e2 commit 2678ec2
Show file tree
Hide file tree
Showing 15 changed files with 239 additions and 108 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`rctl` is a command line interface for running commands against a **Routr** server. This overview covers `rctl` syntax, describes the command operations and provides common examples. For details about each command, including all the supported flags and subcommands, see the `rctl` reference documentation. This tool is part of Routr installation.
`rctl` is a command line interface for running commands against a **Routr** server. This overview covers `rctl` syntax, describes the command operations and provides common examples. For details about each command, including all the supported flags and subcommands, see the `rctl` reference documentation. This tool ships separately from the Routr server.

## Syntax

Expand Down
17 changes: 17 additions & 0 deletions docs/administration/cli/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
To get the Routr Command-Line Tool run the following command:

```bash
npm install -g routr-ctl
```

This will provide you with the globally accessible `rctl` command.

## Login to a Routr server

To login to a Routr server and being issuing commands run the following commands

```bash
rctl login https://127.0.0.1/api/{apiVersion} -u admin -p changeit
```

> The current API version is v1beta1
18 changes: 18 additions & 0 deletions docs/administration/cli/remote-access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
By default Routr installs a certificate that only allows for connections using the `localhost` or `127.0.0.1`. To use `rctl` tool from a remote host, you must generate a certificate that accepts connections to the desired domain name or ip and update the `spec.restService` section of the `config.yml`.

Here is an example using a self-signed certificate(usually enough).

```bash
keytool -genkey -keyalg RSA \
-noprompt \
-alias routr \
-keystore api-cert.jks \
-storepass changeit \
-keypass changeit \
-validity 365 \
-keysize 2048 \
-dname "CN=domain.com, OU=OSS, O=Your Company Inc, L=Sanford, ST=NC, C=US" \
-ext SAN=dns:your.domain.com,dns:localhost,ip:127.0.0.1
```

> Remember to place the certificate in the `etc/certs` folder
Binary file added docs/assets/images/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/concepts.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
The following are some key concepts including some the most important routing strategies implemented in Routr.

## Intra-Domain Routing

_Intra-Domain Routing(IDR)_ offers a mechanism for user segmentation. For a small or medium size company a single domain may be sufficient, but for a multinational or an IP telephony service provider, it may not.
Expand Down
27 changes: 26 additions & 1 deletion docs/configuration/users.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
Coming soon!

## 1. Changing the password?

If you are using the `files_data_provider` then you must change the password in the `users.yml` file. For the `redis_data_provider` follow this steps:

First run the command `redis-cli smembers users` to obtain the reference to the user. Here is an example:

```
$ redis-cli smembers users
1) "5aa69ead8fd6861d92385bac"
```
Then, retrieve the document for reference running `redis-cli get {REF}`. For example

```
$ redis-cli get 5aa69ead8fd6861d92385bac
"{\"apiVersion\":\"v1beta1\",\"kind\":\"User\",\"metadata\":{\"name\":\"Ctl\",\"ref\":\"5aa69ead8fd6861d92385bac\"},\"spec\":{\"credentials\":{\"username\":\"admin\",\"secret\":\"oldpass\"}}}"
```

Finally, search and change the old password and update your document using `redis-cli set {REF} {DOCUMENT}`. Like this:

```
$ redis-cli set 5aa69ead8fd6861d92385bac
"{\"apiVersion\":\"v1beta1\",\"kind\":\"User\",\"metadata\":{\"name\":\"Ctl\",\"ref\":\"5aa69ead8fd6861d92385bac\"},\"spec\":{\"credentials\":{\"username\":\"admin\",\"secret\":\"newpass\"}}}"
```

> A new token will be issued after your next login with `rctl`
49 changes: 48 additions & 1 deletion docs/guides/running-with-docker-or-compose.md
Original file line number Diff line number Diff line change
@@ -1 +1,48 @@
Coming soon!
This is a short-guide about running the dockerized version of Routr Server.

## Run Environment

Run environment variables are used in the entry point script to render configuration templates. The values of this variables can be specified during docker run, or in Kubernetes manifests in the env array.

- ROUTR_JAVA_OPTS
- ROUTR_EXTERN_ADDR
- ROUTR_LOCALNETS
- ROUTR_REGISTRAR_INTF
- ROUTR_DS_PROVIDER
- ROUTR_DS_PARAMETERS
- ROUTR_CONFIG_FILE
- ROUTR_SALT

## Usage

### Running with docker (pre-built)

**Pull the images**

`docker pull fonoster/routr`

**To run:**

```bash
docker run -it \
-p 4567:4567 \
-p 5060:5060 \
-p 5060:5060/udp \
-p 5061-5063:5061-5063 \
-e ROUTR_EXTERN_ADDR=${your host address} \
fonoster/routr
```

### Running with docker-compose

**Pull the images**

`docker-compose pull`

**To run:**

`docker-compose up --abort-on-container-exit`

**Destroying the container**

`docker-compose down`
49 changes: 12 additions & 37 deletions docs/introduction/faq.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,23 @@
Here is a list of common questions we get.
### What is Routr?

## 1. How do I change the server's password?
Routr is an open-source SIP Server and tooling to deploy VoIP networks. See the [overview](/introduction/overview).

If you are using the `files_data_provider` then you must change the password in the `users.yml` file. For the `redis_data_provider` follow this steps:
### What dependencies does Routr have?

First run the command `redis-cli smembers users` to obtain the reference to the user. Here is an example:
The main Routr server runs standalone and has no external dependencies.

```
$ redis-cli smembers users
1) "5aa69ead8fd6861d92385bac"
```
Then, retrieve the document for reference running `redis-cli get {REF}`. For example
### How does Routr compare with other SIP servers

```
$ redis-cli get 5aa69ead8fd6861d92385bac
"{\"apiVersion\":\"v1beta1\",\"kind\":\"User\",\"metadata\":{\"name\":\"Ctl\",\"ref\":\"5aa69ead8fd6861d92385bac\"},\"spec\":{\"credentials\":{\"username\":\"admin\",\"secret\":\"oldpass\"}}}"
```
See the [comparison page](/introduction/comparison).

Finally, search and change the old password and update your document using `redis-cli set {REF} {DOCUMENT}`. Like this:
### What language is Routr written in?

```
$ redis-cli set 5aa69ead8fd6861d92385bac
"{\"apiVersion\":\"v1beta1\",\"kind\":\"User\",\"metadata\":{\"name\":\"Ctl\",\"ref\":\"5aa69ead8fd6861d92385bac\"},\"spec\":{\"credentials\":{\"username\":\"admin\",\"secret\":\"newpass\"}}}"
```
Most Routr components are written in Javascript(with Oracle Nashorn). Some are also written in Java.

> A new token will be issued after your next login with `rctl`
### What will happen once Nashorn is deprecated?

## 2. How can I use `rctl` from a remote host?
The announcement Nashorn will soon be [deprecated](https://openjdk.java.net/jeps/335) is definitely a concern. The current course of action is to wait and see if GraalJS is viable replacement for Nashorn or completely re-write the project in Java. In either case, we believe we have time to make the decision later this year.

By default Routr installs a certificate that only allows for connections using the `localhost` or `127.0.0.1`. To use `rctl` tool from a remote host, you must generate a certificate that accepts connections to the desired domain name or ip and update the `spec.restService` section of the `config.yml`.
### What license is Routr released under?

Here is an example using a self-signed certificate(usually enough).

```bash
keytool -genkey -keyalg RSA \
-noprompt \
-alias routr \
-keystore api-cert.jks \
-storepass changeit \
-keypass changeit \
-validity 365 \
-keysize 2048 \
-dname "CN=domain.com, OU=OSS, O=Your Company Inc, L=Sanford, ST=NC, C=US" \
-ext SAN=dns:your.domain.com,dns:localhost,ip:127.0.0.1
```

> Remember to place the certificate in the `etc/certs` folder
Routr is released under the [MIT](https://opensource.org/licenses/MIT) license.
52 changes: 40 additions & 12 deletions docs/introduction/glossary.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
This following table features some important concepts, including the different routing types implemented by the server.

| Concept | Description |
| -- | -- |
| User | Users perform administrative actions on the server |
| Agent | Agents represent SIP endpoints such as softphones and IP phones |
| Domain | Enables the creation of isolated groups of Agents |
| Peer | Similar to Agents but without Domain boundaries |
| Gateway | SIP entity that allows call termination |
| DID | Routes and translate calls between the PSTN and Routr |
| Intra-Domain Routing | Routing type for calling within the same Domain |
| Domain Ingress Routing | Calling from the PSTN to an Agent or Peer |
| Domain Egress Routing | Calling from an Agent to the PSTN thru a Gateway |
| Peer Egress Routing | Similar to *DER* but applies only to Peers |
### User

Users perform administrative actions on the server

### Agent

Agents represent SIP endpoints such as softphones and IP phones, or paging speakers

### Domain

Enables the creation of isolated groups of Agents

### Peer

Similar to Agents but without Domain boundaries

### Gateway

IP entity that allows call termination

### DID

Routes and translate calls between the PSTN and Routr

### Intra-Domain Routing (IDR)

Routing strategy for signaling within the same Domain

### Domain Ingress Routing (DIR)

Routing strategy use when an Agent or Peer must go outside the domain using
a Gateway

### Domain Egress Routing (DER)

Calling from an Agent to the PSTN thru a Gateway

### Peer Egress Routing (PER)

Similar to *DER* but applies only to Peers
42 changes: 8 additions & 34 deletions docs/introduction/installation.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,24 @@
There are no special requirements to install the server. Just download, decompress, and move the folder to a location of your choice.
There are no special requirements to install and run the server. Just follow this easy steps:

## Download the Server
➊ Download the server for your platform

| Platform | Download |
| -- | -- |
| Linux | [tar.gz](https://github.com/fonoster/routr/releases/download/1.0.0-rc1/routr-1.0.0-rc1_linux-x64_bin.tar.gz) |
| macOS | [tar.gz](https://github.com/fonoster/routr/releases/download/1.0.0-rc1/routr-1.0.0-rc1_osx-x64_bin.tar.gz) |
| Windows | [tar.gz](https://github.com/fonoster/routr/releases/download/1.0.0-rc1/routr-1.0.0-rc1_windows-x64_bin.tar.gz), [zip](https://github.com/fonoster/routr/releases/download/1.0.0-rc1/routr-1.0.0-rc1_windows-x64_bin.zip) |
| Docker | [img](https://hub.docker.com/r/fonoster/routr/) |

## Or Build from Source

> Building from source requires of Java 1.8+, Gradle, and NPM
➋ Then extract it:

```bash
git clone https://github.com/fonoster/routr
cd routr
npm i
npm run pack
tar xvfz routr-*.tar.gz
cd routr-*
```

## Running with Docker
➌ Run the server using the `routr` command

```bash
docker pull fonoster/routr
docker run -it \
-p 4567:4567 \
-p 5060:5060 \
-p 5060:5060/udp \
-p 5061-5063:5061-5063 \
-e ROUTR_EXTERN_ADDR=${your host address} \
fonoster/routr
./routr
```

## Running in any other Plattform

To start the server just run the script `./routr` at the root of this
project. Your output will look similar to this:

```bash
$ ./routr
[INFO ] Starting Routr
[INFO ] Listening @ 172.18.0.4:5060 [udp]
[INFO ] Listening @ 172.18.0.4:5060 [tcp]
[INFO ] Listening @ 172.18.0.4:5061 [tls]
[INFO ] Starting Location service
[INFO ] Starting Registry service
[INFO ] Starting Restful service on port 4567
```
> If you are interested in running Routr on Docker please see the guide [Running with Docker or Compose](https://routr.io/docs/guides/running-with-docker-or-compose/)
10 changes: 10 additions & 0 deletions docs/introduction/media.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
There is a [subreddit](https://www.reddit.com/r/Routr/) collecting all Routr-related resources on the internet.

The following selection of resources are particularly useful to get started with Routr.

## Blogs

Coming soon!

## Tutorials

- [Instructions and example a basic setup of Routr](https://routr.io/docs/guides/basic-setup/)
54 changes: 35 additions & 19 deletions docs/introduction/overview.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,39 @@
**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. It also provides with capabilities that are suitable for the enterprise and personal needs. To get involved in the development of this project please contact us at [@fonoster](https://twitter.com/fonoster).
## What is Routr?

[Routr](https://github.com/fonoster/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. It also provides with capabilities that are suitable for the enterprise and personal needs. To get involved in the development of this project please contact us at [@fonoster](https://twitter.com/fonoster).

## Features

- Proxy
- Registrar Service
- Location Service
- Call Forking
- Multi-Tenancy/Multi-Domain
- Access to the PSTN Using SIP Gateways
Routr's main features are:

- Typical Sip Server functions; Proxy, Registrar, Location Service
- Per node Multi-Tenancy/Multi-Domain with Domain level Access Control List
- Transport: TCP, UDP, TLS, WebSocket
- Data Sources: Redis, RESTful API, Files
- Security
- Digest SIP User Authentication
- Domain Access Control List (DACL)
- RESTful service secured with TLS and JWT tokens
- Rest API
- Command Line Tool for Admin Operations
- Routing Capabilities
- Intra-Domain Routing (IDR)
- Domain Ingress Routing(DIR)
- Domain Egress Routing (DER)
- Peer Egress Routing (PER)
- Routr currently support Redis, HTTP Requests, and YAML files as data source
- Server management and monitoring with the RESTful API, CLI, and Web Console
- Configurable routing strategies; Intra-Domain, Domain Ingress, Domain Egress and Peer Egress

## Components

The Routr ecosystem consists of three main components:

- The main [Routr server](https://github.com/fonoster/routr) server which acts as SIP server
- The command-line interface, [rctl](https://github.com/fonoster/routr-ctl), for remote management of the server
- A optional [web console](https://github.com/fonoster/routr-ui) for easy management of the server

## Architecture

This diagram illustrates the architecture of Routr and some of its ecosystem components:

<br/>
<img src="/assets/images/architecture.png" >
<br/>
<br/>

At the center of Routr are the routing rules. This rules are the core of Routr. In addition they are typical SIP Server the functions such as Proxy, Location, and Registrar. The main integration points are the data abstraction layer, the event publisher, and the RESTful API. This integration points, allow for easy integration with third party software.

## Use cases

Routr specializes in the management of SIP resources and a domain-centric routing strategies. It works well in front of the Media servers like Asterisk or FreeSWITCH. Routr runs in all mayor operating systems, in [Docker](https://www.docker.com/), and can be deployed as in cloud system such as [Kubernetes](https://kubernetes.io/).

Unlike Kamailio and OpenSIPS, Routr does not require of any type of scripting to perform any of its typical routing tasks. Routing is configure not programed. The monitoring tasks are centralized using a RESTful API, and from that API it is possible to control de service using command-line interface or the web UI.
18 changes: 17 additions & 1 deletion docs/introduction/roadmap.md
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
Coming soon!
The following is only a selection of some of the major features we plan to implement in the near future. To get a more complete overview of planned features and current work, see the issue trackers for the various repositories, for example, the [Routr server](https://github.com/fonoster/routr/issues).

## Accounting, Authentication and Authorization

Routr, does not currently provide any mechanism for aid the accounting. Our current priority is to implement a module to support pushing accounting, authentication and authorization events.

## IM and Presence

We understand that instant-messaging and presence are an important piece of any VoIP network. We are currently looking into the SIMPLE and XCAP protocols to provide IM and Presence in Routr.

## Per-domain Certificate

To secure the signal path, it is necessary to install a certificate. Routr, currently its only posible to install a single certificate with multiple-domains. In the future, we want to ease the certificate installation/updating process by allowing a per-domain certificate.

## Support the Ecosystem

In the near future we want to release a stable version of the [web UI](https://github.com/fonoster/routr-ui) which is one of our main strategy to facilitate the deployment of VoIP networks with Routr.
Loading

0 comments on commit 2678ec2

Please sign in to comment.