Skip to content

WebTrit/webtrit_adapter

Repository files navigation

WebTrit Adapter

To start the WebTrit Adapter server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4001 from your browser.

Configuration

Environment variables descriptions:

  • LOGGER_LEVEL - the initial logger level, can be one of the following values: emergency, alert, critical, error, warning, notice, info, debug (optional, default value is info)
  • SKIP_MIGRATE_ON_STARTUP - skips running migrations on application startup (optional, default value is false for prod and true for all other env)
  • DATABASE_URL - Ecto.Repo URL; example: ecto://webtrit:webtrit_password@localhost/webtrit_adapter
  • SECRET_KEY_BASE - a secret key used as a base to generate secrets for encrypting and signing data; must remain the same after the first run; can be generated by: base64 < /dev/urandom | tr -d 'O0Il1+/' | head -c 64; printf '\n'
  • PORTABILLING_ADMINISTRATOR_URL - PortaBilling JSON API URL for administrators
  • PORTABILLING_ADMINISTRATOR_LOGIN - PortaBilling JSON API administrator login
  • PORTABILLING_ADMINISTRATOR_TOKEN - PortaBilling JSON API administrator token
  • PORTABILLING_ADMINISTRATOR_SESSION_REGENERATE_PERIOD - PortaBilling administrator session regenerate period in milliseconds
  • PORTABILLING_ACCOUNT_URL - PortaBilling JSON API URL for accounts
  • PORTABILLING_ACCOUNT_SESSION_INVALIDATE_PERIOD - PortaBilling account session invalidate period in milliseconds
  • PORTABILLING_SIGNIN_CREDENTIALS - defines the type of account properties used for login, with the following possible values (optional):
    • self-care - login for request and password from response (default value)
    • sip - id for request and h323_password from response
  • PORTABILLING_DEMO_I_CUSTOMER - the ID of the customer record in PortaBilling with demo accounts (optional, can be defined only with PORTABILLING_DEMO_I_CUSTOM_FIELD)
  • PORTABILLING_DEMO_I_CUSTOM_FIELD - the ID of the custom field in PortaBilling of a demo account's activated state (the custom field must be a number type with 0 default value) (optional, can be defined only with PORTABILLING_DEMO_I_CUSTOMER)
  • PORTABILLING_FILTER_CONTACTS_WITHOUT_EXTENSION - controls whether to filter out contacts that do not have an extension (optional, default value is true)
  • PORTABILLING_HIDE_BALANCE_IN_USER_INFO - controls whether to hide balance in user info (optional, default value is false)
  • PORTASIP_HOST - PortaSIP host
  • PORTASIP_PORT - PortaSIP port (optional)
  • JANUS_SIP_FORCE_TCP - forces TCP for the SIP messaging (optional, default value is true)
  • OTP_TIMEOUT - timeout for OTP verification in milliseconds
  • OTP_VERIFICATION_ATTEMPTS_LIMIT - maximum attempts to enter a valid OTP verification code
  • OTP_IGNORE_ACCOUNTS - a list of account's phone (aka account id) which can use any OTP verification code for authentication - usually used for demo purpose; accounts are delimited by commas or semicolon, for example: "12345,67890" (optional, default value is an empty list)
  • DISABLED_FUNCTIONALITIES - a list of supported functionalities that are manually disabled - usually used for signup/signin app's form control; functionalities are delimited by commas or semicolon with following possible values (optional, default value is an empty list):
    • signup - supports the creation of new customer accounts
    • otpSignin - allows user authorization via One-Time Password (OTP)
    • passwordSignin - allows user authorization using login and password
    • recordings - provides access to call recordings
    • callHistory - provides access to call history
    • extensions - retrieves the list of other users (contacts)
  • HTTP_CLIENT_SSL_VERIFY_TYPE - configures the SSL verification type for HTTP client requests that utilize HTTPS schema; acceptable values include: verify_none, verify_peer (optional, default value is verify_peer)