VoIP
VoIP copied to clipboard
Put leading slash
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.
- Login To Telnyx
- Click
Messagingon the left hand side - Under
Configure your Messaging Profilessection findVoIP sms Web Application- There will be multiple if you have multiple Telnyx phone numbers. - Click the
pencil icon - Scroll down to the
Inbound Settingssection - 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?
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/...
Figured it out, the code assumes that the BASE_URL environment variable has a trailing slash
Figured it out, the code assumes that the
BASE_URLenvironment 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)
Using a path lib instead of string concatenation should do the trick