1.6から2.0へのアップグレード
ダウンロード
$ git clone -b release/2.0 https://github.com/BelledonneCommunications/flexisip-account-manager.git
2.0の.envに置き換え
flexiapi/.env
APP_ENV=local
APP_KEY=
APP_DEBUG=false
APP_ROOT_HOST=
APP_LINPHONE_DAEMON_UNIX_PATH=
APP_FLEXISIP_PUSHER_PATH=
APP_FLEXISIP_PUSHER_FIREBASE_KEYSMAP= # Each pair is separated using a space and defined as a key:value
APP_ALLOW_PHONE_NUMBER_USERNAME_ADMIN_API=false # Allow phone numbers to be set as username in admin account creation endpoints
TERMS_OF_USE_URL= # A URL pointing to the Terms of Use
PRIVACY_POLICY_URL= # A URL pointing to the Privacy Policy
APP_PROJECT_URL= # A URL pointing to the project information page
LOG_CHANNEL=stack
# Risky toggles
APP_DANGEROUS_ENDPOINTS=false # Enable some dangerous endpoints used for XMLRPC like fallback usage
# Expiration time for tokens and code, in minutes, 0 means no expiration
APP_API_ACCOUNT_CREATION_TOKEN_RETRY_MINUTES=60 # Number of minutes between two consecutive account_creation_token creation
APP_ACCOUNT_CREATION_TOKEN_EXPIRATION_MINUTES=0
APP_ACCOUNT_RECOVERY_TOKEN_EXPIRATION_MINUTES=0
APP_EMAIL_CHANGE_CODE_EXPIRATION_MINUTES=10
APP_PHONE_CHANGE_CODE_EXPIRATION_MINUTES=10
APP_RECOVERY_CODE_EXPIRATION_MINUTES=10
APP_PROVISIONING_TOKEN_EXPIRATION_MINUTES=0
APP_API_KEY_EXPIRATION_MINUTES=60 # Number of minutes the unused API Keys are valid
APP_RESET_PASSWORD_EMAIL_TOKEN_EXPIRATION_MINUTES=1440 # 24h
# Account creation and authentication
ACCOUNT_EMAIL_UNIQUE=false # Emails are unique between all the accounts
ACCOUNT_BLACKLISTED_USERNAMES=
ACCOUNT_USERNAME_REGEX="^[a-z0-9+_.-]*$"
ACCOUNT_DEFAULT_PASSWORD_ALGORITHM=SHA-256 # Can ONLY be MD5 or SHA-256 in capital, default to SHA-256
ACCOUNT_AUTHENTICATION_BEARER= # Bearer value (WWW-Authenticate: Bearer <value>) of the external service that can provide a trusted (eg. JWT token) for the authentication, takes priority and disable the DIGEST auth if set, see https://www.rfc-editor.org/rfc/rfc8898
# Blocking service
BLOCKING_TIME_PERIOD_CHECK=30 # Time span on which the blocking service will proceed, in minutes
BLOCKING_AMOUNT_EVENTS_AUTHORIZED_DURING_PERIOD=5 # Amount of account events authorized during this period
# FlexiSIP database
# Ensure that you have the proper SELinux configuration to allow database connections, see the README
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=flexisip
DB_USERNAME=flexisip
DB_PASSWORD=flexisip
# Redis
REDIS_CLIENT=phpredis # Use phpredis-sentinel and uncomment the REDIS_SENTINEL variable bellow
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=
# REDIS_SENTINEL_HOST=
# REDIS_SENTINEL_PORT=
# REDIS_SENTINEL_SERVICE=
# REDIS_SENTINEL_PASSWORD=
# Logs
# Ensure that you have the proper SELinux configuration to write in the storage directory, see the README
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
# SMTP and emails
# Ensure that you have the proper SELinux configuration to allow emails sending, see the README
MAIL_DRIVER=
MAIL_HOST=
MAIL_PORT=2525
MAIL_USERNAME=
MAIL_PASSWORD=
[email protected]
MAIL_FROM_NAME=
MAIL_ALLOW_SELF_SIGNED=false
MAIL_VERIFY_PEER=true
MAIL_VERIFY_PEER_NAME=true
MAIL_SIGNATURE="The Example Team"
# CoTURN
COTURN_SERVER_HOST= # IP or domain name
COTURN_SESSION_TTL_MINUTES=1440 # 60 * 24
COTURN_STATIC_AUTH_SECRET= # static-auth-secret in the coturn configuration
# OVH SMS API variables
OVH_APP_KEY=
OVH_APP_SECRET=
OVH_APP_ENDPOINT=ovh-eu
OVH_APP_CONSUMER_KEY=
OVH_APP_SENDER=
# HCaptcha
HCAPTCHA_SECRET=secret-key
HCAPTCHA_SITEKEY=site-key
# JWT
JWT_RSA_PUBLIC_KEY_PEM=
JWT_SIP_IDENTIFIER=
バージョン1.6まで.env内で定義されていた以下の変数は、テーブルspacesに移行。$ php artisan コマンド、SQLコマンドで直接設定するか、WEBフロントエンドの設定画面で指定。
* INSTANCE_COPYRIGHT
* INSTANCE_INTRO_REGISTRATION
* INSTANCE_CUSTOM_THEME
* WEB_PANEL
* PUBLIC_REGISTRATION
* PHONE_AUTHENTICATION
* DEVICES_MANAGEMENT
* INTERCOM_FEATURES
* NEWSLETTER_REGISTRATION_ADDRESS
* ACCOUNT_PROXY_REGISTRAR_ADDRESS
* ACCOUNT_TRANSPORT_PROTOCOL_TEXT
* ACCOUNT_REALM
* ACCOUNT_PROVISIONING_RC_FILE
* ACCOUNT_PROVISIONING_OVERWRITE_ALL
* ACCOUNT_PROVISIONING_USE_X_LINPHONE_PROVISIONING_HEADER
php-fpmコンテナ内で以下を実行
# composer install --no-dev
# php artisan migrate
テーブルspacesが新規に追加されます。
spacesテーブル構造
MariaDB [flexisip]> desc spaces;
+-----------------------------------------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------------------------------+---------------------+------+-----+---------+----------------+
| id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| domain | varchar(64) | NO | UNI | NULL | |
| super | tinyint(1) | NO | | 0 | |
| created_at | timestamp | YES | | NULL | |
| updated_at | timestamp | YES | | NULL | |
| disable_chat_feature | tinyint(1) | NO | | 0 | |
| disable_meetings_feature | tinyint(1) | NO | | 0 | |
| disable_broadcast_feature | tinyint(1) | NO | | 1 | |
| max_account | int(11) | NO | | 0 | |
| hide_settings | tinyint(1) | NO | | 0 | |
| hide_account_settings | tinyint(1) | NO | | 0 | |
| disable_call_recordings_feature | tinyint(1) | NO | | 0 | |
| only_display_sip_uri_username | tinyint(1) | NO | | 0 | |
| assistant_hide_create_account | tinyint(1) | NO | | 0 | |
| assistant_disable_qr_code | tinyint(1) | NO | | 0 | |
| assistant_hide_third_party_account | tinyint(1) | NO | | 0 | |
| host | varchar(255) | NO | UNI | NULL | |
| max_accounts | int(11) | NO | | 0 | |
| expire_at | datetime | YES | | NULL | |
| copyright_text | text | YES | | NULL | |
| intro_registration_text | text | YES | | NULL | |
| newsletter_registration_address | varchar(255) | YES | | NULL | |
| account_proxy_registrar_address | varchar(255) | YES | | NULL | |
| account_realm | varchar(255) | YES | | NULL | |
| custom_provisioning_entries | text | YES | | NULL | |
| custom_provisioning_overwrite_all | tinyint(1) | NO | | 0 | |
| provisioning_use_linphone_provisioning_header | tinyint(1) | NO | | 1 | |
| custom_theme | tinyint(1) | NO | | 0 | |
| web_panel | tinyint(1) | NO | | 1 | |
| public_registration | tinyint(1) | NO | | 1 | |
| phone_registration | tinyint(1) | NO | | 1 | |
| intercom_features | tinyint(1) | NO | | 0 | |
| name | varchar(255) | NO | UNI | NULL | |
+-----------------------------------------------+---------------------+------+-----+---------+----------------+
33 rows in set (0.004 sec)
注) テーブル
spaceのhostをウェブのドメインに書換え(ホストがSIPドメインになっていた場合404エラーになります)
php artisan spaces:create-update {sip_domain} {host} {name} {--super}
例)
# php artisan spaces:create-update my.sip myhost.com "My Super Space" --super # You can set some Spaces as SuperSpaces, the admin will be able to manage the other spaces
# php artisan spaces:create-update alpha.sip alpha.myhost.com "Alpha Space"
# php artisan spaces:create-update beta.sip beta.myhost.com "Beta Space"
...
プロビジョニングの設定はspacesへ移行。以下の画面で設定。
プロビジョニングは以下のセクションにiniフォーマットで記載。
プロビジョニングによる設定の上書きには、下記機能をONにする必要があります。
Spaces → Configuration →
Allow client settings to be overwritten by the provisioning ones : ON


