From a79b144795518a522042532e1e129df512b69eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Thu, 3 Nov 2022 15:36:41 +0100 Subject: [PATCH] Fix #54 Disable Flexisip socket/pipe related unstable features Complete the documentation Disable related API endpoints Edit the README Bump the package number --- README.md | 2 ++ flexiapi/config/app.php | 6 ++++-- .../views/account/documentation_markdown.blade.php | 2 ++ .../views/api/documentation_markdown.blade.php | 4 ++++ flexiapi/routes/api.php | 12 +++++++----- flexisip-account-manager.spec | 2 +- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 211105c..9bd4f13 100644 --- a/README.md +++ b/README.md @@ -244,6 +244,8 @@ You can also seed the tables with test accounts for the liblinphone test suite w ## Sending SIP messages from the API +**The messaging related features are considered instable and are not available** + The `POST /api/messages` endpoint allows you to send messages on the SIP network. It call internally `linphone-daemon` to do so. To be able to use it you should follow the following steps: 1. Launch the `linphone-daemon` with a UNIX socket path, this will create a socket file in `/tmp` (the file will be `/tmp/lp` for the following line). diff --git a/flexiapi/config/app.php b/flexiapi/config/app.php index 9e2ec60..3a32a8d 100644 --- a/flexiapi/config/app.php +++ b/flexiapi/config/app.php @@ -22,7 +22,8 @@ return [ 'newsletter_registration_address' => env('NEWSLETTER_REGISTRATION_ADDRESS', ''), 'phone_authentication' => env('PHONE_AUTHENTICATION', true), 'public_registration' => env('PUBLIC_REGISTRATION', true), - 'devices_management' => env('DEVICES_MANAGEMENT', false), + // See https://gitlab.linphone.org/BC/public/flexisip-account-manager/-/issues/54 + 'devices_management' => false, //env('DEVICES_MANAGEMENT', false), 'web_panel' => env('WEB_PANEL', true), 'proxy_registrar_address' => env('ACCOUNT_PROXY_REGISTRAR_ADDRESS', 'sip.domain.com'), @@ -41,7 +42,8 @@ return [ */ 'flexisip_proxy_pid' => env('APP_FLEXISIP_PROXY_PID', '/var/run/flexisip-proxy.pid'), 'flexisip_pusher_path' => env('APP_FLEXISIP_PUSHER_PATH', null), - 'linphone_daemon_unix_pipe' => env('APP_LINPHONE_DAEMON_UNIX_PATH', null), + // See https://gitlab.linphone.org/BC/public/flexisip-account-manager/-/issues/54 + 'linphone_daemon_unix_pipe' => null, // env('APP_LINPHONE_DAEMON_UNIX_PATH', null), /** * Account provisioning diff --git a/flexiapi/resources/views/account/documentation_markdown.blade.php b/flexiapi/resources/views/account/documentation_markdown.blade.php index 9d5eb82..b6cf1cb 100644 --- a/flexiapi/resources/views/account/documentation_markdown.blade.php +++ b/flexiapi/resources/views/account/documentation_markdown.blade.php @@ -64,6 +64,8 @@ Your account can be deleted from the panel using the @if (config('app.web_panel' ## Devices management +**The devices related features are considered instable and are not available** + @if (config('app.devices_management') == false) *The feature is not enabled on this instance.* @endif diff --git a/flexiapi/resources/views/api/documentation_markdown.blade.php b/flexiapi/resources/views/api/documentation_markdown.blade.php index 50d8a89..b172d63 100644 --- a/flexiapi/resources/views/api/documentation_markdown.blade.php +++ b/flexiapi/resources/views/api/documentation_markdown.blade.php @@ -311,6 +311,8 @@ Return the updated account ## Accounts devices +**The devices related features are considered instable and are not available** + ### `GET /accounts/me/devices` User Return the user registered devices. @@ -417,6 +419,8 @@ Remove a a type from the account. ## Messages +**The messaging related features are considered instable and are not available** + ### `POST /messages` Admin Send a message over SIP. diff --git a/flexiapi/routes/api.php b/flexiapi/routes/api.php index 03e304d..5b7956a 100644 --- a/flexiapi/routes/api.php +++ b/flexiapi/routes/api.php @@ -65,8 +65,9 @@ Route::group(['middleware' => ['auth.digest_or_key']], function () { Route::post('accounts/me/phone/request', 'Api\AccountPhoneController@requestUpdate'); Route::post('accounts/me/phone', 'Api\AccountPhoneController@update'); - Route::get('accounts/me/devices', 'Api\DeviceController@index'); - Route::delete('accounts/me/devices/{uuid}', 'Api\DeviceController@destroy'); + // See https://gitlab.linphone.org/BC/public/flexisip-account-manager/-/issues/54 + //Route::get('accounts/me/devices', 'Api\DeviceController@index'); + //Route::delete('accounts/me/devices/{uuid}', 'Api\DeviceController@destroy'); Route::post('accounts/me/email/request', 'Api\EmailController@requestUpdate'); Route::post('accounts/me/password', 'Api\PasswordController@update'); @@ -75,9 +76,10 @@ Route::group(['middleware' => ['auth.digest_or_key']], function () { Route::get('accounts/me/contacts', 'Api\AccountContactController@index'); Route::group(['middleware' => ['auth.admin']], function () { - if (!empty(config('app.linphone_daemon_unix_pipe'))) { - Route::post('messages', 'Api\MessageController@send'); - } + // See https://gitlab.linphone.org/BC/public/flexisip-account-manager/-/issues/54 + //if (!empty(config('app.linphone_daemon_unix_pipe'))) { + // Route::post('messages', 'Api\MessageController@send'); + //} // Accounts Route::get('accounts/{id}/activate', 'Api\Admin\AccountController@activate'); diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index f122822..7daef8a 100644 --- a/flexisip-account-manager.spec +++ b/flexisip-account-manager.spec @@ -8,7 +8,7 @@ #%define _datadir %{_datarootdir} #%define _docdir %{_datadir}/doc -%define build_number 163 +%define build_number 164 %define var_dir /var/opt/belledonne-communications %define opt_dir /opt/belledonne-communications/share/flexisip-account-manager