Coder Social home page Coder Social logo

Comments (13)

pixlcrashr avatar pixlcrashr commented on July 22, 2024

First of all, thanks for the issue!

What command did you execute to start the container?

from docker-altv-voice-server.

danilaplee avatar danilaplee commented on July 22, 2024

i added it to my docker compose like this:

voice:
    container_name: "altv_voice"
    image: eisengrind/altv-voice-server:release
    tty: true
    ports:
      - 7798:7798/tcp
      - 7798:7798/udp
      - 7799:7799/tcp
      - 7799:7799/udp
    environment:
      - ALTV_VOICE_SERVER_HOST=0.0.0.0
      - ALTV_VOICE_SERVER_PORT=7798
      - ALTV_VOICE_SERVER_PLAYER_HOST=my_server_ip
      - ALTV_VOICE_SERVER_PLAYER_PORT=7799
      - ALTV_VOICE_SERVER_SECRET=1234568

from docker-altv-voice-server.

pixlcrashr avatar pixlcrashr commented on July 22, 2024

First of all, there are no tcp connections provided by the voice server.

Second, you CAN NOT use the ip of the host system, as the container has its own separated network. Using the ports option, you can map the ports from the container to the host system (if the ports are unused on the host system, logically).

Thus, you have to use the ip 0.0.0.0 for ALTV_VOICE_SERVER_HOST and ALTV_VOICE_SERVER_PLAYER_HOST as, again, the Docker container does not know about the ip address of the host system. The step that the ports of the voice server are bound to the host network is done via ports.

Note that
the only thing that you have to consider is to provide the public ip address on the alt:V game server, where the voice server is reachable from.

ALTV_VOICE_SERVER_PLAYER_HOST is only used to provide a separate ip address for the port where the players connect to.

E.g. this problem is not related to the image itself.

from docker-altv-voice-server.

pixlcrashr avatar pixlcrashr commented on July 22, 2024

Though, one thing I don't know is what parameters you provide to the game server (probably also running in a container, am I right?).

from docker-altv-voice-server.

danilaplee avatar danilaplee commented on July 22, 2024

yep I'am running a custom container with altv server and my altv config looks like this:

name: 'GTA'
host: 0.0.0.0
port: 8000
players: 128
announce: false
gamemode: Freeroam
website: 'gta'
language: "en"
description: 'GTA5'
useCdn: true
cdnUrl: 'my_domain'
debug: true
streamingDistance: 500
modules: [ node-module ]
voice: {
  bitrate: 64000
  externalSecret: 1234568
  externalHost: altv_voice
  externalPort: 7798
  externalPublicHost: my_server_ip
  externalPublicPort: 7799
}
resources: [
  gamemode
]

any my docker-compose entry for the container:

  gta:
    hostname: "dev-gta"
    image: my_registry
    tty: true
    ports:
      - 8000:8000/tcp
      - 8000:8000/udp
    restart: always
    volumes:
      - /data/cdnfiles:/usr/app/build/cdn_upload

from docker-altv-voice-server.

pixlcrashr avatar pixlcrashr commented on July 22, 2024

@danilaplee The problem is that you use alt_voice as a DNS name. Since the DNS system (at least common ones such as the one used by Docker) does not know the character _, so you will have to use the container name alt-voice and thus you also have to use the DNS name alt-voice.

Also notice that, as far as I discovered (altmp/altv-issues#565), it is by now not possible to configure custom ports in the config of the voice server. A fix for that would be to just map from the default voice server ports to the customized ports.

from docker-altv-voice-server.

pixlcrashr avatar pixlcrashr commented on July 22, 2024

@danilaplee Does it work now?

from docker-altv-voice-server.

danilaplee avatar danilaplee commented on July 22, 2024

nope this didn't help, and essentially this didn't change anything my docker's dns can handle underscores they are used quite wide in my system and cause no issues.
p.s. my guess is that this is related to the fact none of the containers run on the host system so there could definitely be some nat traversal issues with any kind of rtp connection
p.p.s. but essentially the main stoper for me is that there is no support for external sound card in altv so i can't really test even if the voice control works :)

from docker-altv-voice-server.

pixlcrashr avatar pixlcrashr commented on July 22, 2024

@danilaplee Could be. The thing is that I am not able to reproduce this error.

I used the following config:

version: "3"

services:
  voice:
    container_name: "altv-voice"
    image: eisengrind/altv-voice-server:release
    tty: true
    ports:
      - 8898:7798/udp
      - 8899:7799/udp
    environment:
      - ALTV_VOICE_SERVER_HOST=127.0.0.1
      - ALTV_VOICE_SERVER_PLAYER_HOST=127.0.0.1
      - ALTV_VOICE_SERVER_SECRET=1234568
  gta:
    hostname: "dev-gta"
    depends_on:
    - voice
    image: eisengrind/altv-server:release
    tty: true
    ports:
      - 7788:7788/tcp
      - 7788:7788/udp
    restart: always
    environment:
    - ALTV_SERVER_VOICE_BITRATE=64000
    - ALTV_SERVER_VOICE_EXTERNAL_SECRET=1234568
    - ALTV_SERVER_VOICE_EXTERNAL_HOST=altv-voice
    - ALTV_SERVER_VOICE_EXTERNAL_PORT=8898
    - ALTV_SERVER_VOICE_EXTERNAL_PUBLIC_HOST=dev-gta
    - ALTV_SERVER_VOICE_EXTERNAL_PUBLIC_PORT=8899

from docker-altv-voice-server.

pixlcrashr avatar pixlcrashr commented on July 22, 2024

Though, you should be able to test the Voice server as alt:V makes use of the Windows Sound Devices, I guess?

from docker-altv-voice-server.

danilaplee avatar danilaplee commented on July 22, 2024

Though, you should be able to test the Voice server as alt:V makes use of the Windows Sound Devices, I guess?

I'am using a soundcraft mtk-12 which uses a custom multichannel sounddriver, somehow altv doesn't recognize that i have mic on my channel 2 in my 12 channel setup :)
p.s. but anyway I'll have to fix this one day :) so I'll reply with a fix when i'll do this :)

from docker-altv-voice-server.

danilaplee avatar danilaplee commented on July 22, 2024

so this seems to be an issue with software provided by the altv community, the docker seems to be fine, but their piece of software doesnt accept changes to port

from docker-altv-voice-server.

pixlcrashr avatar pixlcrashr commented on July 22, 2024

@danilaplee Yep, I already noticed that.

But you can do a workaround with the NAT of the Docker container: Simply change the port mapping of the voice server container.

from docker-altv-voice-server.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.