I built the SMS portal I wish VoIP.ms had šŸ˜…

Yes, that’s an option I can totally add. My main thinking when I was building this app was to keep it as simple as possible. And even though we need to access the API and OAuth, which is a relatively complex process, I did not want to add more settings to go in your DID, at the webhook, to handle that and make sure you have the right URL.

Because my first thinking was that it’s an app that you run on your computer, and you don’t necessarily have external access, and I don’t want to deal with tunneling like ngrok or Cloudflare. But now that I have a version that I’m specifically pointing toward web hosting, I think I can add this setting, which will make perfect sense.

Let me work on that a bit, and I will give you feedback as soon as it’s set up. That was my first idea.

1 Like

Thanks for your consideration. This is a great piece of work! You may have noticed that there is an Android app by Michael Kourlas based on voip.ms API. I saw this Web URL use there.

This is what AI explains:)

How the Web Callback Works

  • Push Notification Service: When notifications are enabled, the app configures your VoIP.ms DID to ping a web service hosted by Michael Kourlas whenever an SMS or MMS message arrives. [1]
  • Cloudflare Worker: This push service is built as a Cloudflare Worker. [1]
  • Firebase Cloud Messaging: The service relays the notification through Firebase Cloud Messaging to wake up your Android device using a unique installation ID. [1]
  • Synchronization: Once the app receives the web callback/ping, it queries the VoIP.ms servers to fetch the actual text message content while protecting user privacy. [1, 2]

Good news: version 1.8.0 adds what you asked for. VoIP.ms can now tell the portal as soon as a text comes in, instead of the portal checking every minute.

  1. In the portal, open Settings → Updates and click Install to get 1.8.0, then reload the page.
  2. In Settings → Receiving texts, choose Instantly, through a VoIP.ms webhook. The portal sets up your numbers at VoIP.ms by itself; each one should then say ā€œCalls the portalā€.
  3. That’s it: new texts show up within seconds. ā€œLast call from VoIP.msā€ in that section confirms it after your next incoming text.

Keep the cron job: it still runs as a safety net every 15 minutes (for texts sent from other apps), and downloads MMS pictures.

1 Like

Your are my hero! I will try it. Thanks.

Just tried, so far it works perfectly! Notification arrives almost instantly!

@dansleboby for shared hosting, I have 2 DIDs and I want myself see two numbers and another person see one number only (turn the other one off). Is this possible? Thanks.

I’m working this right now for a V2.0 with multi user, multi account, share state etc… :slight_smile:

:+1: Thanks. This is a really good piece of work!

I have been playing the SMS app by @dansleboby . Minor suggestions.

  1. For mobile app, when sending SMS, is it possible to remove the Emoji since it is already included in the keyboard?

  2. in the push notification, include the body text and no trigger of fetch will be needed? Then maintain the 15 or mor minutes checks?

Hey everyone! :wave:

SMS Portal 2.0 is out (2.0.2 as of today), and a lot of it comes straight from this thread. Thanks for all the feedback!

What’s new

  • Team mode (@TheDude, @yzhou): several people on one install, each with their own email and password. You choose the numbers each person sees, read only or with sending, and every text shows who sent it. Read/unread can be shared or per person, number by number.
  • Several VoIP.ms accounts in one portal (one per client, say). The add-account dialog now shows the IP to whitelist right away, then offers to import the account’s history.
  • Instant receiving, number by number, for every account. A number already wired to another app can stay on regular checks, so that app keeps getting its texts.
  • Address books per number, plus a personal one for each user.
  • My numbers: hide or mute a number just for yourself.
  • Activity log for admins, and My sessions to sign out of every other device.
  • Short codes (@hohokus): you can now text them, e.g. transit bots that answer a keyword. Accented letters from short codes no longer go missing.
  • One server for Docker and cPanel: the Docker image now runs the same PHP app as the shared hosting zip.

Upgrading keeps everything (conversations, contacts, settings); everyone just signs in again once.

  • cPanel: pick PHP 8.4+ in MultiPHP Manager first, then Settings → Updates.
  • Docker: docker compose pull && docker compose up -d

Then turn on what you need: GitHub - dansleboby/voip-ms-sms-portal: Self-hosted web app for the texts (SMS/MMS) of your VoIP.ms numbers: one inbox, push notifications, contacts, Team mode and several accounts. Runs on Docker or cPanel shared hosting. Ā· GitHub

@yzhou, about your two ideas:

  • The emoji button is gone on phones in 2.0.2. Good call, the keyboard already has it.
  • Push notifications already carry the message text, so the phone fetches nothing. But the VoIP.ms callback stays a simple ā€œpingā€: VoIP.ms doesn’t sign its callbacks, so the portal can’t prove a call really came from them. It reads the text from the API instead, a few seconds later. The 15-minute safety check stays.

Group MMS is still not possible, sadly: VoIP.ms doesn’t support it on their side. :sweat_smile:

As always, issues and ideas are welcome on GitHub.

1 Like

@dansleboby :+1: This is really great. Thanks. I cannot wait to try it!.

Regarding the callback, sorry for my naiveness, can the callback be configured https://…+{TO}, {FROM}, {MESSAGE}, and {MEDIA}to indicate the source? Just a guess:)

Not naive at all, @yzhou! :slightly_smiling_face:

Yes, VoIP.ms can fill those in: the callback URL can carry {FROM}, {TO}, {MESSAGE}, {MEDIA}, {ID}… But they tell the portal what the text says, not who is calling. Anyone who has the URL can call it with any values they like, and the portal can’t tell the difference.

That’s the missing piece: VoIP.ms doesn’t sign its callbacks. Twilio or Stripe add a signature made with a secret only you and they know, so your server can check that a call really comes from them and wasn’t changed on the way. VoIP.ms has nothing like that: the only secret is the URL itself.

Guessing that URL is hopeless (32 random characters). The real risk is a leak: it sits in your DID settings, in the web host’s access logs and stats pages (on cPanel you don’t control those), in backups, in a screenshot sent to support… and it never expires.

What could go wrong, concretely:

  • A text ā€œfromā€ a client you know shows up in their conversation, under their name, with a push notification: ā€œHi, it’s Marie, I changed banks, please send the deposit toā€¦ā€. In Team mode, a colleague has no reason to doubt it.
  • {MEDIA} is a URL the server downloads. A forged call could make your server fetch whatever it’s told, including addresses on its own network.

The price of doing it right is small: one API call per incoming text, made after answering VoIP.ms. It adds a few seconds at most (the VoIP.ms API has been slow lately), and the push goes out as soon as the text is in.

If VoIP.ms ever adds signed webhooks, I’ll gladly switch. :+1: @VoIP.ms

Thanks, @dansleboby . This is very educating to me indeed! I am learning:)

Hi, @dansleboby in the team mode, does a user get instant receiving for numbers they see or even not seeing ones? Thanks.

short codes are working great – thanks! :+1:

Good question, @yzhou! Instant receiving is set per number, for the whole portal, not per user: an admin picks it in Settings → Receiving texts, and it applies to everyone who has that number.

A user only ever gets the texts and notifications of the numbers they’ve been given (read only or with sending), minus the ones they hid or muted in Settings → My numbers. Texts to other numbers still come in instantly for the people who have those numbers, but they never show up for that user, and they don’t get notified about them.

Thanks, @dansleboby . It is almost a perfect SMS app for me! You are an excelant developer. One small request. In the password window, is it possible to add a visible toggle? My fingers are too big for phone keyboard to correctly type. :slight_smile:

1 Like

V2.0.3 add your toggle :slight_smile:

Thanks, @dansleboby .

1 Like

@dansleboby : Love the app! Well done! :clinking_beer_mugs:

1 Like

I opened a ticket asking about URL callback capability. Here is what I got from voip.ms support:

"At the moment, our SMS/MMS URL Callback documentation does not mention support for callback signatures or authentication mechanisms.

We recommend submitting this suggestion through our Feature Request section so our development team can review it and consider it for future implementation."

So I submit a feature request. Will wait and see how responsive voip.ms will be:)