0perationPrivacy / VoIP

Web Base Telnyx/Twilio VoIP Interface enabling SMS, MMS and Voice calls using the providers API Keys and self-hosting the application.
https://VoIP.OperationPrivacy.com
GNU General Public License v3.0
246 stars 421 forks source link

SMS Messages not delivered #20

Closed PRPSDev closed 3 years ago

PRPSDev commented 3 years ago

Platform: Ubuntu 21.04 Browser: Chromium 93.0.4577.63 App Version: v. 0.64 Provider: Twilio

Describe the bug

After following all detailed instructions on MB's blog, I can successfully register profiles with numbers (four in all), and apparently succeed in sending messages, but the messages are not delivered.

To be clear: I'm using the app to send messages between the four numbers, expecting that each will be able to send to one another, and receive within the app itself; however, the only thing I see in each is the outgoing message "bubble."

Twilio does not show the message in the logs, which, if I understand correctly, may be as-designed. Are there additional settings needed in Twilio to enable this app?

To Reproduce

  1. Select a profile
  2. Click Compose
  3. Enter valid number (of one of the other three numbers) with + and country code as directed
  4. Enter message text, and click Send Message
  5. See the outgoing message bubble correctly contains the text entered in step 4.
  6. Switch to destination number profile.
  7. Look for messages - none are shown

Expected behavior 7a. Look for messages - A new message (text matching that entered in step 4) is shown from the number in the profile selected at step 1.

Screenshots N/A

PRPSDev commented 3 years ago

Update: Can send messages OUTBOUND to actual phones. Replies to the VoIP number do not come through though.

0perationPrivacy commented 3 years ago

Message receipt is bound to webhooks which depend on your BASE_URL being accurate. Check that in Heroku. Make sure it’s in the exact format as in the instructions

PRPSDev commented 3 years ago

I did double-check that... ran into an error when I had followed MB's detailed instructions first (StatusCallback URL invalid). It "works" without errors when formatted with "https://" before the subdomain. It behaves the same way with a trailing "/" as well (e.g. "https://sub.domain.com/").

Does a webhook need to be specified in Twilio's console, or does the app interact only with the API?

BTW, thanks so much for this. If you'd like more help in testing, I've been a SW quality engineer for medical devices for 20 years...

PRPSDev commented 3 years ago

16 looks very similar to this issue, to me. Either we're both doing something subtly incorrect, or there's something else about the environment(s).

0perationPrivacy commented 3 years ago

I did double-check that... ran into an error when I had followed MB's detailed instructions first (StatusCallback URL invalid). It "works" without errors when formatted with "https://" before the subdomain. It behaves the same way with a trailing "/" as well (e.g. "https://sub.domain.com/").

Does a webhook need to be specified in Twilio's console, or does the app interact only with the API?

BTW, thanks so much for this. If you'd like more help in testing, I've been a SW quality engineer for medical devices for 20 years...

You do not need to change the webhooks in twilio/telnyx, the API does that. A LOT of people are not formatting the url correctly, I say just copy paste what MB wrote, it's usually the "https://" that people are leaving out. In a later update I'll make it fool proof so that even if you omit it, it will add it in. I had to do that with trailing/leading spaces.

For testing, this is the place! the Beta releases.

PRPSDev commented 3 years ago

Something else is definitely happening, but I'll be damned if I can figure it out. If I don't give it a trailing forward-slash, then in Twilio's logs I get a "Request to StatusCallback URL was not successful" with the following URL: https://[myappsubdomain].herokuapp.comapi/setting/sms-status/twilio

Clearly, there needs to be a forward slash after .com to separate the api directory.

But once I fixed that, I still don't get any messages inbound, AND I don't see a log of it anywhere.

PRPSDev commented 3 years ago

I hope so, too! So far, I'm not seeing my issue, but then, that's how these things go sometimes. Need to freshen the eyes.

PRPSDev commented 3 years ago

@0perationPrivacy - Problem solved - I did indeed need to kill the profiles I had created so I could reset the URL after having fixed that. Drove me quite nuts. Might want to add to Troubleshooting tips right under the URL fix note.

0perationPrivacy commented 3 years ago

Thanks, I'll add it under troubleshooting. This happens because a link is added in the webhook when you first add a profile. The webhook is deleted when you delete the profile. There's no way to edit the webhook in Twilio if you modify the env variable. This could be achieved if the URL could be edited in the GUI. I have plans to add a comprehensive settings section in the future as options grow.

PRPSDev commented 3 years ago

Makes sense. For a beta, this is a damned good application. Thanks for spending your time and energy on it. Amazing.