Charon

Voice Gateway - SIP integration

Charon is a software client for SIP telephone services. It can be a client of a SIP server as an internal account (extension) as well as terminating a sip-trunk with the propagation of telephone numbers inside it - it does not require any additional services to implement such a configuration
It enables the technical implementation of automatic telephone calls.

Configuration

The service configuration is located in the application.conf file, below is an example file with important values:

oice.gateway {
  pbx.registrars: [
    {
      host: 1.2.3.4
      port: 5060
      name = default
      local-sip-port: 5060
    }
  ]

  charon {
    rtp {
      jitter-buffer-size: 7
      first-packet-timeout: 5s
    }

  database {
      username = vg-admin
      password = ${DB_PASS}
      url = "jdbc:postgresql://example.org:5001/voice-gateway"
      driver = org.postgresql.Driver
      show-sql = false
      persistence = "postgres_pu"
      schema = charon
      liquibase.enabled = false
      db-properties {
        hibernate.generate_statistics = true
        hibernate.jmx.enabled = true
        hibernate.hikari.registerMbeans = true
        hibernate.hikari.poolName = charonHikariCP
      }
    }
    api {
      base-url: "http://0.0.0.0:8126"
      api-key: "<API_KEY>"
    }

    local-transfer-patterns: ["[0-9]{1,12}"]
  }


  pbx.sound.rtp.port {
    min: 20000
    max: 65529
  }


  rtp.network.interface: ens256
  sip.limit-messages-per-second: 1000


  sip {
    port.protocol {
      receive: [udp]
      send: udp
    }
  }
}

Field description:

  • pbx-registrars - defining basic network parameters to create a sip-trunk route, along with the ability to identify each of them by the 'name' parameter
  • rtp - defining the rtp transmission parameters
  • database - defining access parameters to the Postgresql database
  • api - defining access parameters to the prepared REST API for the website
  • local-transfer-patterns - a regular expression specifying connections to be made in a way other than SIP REFER
  • pbx.sound.port - definition of the port range for audio stream communication
  • rtp.network.interface - used when there is a configuration requirement to send the audio stream via an interface other than the default one
  • sip.port.protocol - definition of the SIP protocol communication type