mirror of
https://github.com/jambonz/jambonz-infrastructure.git
synced 2026-01-25 02:08:27 +00:00
Merge branch 'main' of github.com:jambonz/jambonz-infrastructure into main
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -5,4 +5,7 @@
|
||||
gcp.json
|
||||
|
||||
data_volume/
|
||||
tmpAudio/
|
||||
tmpAudio/
|
||||
|
||||
.idea
|
||||
*.iml
|
||||
@@ -9,7 +9,7 @@
|
||||
<param name="rfc2833-pt" value="101"/>
|
||||
|
||||
<param name="dtmf-type" value="rfc2833"/>
|
||||
|
||||
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
<param name="rtp-ip" value="$${local_ip_v4}"/>
|
||||
<param name="sip-ip" value="$${local_ip_v4}"/>
|
||||
@@ -18,7 +18,8 @@
|
||||
<param name="ext-sip-ip" value="$${local_ip_v4}"/>
|
||||
<param name="auth-calls" value="false"/>
|
||||
<param name="enable-timer" value="false"/>
|
||||
<param name="user-agent-string" value="Jambonz media gateway"/>
|
||||
<param name="user-agent-string" value="$${media_server_name} media gateway"/>
|
||||
<param name="username" value="$${media_server_name}"/>
|
||||
<param name="apply-nat-acl" value="nat.auto"/>
|
||||
<param name="context" value="mrf"/>
|
||||
<param name="rtp-timer-name" value="soft"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
if [ "$1" == "yes" ]; then
|
||||
if [ "$DD_INSTALL" == "yes" ] && [ "$DD_KEY" != "" ]; then
|
||||
echo installing datadog...
|
||||
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=your-dd-key-here bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=${DD_KEY} bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
fi
|
||||
@@ -130,8 +130,9 @@ sudo cp /usr/local/src/freeswitch/conf/vanilla/autoload_configs/modules.conf.xml
|
||||
sudo cp /tmp/freeswitch.service /etc/systemd/system
|
||||
sudo chown root:root -R /usr/local/freeswitch
|
||||
sudo chmod 644 /etc/systemd/system/freeswitch.service
|
||||
sudo sed -i -e 's/global_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/global_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e 's/outbound_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/outbound_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e "s/global_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/global_codec_prefs=${PREFERRED_CODEC_LIST}/g" /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e "s/outbound_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/outbound_codec_prefs=${PREFERRED_CODEC_LIST}/g" /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e "s/outbound_codec_prefs=PCMU,PCMA,OPUS,G722/a <X-PRE-PROCESS cmd='set' data='media_server_name=${MEDIA_SERVER_NAME}'/>" /usr/local/freeswitch/conf/vars.xml
|
||||
sudo systemctl enable freeswitch
|
||||
sudo cp /tmp/freeswitch_log_rotation /etc/cron.daily/freeswitch_log_rotation
|
||||
sudo chown root:root /etc/cron.daily/freeswitch_log_rotation
|
||||
|
||||
@@ -2,12 +2,15 @@
|
||||
"variables": {
|
||||
"region": "us-east-1",
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz feature server",
|
||||
"ami_description": "jambonz feature server",
|
||||
"instance_type": "t2.xlarge",
|
||||
"drachtio_version": "v0.8.13-rc1",
|
||||
"jambonz_version": "v0.6.7-rc8",
|
||||
"install_telegraf": "yes",
|
||||
"install_datadog": "no"
|
||||
"install_datadog": "no",
|
||||
"datadog_key" : "",
|
||||
"mediaserver_name" : "jambonz",
|
||||
"preferred_codec_list" : "PCMU,PCMA,OPUS,G722"
|
||||
},
|
||||
"builders": [{
|
||||
"type": "amazon-ebs",
|
||||
@@ -63,8 +66,8 @@
|
||||
"ssh-keyscan github.com >> ~/.ssh/known_hosts",
|
||||
"mkdir ~/apps",
|
||||
"cd ~/apps",
|
||||
"git clone git@github.com:jambonz/jambonz-feature-server.git -b {{user `jambonz_version`}}",
|
||||
"git clone git@github.com:jambonz/fsw-clear-old-calls.git -b {{user `jambonz_version`}}",
|
||||
"git clone https://github.com/jambonz/jambonz-feature-server.git -b {{user `jambonz_version`}}",
|
||||
"git clone https://github.com/jambonz/fsw-clear-old-calls.git -b {{user `jambonz_version`}}",
|
||||
"sudo find / -name authorized_keys | sudo xargs -0 -r rm -Rf"
|
||||
]
|
||||
},
|
||||
@@ -83,7 +86,11 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_datadog`}}",
|
||||
"environment_vars": [
|
||||
"DD_KEY={{user `datadog_key`}}",
|
||||
"DD_INSTALL={{user `install_datadog`}}"
|
||||
],
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}'",
|
||||
"script": "scripts/install_datadog.sh"
|
||||
},
|
||||
{
|
||||
@@ -93,6 +100,10 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"environment_vars": [
|
||||
"MEDIA_SERVER_NAME={{user `mediaserver_name`}}",
|
||||
"PREFERRED_CODEC_LIST={{user `preferred_codec_list`}}"
|
||||
],
|
||||
"script": "scripts/install_freeswitch.sh"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
if [ "$1" == "yes" ]; then
|
||||
if [ "$DD_INSTALL" == "yes" ] && [ "$DD_KEY" != "" ]; then
|
||||
echo installing datadog...
|
||||
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=your-dd-key-here bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=${DD_KEY} bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
fi
|
||||
@@ -10,6 +10,7 @@
|
||||
"rtp_engine_min_port": "40000",
|
||||
"rtp_engine_max_port": "60000",
|
||||
"install_datadog": "no",
|
||||
"datadog_key" : "",
|
||||
"install_telegraf": "yes"
|
||||
},
|
||||
"builders": [{
|
||||
@@ -81,7 +82,11 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_datadog`}}",
|
||||
"environment_vars": [
|
||||
"DD_KEY={{user `datadog_key`}}",
|
||||
"DD_INSTALL={{user `install_datadog`}}"
|
||||
],
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}'",
|
||||
"script": "scripts/install_datadog.sh"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
if [ "$DD_INSTALL" == "yes" ] && [ "$DD_KEY" != "" ]; then
|
||||
echo installing datadog...
|
||||
|
||||
if [ "$1" == "yes" ]; then
|
||||
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=your-dd-key-here bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
fi
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=${DD_KEY} bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
fi
|
||||
@@ -7,6 +7,7 @@
|
||||
"drachtio_version": "v0.8.13-rc1",
|
||||
"jambonz_version": "v0.6.7-rc8",
|
||||
"install_datadog": "no",
|
||||
"datadog_key" : "",
|
||||
"install_telegraf": "yes"
|
||||
},
|
||||
"builders": [{
|
||||
@@ -87,7 +88,11 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_datadog`}}",
|
||||
"environment_vars": [
|
||||
"DD_KEY={{user `datadog_key`}}",
|
||||
"DD_INSTALL={{user `install_datadog`}}"
|
||||
],
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}'",
|
||||
"script": "scripts/install_datadog.sh"
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user