version: '2'

networks:
  drachtio-fsmrf:
    driver: bridge
    ipam:
      config:
        - subnet: 172.28.0.0/16

services:
  drachtio-uac:
    image: drachtio/drachtio-server:latest
    command: drachtio --contact "sip:*;transport=udp" --loglevel debug
    container_name: drachtio-uac
    ports:
      - "9060:9022/tcp"
    networks:
      drachtio-fsmrf:
        ipv4_address: 172.28.0.10

  freeswitch-uac:
    image: drachtio/drachtio-freeswitch-mrf:v1.10.1-full
    command: freeswitch --sip-port 5060 --rtp-range-start 20000 --rtp-range-end 20020
    container_name: freeswitch-uac
    volumes:
      - ./sounds:/usr/local/freeswitch/sounds
    ports:
      - "9070:8021/tcp"
    networks:
      drachtio-fsmrf:
        ipv4_address: 172.28.0.11

  drachtio-sut:
    image: drachtio/drachtio-server:latest
    command: drachtio --contact "sip:*;transport=udp" --loglevel debug
    container_name: drachtio-sut
    ports:
      - "9061:9022/tcp"
    networks:
      drachtio-fsmrf:
        ipv4_address: 172.28.0.21

  freeswitch-sut:
    image: drachtio/drachtio-freeswitch-mrf:v1.10.1-full
    command: freeswitch --sip-port 5060 --rtp-range-start 20000 --rtp-range-end 20020
    container_name: freeswitch-sut
    volumes:
      - ./sounds:/usr/local/freeswitch/sounds
      - ./recordings:/tmp
    ports:
      - "9071:8021/tcp"
    networks:
      drachtio-fsmrf:
        ipv4_address: 172.28.0.22

  freeswitch-custom-profile-sut:
    image: byoungdale/drachtio-freeswitch-custom-mrf-profile:latest
    command: freeswitch --sip-port 5060 --rtp-range-start 20000 --rtp-range-end 20020
    container_name: freeswitch-custom-profile-sut
    volumes:
      - ./sounds:/usr/local/freeswitch/sounds
      - ./recordings:/tmp
    ports:
      - "9081:8021/tcp"
    networks:
      drachtio-fsmrf:
        ipv4_address: 172.28.0.23

  ws-server:
    image: drachtio/sample-ws-audio-fork:latest
    container_name: ws-server
    volumes:
      - ./recordings:/tmp
    networks:
      drachtio-fsmrf:
        ipv4_address: 172.28.0.30
