Skip to content

Commit

Permalink
Merge pull request #494 from dOpensource/v0.72
Browse files Browse the repository at this point in the history
V0.72
  • Loading branch information
mackhendricks committed Mar 31, 2023
2 parents 8b22e9b + 13d45d6 commit 963de70
Show file tree
Hide file tree
Showing 97 changed files with 5,977 additions and 1,929 deletions.
495 changes: 487 additions & 8 deletions CHANGELOG.md

Large diffs are not rendered by default.

143 changes: 12 additions & 131 deletions docs/source/user/api.rst
Original file line number Diff line number Diff line change
@@ -1,164 +1,45 @@
API
===

+----------+----------------+---------------------------------------------------+
| KAMAILIO API |
+==========+================+===================================================+
| PUT | Update existing| N/A |
| | information at | |
| | endpoint | |
+----------+----------------+---------------------------------------------------+
| GET | Get Information| - /api/v1/kamailio/stats/ |
| | from Endpoint | - /api/v1/kamailio/reload/ |
+----------+----------------+---------------------------------------------------+
| POST | Create new | N/A |
| | information at | |
| | endpoint | |
+----------+----------------+---------------------------------------------------+
| DELETE | Delete | N/A |
| | information at | |
| | endpoint | |
+----------+----------------+---------------------------------------------------+

+----------+----------------+---------------------------------------------------+
| ENDPOINT API |
+==========+================+===================================================+
| PUT | Update existing| - /api/v1/endpoint/lease/<int:leaseid>/revoke |
| | information at | |
| | endpoint | |
+----------+----------------+---------------------------------------------------+
| GET | Get Information| - /api/v1/endpoint/lease/ |
| | from Endpoint | |
+----------+----------------+---------------------------------------------------+
| POST | Create new | - /api/v1/endpoint/<int:id> |
| | information at | |
| | endpoint | |
+----------+----------------+---------------------------------------------------+
| DELETE | Delete | N/A |
| | information at | |
| | endpoint | |
+----------+----------------+---------------------------------------------------+

+----------+----------------+---------------------------------------------------+
| INBOUND MAPPING API |
+==========+================+===================================================+
| PUT | Update existing| - /api/v1/inboundmapping |
| | information at | |
| | endpoint | |
+----------+----------------+---------------------------------------------------+
| GET | Get Information| - /api/v1/inboundmapping |
| | from Endpoint | |
+----------+----------------+---------------------------------------------------+
| POST | Create new | - /api/v1/inboundmapping |
| | information at | |
| | endpoint | |
+----------+----------------+---------------------------------------------------+
| DELETE | Delete | - /api/v1/inboundmapping |
| | information at | |
| | endpoint | |
+----------+----------------+---------------------------------------------------+

The steps to obtain the API Token key and using the different curl commands are listen below.

Note: Make sure to to login to your instance via ssh.
The complete API is defined as a public Postman Workspace, which can be found `here <https://www.postman.com/dopensource/workspace/dsiprouter/collection/4319695-9c09dea3-0b4b-4a20-a615-fb8fc16811af?action=share&creator=4319695>`_

The steps to obtain the API Token key and examples of using the API via curl are below, but we highly recommend using Postman for testing the API.

Getting Your Token
^^^^^^^^^^^^^^^^^^

Your token was provided to you after you installed dSIPRouter. You can reset your token if you didn't write it down, by executing the following command

.. code-block:: bash
DSIP_TOKEN=$(grep 'API_TOKEN' /etc/dsiprouter/gui/settings.py | cut -d "'" -f 2)
DSIP_HOSTNAME=<your ip or hostname>
DSIP_TOKEN=<your token>
dsiprouter setcredentials -ac $DSIP_TOKEN
Executing Kamailio stats API
^^^^^^^^^^^^^^^^^^^^^^^^^^^^


.. code-block:: bash
curl -H "Authorization: Bearer $DSIP_TOKEN"
-X GET http://demo.dsiprouter.org:5000/api/v1/kamailio/stats
One Line Version:

.. code-block:: bash
curl -H "Authorization: Bearer $DSIP_TOKEN" -X GET http://<addressOfYourInstance>:5000/api/v1/kamailio/stats
curl -k -H "Authorization: Bearer $DSIP_TOKEN" -X GET https://$DSIP_HOSTNAME:5000/api/v1/kamailio/stats
Executing Lease Point API
^^^^^^^^^^^^^^^^^^^^^^^^^
Getting the endlease
Create a new endpoint lease


.. code-block:: bash
curl -H "Authorization: Bearer $DSIP_TOKEN" -H "Content-Type: application/json"
-X GET "http://demo.dsiprouter.org:5000/api/v1/endpoint/lease?ttl=15&email=mack@dsiprouter.org"
curl -k -H "Authorization: Bearer $DSIP_TOKEN" -H "Content-Type: application/json" -X GET "https://$DSIP_HOSTNAME:5000/api/v1/endpoint/lease?ttl=15&email=mack@dsiprouter.org"
One Line Version:

.. code-block:: bash
curl -H "Authorization: Bearer $DSIP_TOKEN" -H "Content-Type: application/json" -X GET "http://demo.dsiprouter.org:5000/api/v1/endpoint/lease?ttl=15&email=mack@dsiprouter.org"
Revoking and replacing with your own lease ID

.. code-block:: bash
curl -H "Authorization: Bearer $DSIP_TOKEN" -H "Content-Type: application/json"
-X PUT "http://demo.dsiprouter.org:5000/api/v1/endpoint/lease/1/revoke"
One Line Version:

.. code-block:: bash
curl -H "Authorization: Bearer $DSIP_TOKEN" -H "Content-Type: application/json" -X PUT "http://demo.dsiprouter.org:5000/api/v1/endpoint/lease/1/revoke"
Inbound Mapping Valid commands
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

--------------------------
GET /api/v1/inboundmapping
--------------------------

.. code-block:: bash
curl -X GET -H "Authorization: Bearer ${token}" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping"
curl -X GET -H "Authorization: Bearer ${token}" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping?ruleid=3"
curl -X GET -H "Authorization: Bearer ${token}" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping?did=1313"
---------------------------
POST /api/v1/inboundmapping
---------------------------

.. code-block:: bash
curl -X POST -H "Authorization: Bearer ${token}" --connect-timeout 3 -H "Content-Type: application/json" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping" -d '{"did": "1313", "servers": ["66","67"], "notes": "1313 DID Mapping"}'
curl -X POST -H "Authorization: Bearer ${token}" --connect-timeout 3 -H "Content-Type: application/json" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping" -d '{"did": "1313","servers": ["66","67"]}'
curl -X POST -H "Authorization: Bearer ${token}" --connect-timeout 3 -H "Content-Type: application/json" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping" -d '{"did": "", "servers": ["66"], "notes": "Default DID Mapping"}'
---------------------------
PUT /api/v1/inboundmapping
---------------------------

.. code-block:: bash
curl -X PUT -H "Authorization: Bearer ${token}" --connect-timeout 3 -H "Content-Type: application/json" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping?ruleid=3" -d '{"did": "01234", "notes": "01234 DID Mapping"}'
curl -X PUT -H "Authorization: Bearer ${token}" --connect-timeout 3 -H "Content-Type: application/json" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping?did=1313" -d '{"servers": ["67"]}'
curl -X PUT -H "Authorization: Bearer ${token}" --connect-timeout 3 -H "Content-Type: application/json" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping?did=1313" -d '{"did": "01234", "notes": "01234 DID Mapping"}'
-------------------------------
DELETE /api/v1/inboundmapping
-------------------------------

.. code-block:: bash
curl -k -H "Authorization: Bearer $DSIP_TOKEN" -H "Content-Type: application/json" -X PUT "https://$DSIP_HOSTNAME:5000/api/v1/endpoint/lease/1/revoke"
curl -X DELETE -H "Authorization: Bearer ${token}" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping?ruleid=3"
curl -X DELETE -H "Authorization: Bearer ${token}" "http://demo.dsiprouter.org:5000/api/v1/inboundmapping?did=1313"
6 changes: 2 additions & 4 deletions docs/source/user/carrier_groups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,20 @@ To add an Endpoint, click the Endpoint tab.
.. image:: images/add_endpoint.png
:align: center

Click ADD, enter the Friendly name (optional), the IP address of the endpoint/device, # of characters to strip from RURI, the character to prefix to a RURI then click ADD again. RURI is when a number is dialed such as 9 plus the 1 and the number, a carrier may only want to see the phone number so the RURI would strip the "9" from in front of the telephone number. For example, if a PBX sends a number over as 914443332222 but the carrier wants the number to be sent as 14443332222 then the field should have a 1, which would strip off the 9. Some carriers request added digits, aka prefixes, in front of the phone number for validation that the call is from that carrier. In this example, the # of characters to strip from RURI is 0 as in none.

Click ADD, enter the Friendly name (optional), the IP address of the endpoint/device, # of characters to strip from RURI, the character to prefix to a RURI then click ADD again. For example, if a PBX sends a number over as 914443332222 but the carrier wants the number to be sent as 14443332222 then the # of characters to strip should be defined as 1, which would strip off the 9. Some carriers request added digits (aka Prefixes) in front of the phone number.


.. image:: images/add_new_carrier_details.png
:align: center

Edit and click ADD again to add addtional endpoints. Click the gray X in that box to save window and close.
Edit and click ADD again to add addtional endpoints. Click the gray X in that box to save the window and close.

You should now see your added carrier with endpoints in the Carrier Group List.

.. image:: images/carrier_group_list.png
:align: center



Be sure to click the Reload Kamailio button to apply changes.


Expand Down
5 changes: 3 additions & 2 deletions docs/source/user/command_line_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ upgrade Upgrade dSIPRouter platform (requires li
start Starts dSIPRouter
stop Stops dSIPRouter
restart Restarts dSIPRouter
chown Update file permissions for dSIPRouter and related services
configurekam Reconfigures the Kamailio configuration file based on dSIPRouter settings
configuresslcert Reconfigures SSL certificate used by Kamailio and dSIPRouter
configuredsip Reconfigures the dSIPRouter configuration file, updating dynamic settings
renewsslcert Renew configured letsencrypt SSL certificate
configuresslcert Reconfigures SSL certificate used by Kamailio and dSIPRouter
installmodules Install / uninstall dDSIProuter modules
resetpassword Generate new random dSIPRouter admin account password
setcredentials Set various credentials manually
chown Update file permissions for dSIPRouter and related services
version Show dSIPRouter version
help List all of the options
=================================== ======================================================================
Expand Down
3 changes: 0 additions & 3 deletions docs/source/user/debian_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
Installing on a Debian-based Distro
===================================

Note that this only covers one configuration with RTP traffic proxied.
Contributions of additional configurations are welcome if you have tested them!

For a specific version of dSIPRouter add "-b <version number>" to the end of the `git clone` command.

Make sure to **set the hostmane to a fully qualified domain name (FQDN)** that has DNS records pointed at the server (like sbc.yourdomain.com) prior to installation.
Expand Down
Binary file added docs/source/user/images/stir_shaken_settings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/user/images/upgrade_up_to_date.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions docs/source/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ dSIPRouter allows you to quickly turn `Kamailio <http://www.kamailio.org/>`_ int

- **Hosted PBX services:** Proxy SIP Endpoint requests to a multi-tenant PBX such as FusionPBX or single-tenant such as FreePBX. We have an integration with FusionPBX that make is really easy and scalable!

- **Microsoft Teams Direct Routing:** We can provide SBC functionality that allows dSIPRouter to interconnect your existing voice infrastructure or VoIP carrier to your Microsoft Teams environment.


Demo System
===========

You can checkout our demo system by clicking the link below and enter the listed username and password:



http://demo.dsiprouter.org:5000
http://demo.dsiprouter.net:5000


username: admin
Expand All @@ -40,9 +41,9 @@ I'd like to say thank you to Nicole D., John O. and Courtney G. for their time i
Support
=======

Free support is available via our `group <https://groups.google.com/forum/#!forum/dsiprouter/>`_
Free support is available via our `group <https://groups.google.com/forum/#!forum/dsiprouter/>`_ and `Slack <https://join.slack.com/t/dsiproutercommunity/shared_invite/zt-1dtqvpyck-H9k~DYgJJ2XIFgh_rWqdPA/>`_

Paid support is available `here <https://dOpensource.com/shop/>`_
Paid support is available `here <https://dopensource.com/product/dsiprouter-core/>`_

Installing dSIPRouter
^^^^^^^^^^^^^^^^^^^^^
Expand Down
16 changes: 5 additions & 11 deletions docs/source/user/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ Install dSIPRouter takes approximately 9-12 minutes to install. The following v

.. raw:: html

<object width="560" height="315"><param name="movie"
value="https://www.youtube.com/embed/Iu4BQkL1wGc"></param><param
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="https://www.youtube.com/embed/Iu4BQkL1wGc"
type="application/x-shockwave-flash" allowscriptaccess="always"
allowfullscreen="true" width=""
height="385"></embed></object>

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;">
<iframe src="https://www.youtube.com/embed/Iu4BQkL1wGc" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 560px; height: 315px;"></iframe>
</div>



Prerequisites:
Expand All @@ -33,7 +28,6 @@ Install Options
^^^^^^^^^^^^^^^^

- Proxy SIP Traffic Only (Don't Proxy audio (RTP) traffic)
- Proxy SIP Traffic and Audio when it detects a SIP Agent is behind NAT
- Proxy SIP Traffic, Audio and it configures the system to work properly when the PBX's and dSIPRouter are behind a NAT.

OS Support
Expand All @@ -55,7 +49,7 @@ Ubuntu 20.04 (focal) ALPHA


Kamailio will be automatically installed along with dSIPRouter.
Must be installed on a fresh install of Debian Stretch, Debian Buster or CentOS.
Must be installed on a fresh install of one of the supported operating systems.
You will not be prompted for any information. It will take anywhere from 9-12 minutes to install - depending on the processing power of the machine. You can secure the Kamailio database after the installation.

We maintain installation documentation for the following operating systems. Please open a pull request if you want to add and maintain addtional documentation:
Expand Down
6 changes: 3 additions & 3 deletions docs/source/user/rhel_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Installing on a RHEL-based Distro
=================================

Note that this only covers one configuration with RTP traffic proxied.
Contributions of additional configurations are welcome if you have tested them!

For a specific version of dSIPRouter add "-b <version number>" to the end of the `git clone` command.

Make sure to **set the hostmane to a fully qualified domain name (FQDN)** that has DNS records pointed at the server (like sbc.yourdomain.com) prior to installation.
The average install time is between 9-12 minutes depending on the resources on your vm/server and the options your specify.

Install (Don't Proxy audio (RTP) traffic)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
45 changes: 37 additions & 8 deletions docs/source/user/upgrade.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
Upgrading dSIPRouter
====================
Upgrading dSIPRouter
============================================

Auto Upgrade Feature (Released 0.72)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The dSIPRouter auto upgrade feature was released in 0.72. It allows you to upgrade dSIPRouter from the User Interface(UI) and the command line. If you are upgrading from 0.70 you will need to use the command line option since the 0.70 version doesn't have the upgrade feature builtin. Upgrading from 0.70 doesn't require a dSIPRouter Core Subscription license because this is the first release of the upgrade framework unless you need support during the upgrade process. However, future releases of dSIPRouter will require a Core Subscription License, which can be purchased from the `dSIPRouter Marketplace <https://dopensource.com/product/dsiprouter-core/>`_.

.. image:: images/upgrade_up_to_date.png
:align: center

Upgrade 0.70 to 0.72
^^^^^^^^^^^^^^^^^^^^
You can upgrade from 0.70 by doing the following

1. SSH to your dSIPRouter Instance
2. Run the following command

.. code-block:: bash
curl -s https://raw.githubusercontent.com/dOpensource/dsiprouter/v0.72/resources/upgrade/v0.72/scripts/bootstrap.sh | bash -s upgrade -rel v0.72
3. Login to the dSIPRouter UI to validate that the upgrade was successful.

Note, if the upgrade fails you can purchase a dSIPRouter Core Subscription which can be purchased from the `dSIPRouter Marketplace <https://dopensource.com/product/dsiprouter-core/>`_.This will provide you with support hours so that we can help with the upgrade.

Upgrade 0.644 to 0.72
^^^^^^^^^^^^^^^^^^^^^
There is no automated upgrade available from 0.644 to 0.72. Support is available via a dSIPRouter Core Subscription which can be purchased from the `dSIPRouter Marketplace <https://dopensource.com/product/dsiprouter-core/>`_.This will provide you with support hours so that we can help with the upgrade.


Upgrade 0.621 to 0.63
^^^^^^^^^^^^^^^^^^^^^
.. toctree::
:maxdepth: 2

upgrade_0.621_to_0.63.rst

Upgrade 0.522 to 0.523
^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -15,9 +49,4 @@ Upgrade 0.50 to 0.51

upgrade_0.50_to_0.51.rst

Upgrade 0.621 to 0.63
^^^^^^^^^^^^^^^^^^^^^
.. toctree::
:maxdepth: 2

upgrade_0.621_to_0.63.rst

0 comments on commit 963de70

Please sign in to comment.