dougbtv / docker-asterisk

Some dockerfiles for whipping up an asterisk server
283 stars 135 forks source link

Synology NAS Run Asterisk #57

Closed appsyscode closed 7 years ago

appsyscode commented 7 years ago

Hi, I tried to run the Docker out. The storage is running however, what is set to be no more than a port?

dougbtv commented 7 years ago

Unfortunately, I don't have a synology to replicate the environment with.

The usual run command that I recommend is:

# Run the main asterisk container.
docker run \
    --name asterisk \
    --net=host \
    -d -t dougbtv/asterisk

However, that may not work with the --net=host on the synology. In which case, I'd recommend you specify the ports in the run command:

docker run \
    --name asterisk \
    -p 5060:5060/udp \
    -p 10000-10010:10000-10010/udp \
    -d -t dougbtv/asterisk

That's enough for 10 channels of audio with that RTP range (10000-10010). Notably, you'll also have to modify rtp.conf or you may run into issues with audio, so...

Make an rtp.conf file somewhere... let's say on your docker host (the nas) it's in the root (it could be somewhere that you prefer) /rtp.conf

[general]
;
; RTP start and RTP end configure start and end addresses
;
rtpstart=10000
rtpend=10010

and then run like this:

docker run \
    --name asterisk \
    -v /rtp.conf:/etc/asterisk/rtp.conf \
    -p 5060:5060/udp \
    -p 10000-10010:10000-10010/udp \
    -d -t dougbtv/asterisk