Add playbook for osips+diam setup

- installs go
- sets up cgrates
- installs nightly version of opensips and modules
- uses the prepaid opensips.cfg from tutorials by default
- installs and sets up freediameter
- installs pjsua and helper scripts
This commit is contained in:
ionutboangiu
2024-05-01 16:56:24 +03:00
committed by Dan Christian Bogos
parent fc0666d2ac
commit ca0b9870b7
5 changed files with 75 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ loadmodule "sipmsgops.so"
#### FIFO Management Interface
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/run/opensips/opensips_fifo")
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)
#### USeR LOCation module

View File

@@ -58,7 +58,7 @@ loadmodule "sipmsgops.so"
#### FIFO Management Interface
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/run/opensips/opensips_fifo")
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)
#### USeR LOCation module
@@ -224,7 +224,7 @@ route[handle_answer] {
route[handle_hangup] {
$var(duration) = $Ts - $dlg_val(answertime);
exec("/usr/share/cgrates/tutorials/osips_diam/etc/opensips/unix2ntp", "$dlg_val(answertime)", $var(answertime32bit), , );
exec("/usr/local/bin/unix2ntp", "$dlg_val(answertime)", $var(answertime32bit), , );
$var(payload) = "[
{ \"Session-Id\": \"" + $dlg_val(callid) + "\" },
{ \"Origin-Host\": \"client.diameter.test\" },

View File

@@ -58,7 +58,7 @@ loadmodule "sipmsgops.so"
#### FIFO Management Interface
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/run/opensips/opensips_fifo")
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)
#### USeR LOCation module
@@ -177,7 +177,7 @@ route{
# use the unix2ntp helper script to convert unix time to 32bit format
# for the Event-Timestamp AVP
# can this be done directly inside the cfg file?
exec("/usr/share/cgrates/tutorials/osips_diam/etc/opensips/unix2ntp", "$dlg_val(setuptime)", $var(setuptime32bit), , );
exec("/usr/local/bin/unix2ntp", "$dlg_val(setuptime)", $var(setuptime32bit), , );
# Send blocking CCR INITIAL_REQUEST and retrieve MaxUsage
$var(payload) = "[
@@ -272,7 +272,7 @@ route{
route[handle_answer] {
$dlg_val(answertime) = $Ts;
exec("/usr/share/cgrates/tutorials/osips_diam/etc/opensips/unix2ntp", "$dlg_val(answertime)", $dlg_val(answertime32bit), , );
exec("/usr/local/bin/unix2ntp", "$dlg_val(answertime)", $dlg_val(answertime32bit), , );
$var(payload) = "[
{ \"Session-Id\": \"" + $dlg_val(callid) + "\" },
{ \"Origin-Host\": \"client.diameter.test\" },