Bonjour,
Today, Network issue for me.
The goal: Convert this docker-compose to Hashistack.
It’s a docker for Asterisk + FreePBX.
I have already a MariaDB with Consul Service Mesh running and OK.
After severals tests, I achieve a good result, I can reach FreePBX WebUI. I can create users (named extensions
in asterisk).
My iOS and macOS apps can connect to server.
So I make a call, it rings, I pick up and… No sound, and It hangs, and in logs, this error:
Disconnecting channel 'PJSIP/100-00000004' for lack of audio RTP activity in 30 seconds
This error is knows as a network issue.
Asterisk need lots of open ports. In my case, I use port range from 18000 to 18100.
In Nomad Job, it looks like:
group "izpbx" {
count = 1
restart {
attempts = 10
interval = "5m"
delay = "10s"
mode = "delay"
}
network {
mode = "bridge"
port "freepbxfop" {
to = 4445
static = 4445
}
port "freepbxjax" {
to = 4569
static = 4569
}
port "freepbxpjsip" {
to = 5060
static = 5060
}
port "freepbxsip" {
to = 5160
static = 5160
}
port "freepbxwebrtc" {
to = 8089
static = 8089
}
port "freepbxucp" {
to = 8001
static = 8001
}
port "freepbxucpssl" {
to = 8003
static = 8003
}
port "freepbxami" {
to = 8088
static = 8088
}
port "freepbxrtp0000" {
to = 18000
static = 18000
}
port "freepbxrtp0001" {
to = 18001
static = 18001
}
port "freepbxrtp0002" {
to = 18002
static = 18002
}
port "freepbxrtp0003" {
to = 18003
static = 18003
}
port "freepbxrtp0004" {
to = 18004
static = 18004
}
port "freepbxrtp0005" {
to = 18005
static = 18005
}
port "freepbxrtp0006" {
to = 18006
static = 18006
}
port "freepbxrtp0007" {
to = 18007
static = 18007
}
port "freepbxrtp0008" {
to = 18008
static = 18008
}
port "freepbxrtp0009" {
to = 18009
static = 18009
}
port "freepbxrtp0010" {
to = 18010
static = 18010
}
port "freepbxrtp0011" {
to = 18011
static = 18011
}
[...]
}
}
service {
name = "pbx-service-lan-group-01"
port = "80"
connect {
sidecar_service {}
sidecar_task {
resources {
cpu = 64
memory = 64
}
}
}
tags = [
"traefik.enable=true",
"traefik.http.routers.pbxservicelan.entrypoints=http",
"traefik.http.routers.pbxservicelan.rule=Host(`pbx.service.lan`)",
"traefik.http.routers.pbxservicelan.service=pbx-service-lan-group-01",
"prometheus.metrics.enable",
"app_name=izpbx"
]
}
service {
name = "pbx-service-lan-client-mesh-group-01"
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "mariadb"
local_bind_port = "3306"
}
}
}
sidecar_task {
resources {
cpu = 128
memory = 129
}
}
}
}
task "izpbx" {
driver = "docker"
config {
image = "docker.io/izdock/izpbx-asterisk:20.16.5"
privileged = true
#cap_add = ["NET_ADMIN"]
mount {
type = "bind"
target = "/data"
source = "/data/pbx.service.lan/data/data"
readonly = false
bind_options {
propagation = "rshared"
}
}
ports = ["freepbxfop","freepbxjax","freepbxpjsip","freepbxsip","freepbxwebrtc","freepbxucp","freepbxucpssl","freepbxami","freepbxrtp0000","freepbxrtp0001","freepbxrtp0002","freepbxrtp0003","freepbxrtp0004","freepbxrtp0005","freepbxrtp0006","freepbxrtp0007","freepbxrtp0008","freepbxrtp0009","freepbxrtp0010","freepbxrtp0011","freepbxrtp0012","freepbxrtp0013","freepbxrtp0014","freepbxrtp0015","freepbxrtp0016","freepbxrtp0017","freepbxrtp0018","freepbxrtp0019","freepbxrtp0020","freepbxrtp0021","freepbxrtp0022","freepbxrtp0023","freepbxrtp0024","freepbxrtp0025","freepbxrtp0026","freepbxrtp0027","freepbxrtp0028","freepbxrtp0029","freepbxrtp0030","freepbxrtp0031","freepbxrtp0032","freepbxrtp0033","freepbxrtp0034","freepbxrtp0035","freepbxrtp0036","freepbxrtp0037","freepbxrtp0038","freepbxrtp0039","freepbxrtp0040","freepbxrtp0041","freepbxrtp0042","freepbxrtp0043","freepbxrtp0044","freepbxrtp0045","freepbxrtp0046","freepbxrtp0047","freepbxrtp0048","freepbxrtp0049","freepbxrtp0050","freepbxrtp0051","freepbxrtp0052","freepbxrtp0053","freepbxrtp0054","freepbxrtp0055","freepbxrtp0056","freepbxrtp0057","freepbxrtp0058","freepbxrtp0059","freepbxrtp0060","freepbxrtp0061","freepbxrtp0062","freepbxrtp0063","freepbxrtp0064","freepbxrtp0065","freepbxrtp0066","freepbxrtp0067","freepbxrtp0068","freepbxrtp0069","freepbxrtp0070","freepbxrtp0071","freepbxrtp0072","freepbxrtp0073","freepbxrtp0074","freepbxrtp0075","freepbxrtp0076","freepbxrtp0077","freepbxrtp0078","freepbxrtp0079","freepbxrtp0080","freepbxrtp0081","freepbxrtp0082","freepbxrtp0083","freepbxrtp0084","freepbxrtp0085","freepbxrtp0086","freepbxrtp0087","freepbxrtp0088","freepbxrtp0089","freepbxrtp0090","freepbxrtp0091","freepbxrtp0092","freepbxrtp0093","freepbxrtp0094","freepbxrtp0095","freepbxrtp0096","freepbxrtp0097","freepbxrtp0098","freepbxrtp0099","freepbxrtp0100"]
}
I don’t know why there is no activity on ports named freepbxrtp000...
I use tcpdump portrange 18000-180100
and nothing appears.
But when I use: tcpdump port 5060
I can see activity with connections between peers.
I tried in other VM, as explained on izDock Github.
It works out-of-box and tcpdump
reveals traffic between port range 10000-20000.
Why I can see activity on port 5060 and not on other in range?
I reduce numbers of rtp ports. But it doesn’t work anymore.
Should I hang up a call from Nomad and only pick up the song from Docker-Compose?
Thanks!