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.
This component is also responsible for handling the DTMF (Dual tone multi-frequency) signals that come when users press number keys on their phones. Such signals are forwarded to Automate as digits in plain text. RFC-4733 standard is supported for DTMF over SIP and sent in RTP by using 101 telephone-event codes.
API
Default REST API port: 8126.
Healthcheck endpoint: /healthCheck on port 8558
Other ports used: 2552, 9095
Databases
SQL
The component has its own SQL Database for storing information mapping of phone numbers with SIP Trunks, along with other necessary configuration.
Communication
This service communicates with external SIP servers and internal applications like Qpido and Dialog-sentione
Security
Endpoints are secured with static API key defined in config. Communication is only internal.
Configuration
The service configuration is located in the application.conf file, below is an example file with important values:
voice.gateway {
pbx.registrars: [
{
host: 1.2.3.4
port: 5060
name = default
username = "<USER>"
password = "<PASS>"
external-local-host: 1.2.3.4 // external/public IP on which Charon can be accessed
local-sip-port: 5060
destination-number-patterns: [] // those regex patterns are checked, when there is redirect from bot to agent number. If this number matches any of the regular expressions in list then this SIP Trunk is used.
}
]
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
}
}
scheduler { base-url: "http://qpido:8124"
api-key: "<QPIDO_API_KEY>" // Set in config for Qpido
type: QPIDO
}
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
}
network.interface: eth0 // interface to be used by SIP
rtp.network.interface: ens256 // interface to be used for RTP communication
sip.limit-messages-per-second: 1000
sip {
port.protocol {
receive: [udp]
send: udp
}
nat {
stunEnabled: false
stunServerAddress: 1.2.3.4
stunServerPort: 3478
stunConnectionTimeout: 1s
}
}
}
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 service
- 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
Updated 10 days ago
