VoIP icon indicating copy to clipboard operation
VoIP copied to clipboard

Put leading slash

Open 0perationPrivacy opened this issue 3 years ago • 1 comments

Discussed in https://github.com/0perationPrivacy/VoIP/discussions/152

Originally posted by gh4E1NtQii August 29, 2022

Issue

After adding a number in VoIP Suite application and when prompted to Override Settings I clicked Yes. I noticed I was able to send text messages from VoIP Suite but could not receive them.

Log into Telnyx and checked the Messaging profile that gets added to the phone number which I just associated with VoIP Suite.

  1. Login To Telnyx
  2. Click Messaging on the left hand side
  3. Under Configure your Messaging Profiles section find VoIP sms Web Application - There will be multiple if you have multiple Telnyx phone numbers.
  4. Click the pencil icon
  5. Scroll down to the Inbound Settings section
  6. Under the Send a webhook to this URL: section you will see the URL for receiving sms text messages via the Render API. This is incorrect.

It is missing a forward slash in-between .com and api

Resolution

Change From Send a webhook to this URL: https://voipsuite-xxxx.onrender.comapi/setting/receive-sms/telnyx

Change To Send a webhook to this URL: https://voipsuite-xxxx.onrender.com/api/setting/receive-sms/telnyx

Once I made the above change, I was able to receive text messages to my Telnyx number on VoIP Suite

Anyone else seeing this in their experience?

0perationPrivacy avatar Aug 30 '22 21:08 0perationPrivacy

This leading slash issue is also breaking MMS images from displaying.

In a message record, the media field looks like: "["https://voipsuite-xxxx.onrender.comuploads/...

tomkel avatar Oct 01 '22 15:10 tomkel

Figured it out, the code assumes that the BASE_URL environment variable has a trailing slash

tomkel avatar Oct 25 '22 00:10 tomkel

Figured it out, the code assumes that the BASE_URL environment variable has a trailing slash

yes, for now please put a slash at the end of the BASE_URL like in the example. Later we will fix it programatically if someone forgets it. (Growing pains, figuring out all the possibilities of user input errors)

0perationPrivacy avatar Nov 10 '22 00:11 0perationPrivacy

Using a path lib instead of string concatenation should do the trick

tomkel avatar Nov 10 '22 21:11 tomkel