Без опису

Hal De 6778140a9e template config 3 роки тому
configs 6778140a9e template config 3 роки тому
.gitignore daa0ee9fb8 initial 3 роки тому
.goreleaser.yml daa0ee9fb8 initial 3 роки тому
Dockerfile daa0ee9fb8 initial 3 роки тому
LICENSE daa0ee9fb8 initial 3 роки тому
README.md e7dbe25487 README updated 3 роки тому
go.mod daa0ee9fb8 initial 3 роки тому
go.sum daa0ee9fb8 initial 3 роки тому
main.go c56e6d05f2 ITLSEP/CTLSEP 3 роки тому

README.md

FreePBX tftp server

This is an advanced tftp server that automatically generates config files for cisco sip phones.

How it works

FreePBX server syncs with FreePBX. Binding users to phones is carried out through the fax field in the user properties from FreePBX. The tftp server receives a request for a file of the form SEP<MAC>.cfg.xml, makes a request to the FreePBX database, generates a config and sends it to the phone. All other files are taken from provided folder as-is.

Requirements:

Flags:

Usage of ./freepbx-tftp-server:
  -freepbx_db string
    	Set freepbx db connection string (default "asterisk:password@tcp(127.0.0.1)/asterisk")
  -sep_template_file string
    	Set path to sep template file (default "./sep-cisco.cnf.xml.tpl")
  -workdir string
    	Set working directory (default "/tftpboot")

flags may be set via ENV variables by capitalizing flag name, e.g.

SEP_TEMPLATE_FILE=/tftpboot/sep-cisco.cnf.xml.tpl

Sample docker-compose.yml:

version: '3'

services:
  tftp:
    container_name: tftp
    hostname: tftp
    build: https://gogs.halsbox.ru/hal/freepbx-tftp-server.git
    image: halsbox/freepbx-tftp-server:latest
    restart: always
    volumes:
    - ${PERSISTENT_STORAGE_PATH}/tftpboot:/tftpboot
    environment:
    - FREEPBX_DB=${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(${MYSQL_SERVER})/${MYSQL_DATABASE}
    - SEP_TEMPLATE_FILE=/tftpboot/sep-cisco.cnf.xml.tpl
    network_mode: host