To start the WebTrit Adapter server:
- Run
mix setupto install and setup dependencies - Start Phoenix endpoint with
mix phx.serveror inside IEx withiex -S mix phx.server
Now you can visit localhost:4001 from your browser.
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 isinfo)SKIP_MIGRATE_ON_STARTUP- skips running migrations on application startup (optional, default value isfalsefor prod andtruefor all other env)DATABASE_URL- Ecto.Repo URL; example:ecto://webtrit:webtrit_password@localhost/webtrit_adapterSECRET_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 administratorsPORTABILLING_ADMINISTRATOR_LOGIN- PortaBilling JSON API administrator loginPORTABILLING_ADMINISTRATOR_TOKEN- PortaBilling JSON API administrator tokenPORTABILLING_ADMINISTRATOR_SESSION_REGENERATE_PERIOD- PortaBilling administrator session regenerate period in millisecondsPORTABILLING_ACCOUNT_URL- PortaBilling JSON API URL for accountsPORTABILLING_ACCOUNT_SESSION_INVALIDATE_PERIOD- PortaBilling account session invalidate period in millisecondsPORTABILLING_SIGNIN_CREDENTIALS- defines the type of account properties used for login, with the following possible values (optional):self-care-loginfor request andpasswordfrom response (default value)sip-idfor request andh323_passwordfrom response
PORTABILLING_DEMO_I_CUSTOMER- the ID of the customer record in PortaBilling with demo accounts (optional, can be defined only withPORTABILLING_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 with0default value) (optional, can be defined only withPORTABILLING_DEMO_I_CUSTOMER)PORTABILLING_FILTER_CONTACTS_WITHOUT_EXTENSION- controls whether to filter out contacts that do not have an extension (optional, default value istrue)PORTABILLING_HIDE_BALANCE_IN_USER_INFO- controls whether to hide balance in user info (optional, default value isfalse)PORTASIP_HOST- PortaSIP hostPORTASIP_PORT- PortaSIP port (optional)JANUS_SIP_FORCE_TCP- forces TCP for the SIP messaging (optional, default value istrue)OTP_TIMEOUT- timeout for OTP verification in millisecondsOTP_VERIFICATION_ATTEMPTS_LIMIT- maximum attempts to enter a valid OTP verification codeOTP_IGNORE_ACCOUNTS- a list of account's phone (aka accountid) 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 accountsotpSignin- allows user authorization via One-Time Password (OTP)passwordSignin- allows user authorization using login and passwordrecordings- provides access to call recordingscallHistory- provides access to call historyextensions- retrieves the list of other users (contacts)internalMessaging- provides the ability to send and receive instant messages within the system (among system users)smsMessaging- provides the ability to send and receive text messages using the Short Message Service (SMS)
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 isverify_peer)REFRESH_TOKEN_MAX_AGE_SECONDS- maximum lifetime of a refresh token in seconds (optional, default value is 1,209,600 seconds, equivalent to 14 days)