Sign inSign up

mich43l/opensips

By mich43l

Updated 7 months ago

Opensips/sip proxy on docker

Image
Networking
0

1.1K

mich43l/opensips repository overview

OpenSIPS Docker Image

Debian OpenSips imgsize dockerautomated

This Docker image provides a pre-configured OpenSIPS environment, simplifying deployment and ensuring consistency. It's built on Debian Bookworm and includes many commonly used OpenSIPS modules, along with the opensips-cli for command-line interaction.

Features

  • Debian Bookworm Base: Provides a stable and up-to-date foundation.
  • OpenSIPS Version: Uses a configurable OpenSIPS version (default: 3.4). Set the OPENSIPS_VERSION build argument to change this.
  • Comprehensive Module Set: Includes a large selection of OpenSIPS modules (see Dockerfile for the full list).
  • OpenSIPS CLI: The OpenSIPS command-line interface is included for easy management and troubleshooting. Disable with OPENSIPS_CLI=false build argument.
  • Timezone Configuration: Sets the timezone within the container using the TZ environment variable.
  • Configuration: Includes a default OpenSIPS configuration located at /etc/opensips/opensips.cfg. You can mount your own configuration file to this location.
  • Service Management: Uses /etc/service and a run script for managing the OpenSIPS service.

Usage

Building the Image

Clone this repository and build the Docker image:

git clone [https://github.com/your-username/opensips-docker.git](https://www.google.com/search?q=https://github.com/your-username/opensips-docker.git)  # Replace with your repo URL
cd opensips-docker
docker build -t opensips:latest .

You can customize the OpenSIPS version by setting the OPENSIPS_VERSION build argument:

docker build -t opensips:3.5 -f Dockerfile --build-arg OPENSIPS_VERSION=3.5 .

To disable the OpenSIPS CLI, use:

docker build -t opensips:no-cli -f Dockerfile --build-arg OPENSIPS_CLI=false .

Running the Container Run the Docker container, mapping port 5060 (UDP) and setting the timezone:

docker run -d -p 5060:5060/udp -e TZ="Your/Timezone" -v /path/to/your/opensips.cfg:/etc/opensips/opensips.cfg opensips:latest

Replace Your/Timezone with your desired timezone (e.g., America/New_York, Europe/London, Asia/Ho_Chi_Minh). Mount your custom opensips.cfg file by replacing /path/to/your/opensips.cfg with the actual path.

For more complex deployments, using Docker Compose is recommended. Create a docker-compose.yml file:

version: "3.9"  # Or your preferred version

services:
  opensips:
    image: opensips:latest
    ports:
      - "5060:5060/udp"
    environment:
      TZ: "Your/Timezone"
    volumes:
      - ./your_opensips_config:/etc/opensips/opensips.cfg # Mount your config
    restart: always # Optional: Restart policy

Then, start the container using Docker Compose:

docker-compose up -d

Customizing the Configuration The default OpenSIPS configuration is located at /etc/opensips/opensips.cfg inside the container. You can customize this configuration by mounting your own file to this path using the -v flag (as shown in the examples above).

Tag summary

Content type

Image

Digest

sha256:05e9408ac

Size

489.8 MB

Last updated

7 months ago

docker pull mich43l/opensips