nethesis / ns8-nethvoice

NethVoice: an Asterisk based PBX
GNU General Public License v3.0
0 stars 4 forks source link

Wrong proxy host in app provisioning #182

Closed Stell0 closed 5 months ago

Stell0 commented 5 months ago

In the provisioning process, the proxy host is currently being set to the same host as the API endpoint of the CTI, a holdover from when they used to be the same. To address this issue, we need to instruct the provisioning app to use the correct proxy host. The simplest solution would be to include this in the /user/me endpoint as with the LK

The consequence is that the proxy certificate is considered invalid because name doesn't match

Example: if proxy host is proxy.example.com and CTI endpoint is cti.example.com, this is the current provisioning query result:

<account>
  <cloud_username>username@cti.example.com</cloud_username>
  <cloud_password>**********</cloud_password>
  <username>1234</username>
  <password>************************</password>
  <extProvInterval>3600</extProvInterval>
  <proxy>cti.example.com:5061</proxy>
  <host>cti.example.com</host>
  <transport>tls+sip:</transport>
</account>

and this is how it should be

<account>
  <cloud_username>username@cti.example.com</cloud_username>
  <cloud_password>**********</cloud_password>
  <username>1234</username>
  <password>************************</password>
  <extProvInterval>3600</extProvInterval>
  <proxy>proxy.example.com:5061</proxy>
  <host>cti.example.com</host>
  <transport>tls+sip:</transport>
</account>