Enzo Matrix Posted March 30, 2021 Report Share Posted March 30, 2021 Hi all, Is anyone else having issues with Twilio SMS after upgrading to 67.0.2? We could all use it fine prior to the upgrade, but now nothing is being sent, and there is nothing hitting the Twilio API. Is there somewhere I can debug this in logs or something in Vodia? Thanks. Quote Link to comment Share on other sites More sharing options...
Enzo Matrix Posted March 30, 2021 Author Report Share Posted March 30, 2021 It appears that Twilio now requires me to have a 'Message Service' in programmable messaging to send. The Twilio API service now has 'messagingServiceSid' tag that seems to be required (which you get by creating a 'Messaging Service' under programmable messaging - here is the code from Twilio which I have tested and it works: // Update the path below to your autoload.php, // see https://getcomposer.org/doc/01-basic-usage.md require_once '/path/to/vendor/autoload.php'; use Twilio\Rest\Client; $sid = "TWILIO ACCOUNT API KEY HERE"; $token = "[AuthToken]"; $twilio = new Client($sid, $token); $message = $twilio->messages ->create("+PHONE_NUMBER_HERE", // to array( "messagingServiceSid" => "MESSAGING_SERVICE_SID_HERE", "body" => "This is a test" ) ); print($message->sid); What would be AMAZING would be if Vodia was updated to allow a seperate MessagingServiceID per domain! I have been able to test this using my own PHP code, and it would be a very simple way for Twilio users to be able to separate out their services for reporting. From what I can see (and I may be wrong): PBX Settings need: Twilio API Key and Twilio API Secret Domain Settings need: Twilio Messaging Service ID When sending the SMS request to Twilio, Vodia pulls the API information from the PBX, and the service id from the domain - in Twilio, all the SMS's sent are seperated into their service IDs, allowing for me to charge for them accordingly. Quote Link to comment Share on other sites More sharing options...
Enzo Matrix Posted March 30, 2021 Author Report Share Posted March 30, 2021 Just want to point out that I don't specifically think this was now an issue with upgrading - I think Twilio may have changed their API. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted March 31, 2021 Report Share Posted March 31, 2021 This is what we are using for Twilio right now Twilio.prototype.send = function(obj) { var body = "From=" + encodeURIComponent(obj.from); body += "&To=" + encodeURIComponent(obj.to); // Do we have an attachment? if (obj.url) body += "&MediaUrl=" + encodeURIComponent(obj.url); else if (obj.wav) bbody += "&MediaUrl=" + encodeURIComponent(obj.wav); else body += "&Body=" + encodeURIComponent(obj.text) system.http({ method: 'POST', url: this.base + '/Accounts/' + this.username + '/Messages.json', header: [ { name: 'Authorization', value: 'Basic ' + toBase64String(this.username + ':' + this.token), secret: true }, { name: 'Content-Type', value: 'application/x-www-form-urlencoded' } ], body: body }); } The settings are also available on domain level. this.base is 'https://api.twilio.com/2010-04-01' but it can be overwritten if needed. Quote Link to comment Share on other sites More sharing options...
jacksonjk Posted October 4, 2022 Report Share Posted October 4, 2022 I think SMSala is best sms provider as compared to Twillio. website url: www.smsala.com Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted October 8, 2022 Report Share Posted October 8, 2022 On 10/4/2022 at 4:49 AM, jacksonjk said: I think SMSala is best sms provider as compared to Twillio. website url: www.smsala.com You might be able to use SMSALA with the simple GET method already, as well as inbound SMS messages (see https://doc.vodia.com/docs/admin-messages). On their documentation site its not clear if they support MMS as well — if yes it might make sense to add them to the dropdown. Quote Link to comment Share on other sites More sharing options...
Scott1234 Posted October 28, 2022 Report Share Posted October 28, 2022 On the back of this is there any way to support Alphanumeric Sender IDs I tried to simply just input my Alphanumerica Sender ID as the ANI thinking that might just do it, but no go. Great for 2-FA logins to present "VODIA PBX" etc... Change the "From" number or Sender ID for Sending SMS Messages – Twilio Support SMS seems to be fine in current config even when using 'Message Service' Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted October 28, 2022 Report Share Posted October 28, 2022 Might just be the form validation that stops you from entering alphanumeric. The Vodia API will take it. Anyhow that being said, we plan to move on to passkey in 69 instead of 2nd factor. The whole 2nd factor was just a workaround for a flawed system where users have to come up with more-or-less random passwords. Quote Link to comment Share on other sites More sharing options...
Scott1234 Posted November 1, 2022 Report Share Posted November 1, 2022 On 10/29/2022 at 1:58 AM, Vodia PBX said: Might just be the form validation that stops you from entering alphanumeric. The Vodia API will take it. Anyhow that being said, we plan to move on to passkey in 69 instead of 2nd factor. The whole 2nd factor was just a workaround for a flawed system where users have to come up with more-or-less random passwords. Looks like the form validation accepts, it seems it was just Twilio that took longer in their backend before my number was truly enabled for Alpha ID. As I got missed call text messages come through with the name a few hours after posting this. Quote Link to comment Share on other sites More sharing options...
Enzo Matrix Posted March 10, 2023 Author Report Share Posted March 10, 2023 Great to see that SMS is working again. I have also got Alpha numeric sender id's working too with Twilio which is good. My problem is that regardless of what I put in the Vodia SMS ANI field, it converts it all to lowercase. I know that the API for Twilio accepts any case, so is it possible to get this fixed? For example, in the ANI field it shows 'MyComp' but the actual api call is sending it as 'mycomp'. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted March 10, 2023 Report Share Posted March 10, 2023 Sounds to me like the ANI is used for authentication? How can a ANI be alphanumerical. I tried to put that name here, it worked... Which version? Which page? Which field? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.