Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems using Masterisk-Manger as container in combination with IObroker/Asterisk-Adapter #26

Open
CrAICode opened this issue Nov 12, 2023 · 0 comments

Comments

@CrAICode
Copy link

Hello,
I used to installe asterisk manager as packages within an IOBroker docker container, but since in the latest debian versions, the asterisk manager is now longer included I needed another solution: I installed the asterisk manager as an separate docker container using this andrius-container. I set it up with a portainer docker compose file:
version: '3' services: iobroker: network_mode: "host" restart: always image: buanet/iobroker:latest container_name: iobroker-9 hostname: iobroker-9 ports: - "8081:8081" - "3671:3671" volumes: - /volume1/docker/iobroker-Chrisham:/opt/iobroker - /volume1/docker/userscripts:/opt/userscripts - /volume1/docker/Backup:/opt/backup/ environment: - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - DEBIAN_FRONTEND=teletype - LANG=de_DE.UTF-8 - LANGUAGE=de_DE:de - LC_ALL=de_DE.UTF-8 - SETGID=1000 - SETUID=1000 - TZ=Europe/Berlin - USBDEVICES=/dev/ttyUSB0 - PACKAGES=influxdb2-cli devices: - /dev/ttyUSB0:/dev/ttyUSB0 asterisk: network_mode: "host" restart: always image: chris-andri-asterisk:latest container_name: asterisk-9 ports: - "5038:5038" - "5060:5060" volumes: - /volume1/docker/asterisk/extensions.ael:/etc/asterisk/extensions.ael - /volume1/docker/asterisk/manager.conf:/etc/asterisk/manager.conf - /volume1/docker/asterisk/sip.conf:/etc/asterisk/sip.conf - /volume1/docker/asterisk/sip_fritzbox.conf:/etc/asterisk/sip_fritzbox.conf - /volume1/docker/asterisk/rtp.conf:/etc/asterisk/rtp.conf environment: - PACKAGES=ffmpeg lame sox libsox-fmt-mp3 influxdb: network_mode: "host" restart: always image: influxdb:latest container_name: influxdb-9 ports: - "8086:8086" volumes: - /volume1/docker/influxdb/config:/etc/influxdb2 - /volume1/docker/influxdb/data:/var/lib/influxdb2 environment: - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - GOSU_VER=1.12but - INFLUXDB_VERSION=2.7.1 - INFLUX_CLI_VERSION=2.7.3 - INFLUX_CONFIGS_PATH=/etc/influxdb2/influx-configs - INFLUXD_INIT_PORT=8086 - INFLUXD_INIT_PING_ATTEMPTS=600 - DOCKER_INFLUXDB_INIT_CLI_CONFIG_NAME=default - DOCKER_INFLUXDB_INIT_MODE=setup - DOCKER_INFLUXDB_INIT_USERNAME=iobroker - DOCKER_INFLUXDB_INIT_PASSWORD=*1Xs(QD5gY0!B&XHe1_x - DOCKER_INFLUXDB_INIT_ORG=smarthome - DOCKER_INFLUXDB_INIT_BUCKET=iobroker grafana: network_mode: "host" restart: always image: grafana/grafana:latest container_name: grafana-9 ports: - "3000:3000" volumes: - /volume1/docker/grafana:/var/lib/grafana - /volume1/docker/grafana:/var/lib/grafana/plugins - /volume1/docker/grafana/views/index.html:/usr/share/grafana/public/views/index.html - /volume1/docker/grafana/conf/defaults.ini:/usr/share/grafana/conf/defaults.ini
The chris-andri-asterisk:latest container image is derived from andrius container:
`# vim:set ft=dockerfile:
FROM alpine:latest

LABEL maintainer="Andrius Kairiukstis [email protected]"

ENV LANG=C.UTF-8
ENV LC_ALL C.UTF-8

RUN set -e
&& apk add --update --quiet
asterisk
asterisk-sample-config >/dev/null
ffmpeg
lame
sox
&& asterisk -U asterisk &>/dev/null
&& sleep 5s
&& [ "$(asterisk -rx "core show channeltypes" | grep PJSIP)" != "" ] && :
|| rm -rf /usr/lib/asterisk/modules/pj
&& pkill -9 ast
&& sleep 1s
&& truncate -s 0
/var/log/asterisk/messages
/var/log/asterisk/queue_log || :
&& mkdir -p /var/spool/asterisk/fax
&& chown -R asterisk: /var/spool/asterisk
&& rm -rf /var/run/asterisk/*
/var/cache/apk/*
/tmp/*
/var/tmp/*

EXPOSE 5038/udp 5038/tcp
VOLUME /var/lib/asterisk/sounds /var/lib/asterisk/keys /var/lib/asterisk/phoneprov /var/spool/asterisk /var/log/asterisk

ADD docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

ENTRYPOINT ["/docker-entrypoint.sh"]`

But still I have problems: The Asterisk adapter from IOBroker somehow seems to connect:
asterisk-connected

But then later comes these errors:
asterisk-error

Any ideas what the problem could be?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant