diff --git a/data/tutorial_tests/osips/opensips/etc/opensips/opensips.cfg b/data/tutorial_tests/osips/opensips/etc/opensips/opensips.cfg index 334653a45..67f12749e 100644 --- a/data/tutorial_tests/osips/opensips/etc/opensips/opensips.cfg +++ b/data/tutorial_tests/osips/opensips/etc/opensips/opensips.cfg @@ -62,7 +62,7 @@ loadmodule "sipmsgops.so" #### FIFO Management Interface loadmodule "mi_fifo.so" -modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo") +modparam("mi_fifo", "fifo_name", "/run/opensips/opensips_fifo") modparam("mi_fifo", "fifo_mode", 0666) #### USeR LOCation module diff --git a/data/tutorials/osips/opensips/etc/opensips/opensips.cfg b/data/tutorials/osips/opensips/etc/opensips/opensips.cfg index ce4a624a5..8cf5d980c 100644 --- a/data/tutorials/osips/opensips/etc/opensips/opensips.cfg +++ b/data/tutorials/osips/opensips/etc/opensips/opensips.cfg @@ -59,7 +59,7 @@ loadmodule "sipmsgops.so" #### FIFO Management Interface loadmodule "mi_fifo.so" -modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo") +modparam("mi_fifo", "fifo_name", "/run/opensips/opensips_fifo") modparam("mi_fifo", "fifo_mode", 0666) #### USeR LOCation module diff --git a/data/tutorials/osips_diam/etc/opensips/opensips_acc.cfg b/data/tutorials/osips_diam/etc/opensips/opensips_acc.cfg index 4b39b63e4..1da12b68d 100644 --- a/data/tutorials/osips_diam/etc/opensips/opensips_acc.cfg +++ b/data/tutorials/osips_diam/etc/opensips/opensips_acc.cfg @@ -58,7 +58,7 @@ loadmodule "sipmsgops.so" #### FIFO Management Interface loadmodule "mi_fifo.so" -modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo") +modparam("mi_fifo", "fifo_name", "/run/opensips/opensips_fifo") modparam("mi_fifo", "fifo_mode", 0666) #### USeR LOCation module diff --git a/data/tutorials/osips_diam/etc/opensips/opensips_ccr_postpaid.cfg b/data/tutorials/osips_diam/etc/opensips/opensips_ccr_postpaid.cfg index d4f783ff3..49e0bf5a3 100644 --- a/data/tutorials/osips_diam/etc/opensips/opensips_ccr_postpaid.cfg +++ b/data/tutorials/osips_diam/etc/opensips/opensips_ccr_postpaid.cfg @@ -58,7 +58,7 @@ loadmodule "sipmsgops.so" #### FIFO Management Interface loadmodule "mi_fifo.so" -modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo") +modparam("mi_fifo", "fifo_name", "/run/opensips/opensips_fifo") modparam("mi_fifo", "fifo_mode", 0666) #### USeR LOCation module diff --git a/data/tutorials/osips_diam/etc/opensips/opensips_ccr_prepaid.cfg b/data/tutorials/osips_diam/etc/opensips/opensips_ccr_prepaid.cfg index 31198f01b..8b3db3b18 100644 --- a/data/tutorials/osips_diam/etc/opensips/opensips_ccr_prepaid.cfg +++ b/data/tutorials/osips_diam/etc/opensips/opensips_ccr_prepaid.cfg @@ -58,7 +58,7 @@ loadmodule "sipmsgops.so" #### FIFO Management Interface loadmodule "mi_fifo.so" -modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo") +modparam("mi_fifo", "fifo_name", "/run/opensips/opensips_fifo") modparam("mi_fifo", "fifo_mode", 0666) #### USeR LOCation module diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 2fe838906..83392403c 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -128,11 +128,11 @@ Regarding the SIP Servers, click on the tab corresponding to the choice you made .. code-block:: bash - curl https://apt.opensips.org/opensips-org.gpg -o /usr/share/keyrings/opensips-org.gpg - echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bookworm 3.4-releases" >/etc/apt/sources.list.d/opensips.list - echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bookworm cli-nightly" >/etc/apt/sources.list.d/opensips-cli.list + sudo curl https://apt.opensips.org/opensips-org.gpg -o /usr/share/keyrings/opensips-org.gpg + echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bullseye 3.5-releases" | sudo tee /etc/apt/sources.list.d/opensips.list + echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bullseye cli-nightly" | sudo tee /etc/apt/sources.list.d/opensips-cli.list sudo apt-get update - sudo apt-get install opensips opensips-mysql-module opensips-cgrates-module opensips-cli + sudo apt-get install opensips opensips-mysql-module opensips-cgrates-module opensips-cli -y Configuration and initialization -------------------------------- @@ -216,28 +216,18 @@ Regarding the SIP Servers, we have prepared custom configurations in advance, as - *residential* configuration; - user accounts configuration not needed since it's enough for them to only be defined within CGRateS; - for simplicity, no authentication was configured (WARNING: Not suitable for production). - - creating database for the DRouting module, using the following command: .. code-block:: bash - opensips-cli -x database create + sudo opensips-cli -x database create - After creating the database for DRouting module populate the tables with routing info: - - .. code-block:: bash - - insert into dr_gateways (gwid,type,address) values("gw2_1",0,"sip:127.0.0.1:5082"); - insert into dr_gateways (gwid,type,address) values("gw1_1",0,"sip:127.0.0.1:5081"); - insert into dr_carriers (carrierid,gwlist) values("route1","gw1_1"); - insert into dr_carriers (carrierid,gwlist) values("route2","gw2_1"); - To start OpenSIPS_ with the prepared custom configuration, run: .. code-block:: bash sudo mv /etc/opensips /etc/opensips.old - sudo cp -r /usr/share/cgrates/tutorials/osips/opensips/etc/opensips /etc + sudo cp -r /usr/share/cgrates/tutorial_tests/osips/opensips/etc/opensips /etc sudo systemctl restart opensips @@ -245,96 +235,9 @@ Regarding the SIP Servers, we have prepared custom configurations in advance, as .. code-block:: bash - opensips-cli -x mi uptime + sudo opensips-cli -x mi uptime - Since we are using OpenSIPS_ with DRouting module we have to set up a SIP entity that OpenSIPS_ can forward the calls to for our setup. - In this example we use SIPp a free Open Source test tool / traffic generator for the SIP protocol. - The install SiPp use commands below : - - .. code-block:: bash - - apt update - apt install git pkg-config dh-autoreconf ncurses-dev build-essential libssl-dev libpcap-dev libncurses5-dev libsctp-dev lksctp-tools cmake - git clone https://github.com/SIPp/sipp.git - cd sipp - git checkout v3.7.0 - git submodule init - git submodule update - ./build.sh --common - cmake . -DUSE_SSL=1 -DUSE_SCTP=0 -DUSE_PCAP=1 -DUSE_GSL=1 - make all - make install - - - - Write SIPp XML scenario named uas.xml or to your liking with the content below,this scenario will simulate calls with OpenSIPS_ . - Change "OpenSIPS_IP" in the line ** with your OpenSIPS_ IP. - - .. code-block:: XML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Content-Length: 0 ]]> - - - Content-Type: application/sdp Content-Length: [len] v=0 o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=- c=IN IP[media_ip_type] [media_ip] t=0 0 m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> - - - - - Content-Length: 0 ]]> - - - - - - - - - - - - Run the SIPp with the command below: - - .. code-block:: bash - - sipp -sf uas.xml -p 5082 - @@ -383,7 +286,7 @@ Just as with the SIP Servers, we have also prepared configurations and init scri .. code-block:: bash - sudo systemctl restart opensips + sudo /usr/share/cgrates/tutorial_tests/osips/cgrates/etc/init.d/cgrates start .. note:: If you have chosen OpenSIPS_, CGRateS has to be started first since the dependency is reversed.