TUTORIAL BulkVS SMS Reception/Transmission Gateway - php code

I have modified the script to support MMS
...
Good job @rob92 !
My business and I always used sms for really short, quick messages. For anything more traditional emailing with (often encrypted) attachments has been our standard. So, I never needed to implement MMS support. But I am glad you did.
I'll give a try and see if it can help our workflow.
 
My main motivation is that when testing MMS the message text field was blank and it was actually attached as a .txt file.

Also I added the CharSet = "UTF-8" to properly handle emojis, they were coming through as garbled text with the original code.

I'm also not entirely sure urldecode($data->Message) is needed, then again I'm not a developer. I'm also not entirely sure any of this code is safe... it could be vulnerable to code injection attacks.

You will need to add PHPMailer to the correct path. I tested IIRC with an old version 5.5
 
@rob92 I was able to do some initial testing with your revised code and it looks like it works well with my deployment. I really appreciate you sharing!
 
I found an issue with MMS not sending when the message body is blank. I have one fix working but it's not as elegant as I would like so I need to dig into PHPMailer docs to see if there's another solution. Might as well through in a newer version since the one I used is likely obsolete.
 
Here's my updated version.
  • Bundled all required files
  • MMS without text are working
  • Tested with PHPMailer 6.5.3 (Nov 2021)
  • If email fails to send it will not transmit OK to BulkVS, although they don't seem to have a retry queue
  • It will not attempt to send an email if expected values aren't received
  • Added values to send email through Gmail (untested)
You can check your Apache error log for a 500 error on sms-rx.php

/edit Feb 17th: Added PHPMailer license
 

Attachments

Last edited:
With companies just now freely turning SMS/MMS over to the government just for the asking, I would certainly be telling people to stop using it.
 
No, that is just a sample of the message BulkVS sends. The actual MMS will have a live URL with any media/attachment sent with the message. If you go to your portal Messaging > Messaging Instructions > Inbound MMS it will show the same example.

If you look at lines 106-138 of my script that's where it downloads the MediaURLs and attaches them to the email.
 
Are you able to send messages now with BulkVS or do they now require a campaign to send out messages?
 
Are you able to send messages now with BulkVS or do they now require a campaign to send out messages?
My messaging works great with bulkvs. I did the registration they asked for and virtually all my texts go through. I use textable as the front end and it works well.
 
Are you able to send messages now with BulkVS or do they now require a campaign to send out messages?
No. My outbound messages stopped in the middle of February. I found 1 "failed" message in the log, now they are just ignored with no error message of any kind. I emailed them and they said you need to register (and pay the fees) for OUTBOUND texting. Inbound works fine though, for what that's worth......
 
This worked great just now for receiving SMS. I really needed a fast solution for bulkvs to receive SMS on a couple of my DID's - I dropped the sms-rx code into my web server (I don't expose my PBX to the web) in a subfolder, setup the hook at BulkVS, edited the .php with my email addresses and voila. Took less than 10 minutes. I really don't need send but I could set it up later I suppose if I need to.

Thanks much for this. Super helpful given my PBX's are older versions.
 

Members online

No members online now.

Forum statistics

Threads
26,724
Messages
174,636
Members
20,286
Latest member
lluis.riera
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top