BelledonneCommunications / flexisip-account-manager

A REST API, web portal and provisioning server for Flexisip
https://subscribe.linphone.org/
GNU Affero General Public License v3.0
5 stars 3 forks source link

Phone number aliases #11

Open jbittner1002 opened 3 months ago

jbittner1002 commented 3 months ago

Setup flexisip to lookup phone aliases tied to each account because account manager is setup to not allow phone numbers as users names. When calling softphone to softphone it only works when using the account username and not the true telephone number that is in the gui. Noticed that tables are not default anymore with flexiapi so I change the sql request to match the tables. First one was for auth. soci-password-request=select p.password, p.algorithm from accounts a join passwords p on a.id = p.account_id where a.username = :id and a.domain = :domain This one worked perfect.

These two do not soci-user-with-phone-request=select a.login from accounts a join aliases al on a.id = al.account_id where al.alias = :phone soci-users-with-phones-request=select a.login, a.domain, al.alias as phone from accounts a join aliases al on a.id = al.account_id where al.alias in (:phones)

Am I doing something wrong ?

edhelas commented 2 months ago

This PR and the default values used in it should fix your issue https://gitlab.linphone.org/BC/public/flexisip/-/merge_requests/1089/diffs

I'm still looking for the maintainers to review and merge it.