<commit_before># Sip I/O

This is a basic sip server built using Javascript over the JVM (with Nashorn). 
At the moment you can create sip accounts and you can group those accounts by domains.

## Current features include

Sip server features

- Proxy
- Registrar service
- Location service (In-memory)
- Rest service

Transport

- UDP 

Security

- Digest SIP User authentication
- Domain security via ACL (Work in-progress)
- I'm working on implementing TLS

## Requirement

* Java 1.9+
* Gradle

## Installation

To download repo and get the dependencies

```bash
git clone https://github.com/psanders/sip.io.git
cd sip.io
gradle getDeps
```

You must install Java 9 and point your JAVA_HOME to your JDK 9 to run 
this app. You can overwrite the JAVA_HOME at the file ./sipio.

## Configuring domains and agents

Sip devices or endpoints are known in Sip I/O as agents. For two agents
to be able to call each other they must be in the same domain. An agent
may belong to more than one domain.

Domains can be found at `config/domains.yml`. The example below
enables communication between all agents at Ocean New York.

```yml
- kind: Domain
  apiVersion: v1
  metadata:
    name: New York Office
  uri: ny.ocean.com
```

Agents can be configured at `config/agents.yml`. In the following example
agent "<NAME>" has access to both domains, Ocean New York and Ocean Texas.

```yml
- kind: Agent
  apiVersion: v1
  metadata:
    name: <NAME>
  username: jhondoe
  secret: yoursecret
  domains:
    - ny.ocean.com  # This must be defined at config/domains.yml
    - tx.ocean.com  # This must be defined at config/domains.yml
```

To setup your sip device use information found in `config/agents.yml`.
Also, you must use the IP of Sip I/O as your OUTBOUND PROXY.

## Sending and receiving calls from the PSTN

To send and receive calls from the PSTN you must add a gateway. Gateways
are define at `config/gateways.yml`. The next example, shows the configuration
for a gateway. Sip I/O will register with this Gateway using the parameter 'host'
and the parameter 'registries'.

```yml
- kind: Gateway
  apiVersion: v1
  id: '12345'<commit_msg>Fixed typos on README.md<commit_after># Sip I/O

Sip I/O is a sip proxy, location server, and registrar built using 
Javascript over the JVM (with Nashorn). 

At the moment you can add your sip devices and group them using domains.
You can also connect with the PSTN using a Sip Gateway.

`Disclaimer: This is an experimental project. I may or may not continue
this work in the future.`

## Current features include

Sip server features

- Proxy
- Registrar service
- Location service (In-memory)
- Rest service

Transport

- UDP 

Security

- Digest SIP User authentication
- Domain security via ACL (Work in-progress)
- I'm working on implementing TLS

## Requirement

* Java 1.9+
* Gradle

## Installation

To download repo and get the dependencies

```bash
git clone https://github.com/psanders/sip.io.git
cd sip.io
gradle getDeps
```

You must install Java 9 and point your JAVA_HOME to your JDK 9 to run 
this app. You can overwrite the JAVA_HOME at the file ./sipio.

## Configuring domains and agents

Sip devices or endpoints are known in Sip I/O as agents. For two agents
to be able to call each other they must be in the same domain. An agent
may belong to more than one domain.

Domains can be found at `config/domains.yml`. The example below
enables communication between all agents at Ocean New York.

```yml
- kind: Domain
  apiVersion: v1
  metadata:
    name: New York Office
  uri: ny.ocean.com
```

Agents can be configured at `config/agents.yml`. In the following example
agent "<NAME>" has access to both domains, Ocean New York and Ocean Texas.

```yml
- kind: Agent
  apiVersion: v1
  metadata:
    name: <NAME>
  username: jhondoe
  secret: yoursecret
  domains:
    - ny.ocean.com  # This must be defined at config/domains.yml
    - tx.ocean.com  # This must be defined at config/domains.yml
```

To setup your sip device use information found in `config/agents.yml`.
Also, you must use the IP of Sip I/O as your OUTBOUND PROXY.

## Sending and receiving calls from the PSTN

To send and receive calls from the PSTN you must add a gateway. Gateways
are define at `config/gateways.yml`. The next example shows the configuration
for a gateway. Sip I/O will register with this Gateway using the parameter 'host'
and the parameter 'registries'.

```yml
- kind: Gateway
  apiVersion: v1
  id: '12345'
{'fraction_non_alphanumeric': 0.06974657995066158, 'fraction_numerical': 0.005382372729311505, 'mean_word_length': 3.588477366255144, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5573902', 'n_tokens_mistral': 1423, 'n_tokens_neox': 1319, 'n_words': 654}