Enable support for 2010 API on the D7 version that does the following

  • adds a toggle to switch between the 2008 api and the 2010 api
  • has updated support to send from the 2010 api

Comments

mcpuddin’s picture

Priority: Critical » Major
Status: Needs review » Active
mcpuddin’s picture

Status: Active » Needs review
StatusFileSize
new3.62 KB

Attached is a support that allows admins to select between either the 2008 or 2010 API.

mcpuddin’s picture

I found a small bug but it is now fixed.

matslats’s picture

I wrote to Twilio and got this very helpful info...

Just to be clear, we don't publish an official Twilio module for Drupal or formally support any of the existing 3rd party modules. That said, I was able to find some information that may be useful to you:

- The "twilio" module (http://drupal.org/project/twilio) is only compatible with Drupal 6 and depends on the older v2.0.8 version of our PHP library, not the current v3.x release. You can download version 2.0.8 of our PHP library from here: https://github.com/twilio/twilio-php/tags
- An updated and Drupal 7 compatible version of the "sms_twilio" module is avaiable from here: http://smsserver.thetechscouts.com/
- Another Drupal module that you may want to look into is "voiptwilio" which is part of the VoIP Drupal module. Here is the project page for voiptwilio: http://drupal.org/project/voiptwilio

matt v.’s picture

The version of the "sms_twilio" module available via the smsserver.thetechscouts.com site appears to be the same version available here, with the patch from comment #3 above applied to it.

mcpuddin’s picture

I recommend someone mark this code as "reviewed and tested by the community"

I have upgraded SMS Twilio & SMS Framework for Drupal 7 to the most recent state so you can use. They are available here until someone else can start reviewing my committed code:

http://smsserver.thetechscouts.com/node/16

nmcclain’s picture

Thank you Mr. mcpuddin -- this rocks! I want to work w/you to get this committed. I successfully tested this with the 2008 version of the Twilio API, manually reviewed the code, ran it through coder_review to confirm it meets Drupal standards, and I think it's ready to be marked RTBC with one exception.

In testing it, I ran into one issue when using the 2010 version of the API: Currently, the code always tries to load the SDK's PHP file with:
require_once DRUPAL_ROOT . '/' . $config['sms_twilio_path'] . '/twilio.php';

The 2010 API's file is actually located at:
require_once DRUPAL_ROOT . '/' . $config['sms_twilio_path'] . '/Services/Twilio.php';

I have attached an updated patch (against the latest 7.x-dev) that uses this different path for the 2010 API. I think this would also address this issue: http://drupal.org/node/1225966

I'm anxious to see this committed to the D7 branch, as it addresses a number of other open issues, including:

Update to use latest API 3.2.3 / 2010 API
http://drupal.org/node/1334714

Need to document required version of twilio-php
http://drupal.org/node/1279882

mcpuddin’s picture

Status: Needs review » Reviewed & tested by the community

I tested this new patch and was able to get it functioning with the new sms_user patch here: http://drupal.org/node/1247538#comment-6283338

Great work nmcclain

mcpuddin’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.