Sms module not working

mikeoe2003 wrote on Tuesday, June 28, 2016:

I copied the script from “Larry Lart on 11/03/2008” on gthub for the sms module but i got the errors below

First i got before adjusting my Twilio credentials…
== Error in SMS authorization! (ERR: 108, Invalid or missing api_id) ===

Secondlyt i got the error below after adjusting my Twilio credentials…
== Error while executing fopen sending method!
Please check does PHP have OpenSSL support and check does PHP version is greater than 4.3.0. ===

mikeoe2003 wrote on Tuesday, June 28, 2016:

Please find attached the Cron_sms_notification.php file i used… Thank you guys again for your kind assistance.

hitechelp wrote on Tuesday, June 28, 2016:

Michael,

We’ve been using Twilio since 2013 for SMS appointment reminders on our
Ubuntu Server.
It’s a bit of a chore,but well worth the effort.

You didn’t mention what OS you’re running so here are some of the things
that are universal.

For starters, you need to modify the following files

globals.inc.php (To create places to enter your Twilio authentication data
in the global settings page)
Add the following code immediately after this. x1(‘API key for SMS
Gateway.’)), (which is split across lines 1002 and 1003 in my
globals.in.php)

‘TWILIO_ACCOUNT_SID’ => array(
xl(‘Twilio Account Sid’),
‘text’, // data type
‘’, // default
xl(‘Account Sid for Twilio.’)
),
‘TWILIO_AUTHTOKEN’ => array(
xl(‘Twilio Auth Token’),
‘text’, // data type
‘’, // default
xl(‘Auth Token for Twilio.’)
),
‘TWILIO_FROM’ => array(
xl(‘Twilio From name’),
‘text’, // data type
‘’, // default
xl(‘Twilio From name’)
),

cron_sms_notification.php (to permit your server to access your Twilio
account)
Add the following code immediately after this line. global $mysms; (which
is line 38 in the file you attached)

$sql=“select * from globals where gl_name in
(‘TWILIO_ACCOUNT_SID’,‘TWILIO_AUTHTOKEN’,‘TWILIO_FROM’)”;
$q=mysql_query($sql);
while($r=mysql_fetch_assoc($q)){
if($r[‘gl_name’]==‘TWILIO_ACCOUNT_SID’)
$AccountSid=$r[‘gl_value’];
if($r[‘gl_name’]==‘TWILIO_AUTHTOKEN’)
$AuthToken=$r[‘gl_value’];
if($r[‘gl_name’]==‘TWILIO_FROM’)
$from=$r[‘gl_value’];
}
if($AccountSid)
{
include_once(“/var/www/openemr/modules/sms_email_reminder/sendnotifications.php”);
}else

Hit me back if you need more help.

On Tue, Jun 28, 2016 at 9:14 AM, Michael Onyenma mikeoe2003@users.sf.net
wrote:

Please find attached the Cron_sms_notification.php file i used… Thank you
guys again for your kind assistance.

Attachments:


sms module not working
https://sourceforge.net/p/openemr/discussion/202505/thread/091e4186/?limit=25#867b

Sent from sourceforge.net because you indicated interest in
OpenEMR / Discussion / Help

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net


Regards,

David

mikeoe2003 wrote on Tuesday, June 28, 2016:

Thank you very much David
I am using the OpenEMR 4.22 ver. which is bundled with Xampp and it is running on windows 8.1
Secondly, is the file path below still valid in my windows platform ?

include_once("/var/www/openemr/modules/sms_email_reminder/sendnotifications.php");

hitechelp wrote on Tuesday, June 28, 2016:

Not sure about Windows path to OpenEMR web directory (I use Ubuntu)
however, the last part (modules/sms_email_reminder/ is correct. That
directory should also contain the Twilio folder (downloaded from their
website) in addition to sendnotifications.php the following files should
also be there;
cron_functions.php
cron_sms_notification.php

Regards,
David

On Jun 28, 2016 1:08 PM, “Michael Onyenma” mikeoe2003@users.sf.net wrote:

Thank you very much David
I am using the OpenEMR 4.22 ver. which is bundled with Xampp and it is
running on windows 8.1
Secondly, is the file path below still valid in my windows platform ?

include_once(“/var/www/openemr/modules/sms_email_reminder/sendnotifications.php”);

sms module not working
https://sourceforge.net/p/openemr/discussion/202505/thread/091e4186/?limit=25#867b/7226/74b1

Sent from sourceforge.net because you indicated interest in
OpenEMR / Discussion / Help

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net

gmandra wrote on Thursday, July 14, 2016:

David,
I am on the process of incorporating Twilio to our newly installed OpenEMR v4.2.2 which is running on Windows 7 Pro. After spending days researching both (here and Github) on how to best incorporate Twilio I think I finally found the correct thread. Can you please share the steps you’ve taken and the files you’ve downloaded to make Twilio work? In what directory you’ve added/deleted scripts? You’re help is greatly appreciated.

hitechelp wrote on Sunday, August 14, 2016:

George, I must appologize for missing your last post. The steps and files needed for a Windows based system will be somewhat different. As I stated previously, we use Ubuntu and the Wiki page for setting it up.