Wazo-phoned phonebook on yealink error on allowed subnet even if allowed

Hello everyone,

To make you know my context this a Debian virtual machine with Wazo version 24.05
I am using a Yealink T54W device to get phonebook from this URL :
http://X.X.X.X:9498/0.1/directories/lookup/default/yealink?phonebook_uuid=733f4759-3f31-496b-8e4c-20f93e4061fe&term=#SEARCH

I am trying to make my yealink T54W to download my phonebook base on csv source, but I got the following error :
Remote address X.X.X.X is not in authorized subnets. Aborting…

The thing is I have created the following file : /etc/wazo-phoned/conf.d/custom.yml and added the following (without the X just hided subnet) :

rest_api:
    authorized_subnets: 
      - 'X.X.X.X/24'

I did restarted the wazo-phoned service and rebooted virtual machine.
But the wazo-phoned module do not take in count what I added in my conf.

Anyone did meet this issue ?

Thank you for reading my poste and hope someone could help me.
Have a nice day !

Hi, I just updated my Wazo to version 24.11 and I still have the same problem anyone have an idea ?

Hi everyone, I just find why isn’t working, this file : /etc/wazo-phoned/conf.d/050-xivo-config.yml execute the following code :

!exec
command: wazo-confgen phoned/config.yml

So I delete this file because the problem it is not from wazo-phoned module but from wazo-confgen because when the service regenerate the config for wazo-phoned module it do not take in count conf.d file in phoned so there is a problem with this module for config file generation for phoned.

So the temporary solution is to delete /etc/wazo-phoned/conf.d/050-xivo-config.yml and to uncomment and add your subnet directly in : /etc/wazo-phoned/config.yml :

  # Authorizing subnets
  authorized_subnets:
     - 'X.X.X.X/24'

The only thing with this solution is to not forget to save it before upgrading wazo because it will be probably erase and to restore it after the upgrade.

I am gonna open an issue about this have a nice day guys, I hope this could help some of you.

Hi, I just openned the issue right there : [WAZO-3887] - Wazo

Have a nice day !

Hello,

I think it’s because it’s generated by the API now. We don’t use anymore this file.

Sylvain

wazo-confgend is used to make wazo-phoned independent from wazo-confd database

You have two solutions

  1. Use wazo-confd API to define your authorized_subnet: https://wazo-platform.org/documentation/api/configuration.html#tag/access_features/operation/create_access_feature

    • wazo-phoned will be restarted and data from wazo-confgend will be used
  2. Use configuration file to hardcode your authorized_subnet

    • WARNING: You must follow the configuration priority to create your file. e.g. the file in /etc/wazo-phoned/conf.d/ must be read BEFORE the 050-xivo-config.yml. The name of your new config file must be started by 049-...

Bonus: I did a small PR to rename this file and use more “standard” number according our other services: rename config file to avoid ambiguity by fblackburn1 · Pull Request #102 · wazo-platform/wazo-phoned · GitHub (it doesn’t change anything to the solution proposed)

1 Like