thank you @sjpadgett for the response.
Please in which script/code is the phone number format defined so that I can look at it.
Thank you
I looked at validation and appears format needs to be US area code+number i.e 10 or 11 with 1, digits.
source interface/modules/custom_modules/oe-module-faxsms/rc_sms_notification.php L-158
@juggernautsei
This is where you most likely fail: interface/modules/custom_modules/oe-module-faxsms/controllers/TwilioFaxClient.php L-171
Though you should get an exception message. I don’t understand that.
I just installed and fired up v1.2 and sent a couple faxes to myself.
Make sure you are using correct credentials and it’s important to have an API App key and secret you generate on Twilio via dashboard.
@sjpadgett we have firewall security rules that dictate we have to know where inbound traffic is coming from by IP address.
Our outbound traffic is set
-A OUTPUT -p tcp -m tcp -d fax.twilio.com --dport 443 -j ACCEPT
-A OUTPUT -d twilio.com -p tcp -m tcp --dport 443 -j ACCEPT
Looks to me the outbound connection should work. I am still confused on how it suppose to work.
Looks to me that syntax for fetching or sending faxes is https://fax.twilio.com/v1/Faxes/{FaxSid}/Media/{Sid}
Is this for outbound faxes?
I don’t have a Twilio dashboard
Thank you for you support.
I edited the script to accept the mobile numbers together with the country code.
when i run a test, i get the following:
**SEND NOTIFICATION BEFORE:1 | CRONJOB RUN EVERY:150 | APPDATETIME: 2020-08-06 18:00:00 | REMAINING APP HOUR:2 | SEND ALERT AFTER:1 | SENT SUCCESSFULLY TO +234803…
A courtesy reminder for Test Patient1
For the appointment scheduled on: Thursday August 6, 2020 At: 6:00 PM Until: 18:00:00
With: … Of: …
Please call … if unable to attend.
yet the SMS is not delivered.
I have tested it with two network providers in my country, the situation is the same.
Also, my twilio account balance has not reduced, suggesting that the sms may not have been initiated by twilio. please kindly assist further.
thank you
I don’t know what firewall you use but it should be able to resolve a domain to an ip.
For a fax uri for outgoing request and thus incoming request to fax server:
Check out how that request is sent in source interface/modules/custom_modules/oe-module-faxsms/controllers/TwilioFaxClient.php around L-115.
In essence I send the fax file uri that the fax server understand for fax location and to verify that indeed it’s a Twilio request and the url to the fax server for Twilio’s callback. This is all bundled in the request post body. Again, look at code.
Surely there is one. All accounts have one. Here’s mine:
Hack me if ya can.![]()
Use the debugger as it will help you out alot with showing any errored requests and why…
If still have an issue then give me a call. Let me know first as I screen for telemarketers.
@sjpadgett please can you help me look at this.
Thank you
I have tested it with two network providers in my country, the situation is the same.
Also, my twilio account balance has not reduced, suggesting that the sms may not have been initiated by twilio. please kindly assist further.
@mfonnix I’m not sure how to help you. Does Twilio not give any clues? Does your Twilio account allow access to Twilio’s debugger? This i’m no longer sure about as I thought all Twilio accounts have this capability.
If you’re not being charged for the message it appears the request is not making it to Twilio however, if I get a success from my request then i’ve never seen a message not be delivered. Also, destination cell may be blocking as spam but i’d expect your Twilio account to show some notice.
I’ll look at that code again but, look through your Twilio account again for any clues. See if you can find the debugger.
ahh, here’s the problem and I forgot this. I format for US numbering. Still, Twilio should indicate some error.
interface/modules/custom_modules/oe-module-faxsms/controllers/TwilioFaxClient.php L-82
public function formatPhone($number)
{
// this is u.s only. need E-164
$n = preg_replace('/[^0-9]/', '', $number);
if (stripos($n, '1') === 0) {
$n = '+' . $n;
} else {
$n = '+1' . $n;
}
return $n;
}
The plus 1 may be your issue.
I found the debugger in twilio. I had misread your message.
However, could you answer the question about the blank Error that we are getting at the top of the page?
An invalid fax number could be a clue! Still, i’ve never seen an empty exception returned from faxSend.
oh wait, you prob deleted rest of fax to show on forum. duh…
Is your php error log showing anything?
No the fax number is one that I got from someone. I changed fax numbers and still the same thing. I the console log is showing that the file uploaded successfully. But still get the blank error warning. No my logs are jacked that I can’t get an error if I tried.
In your twilio account you need
WebHook
https://yourdomain/openemr/interface/modules/custom_modules/oe-module-faxsms/faxserver/receivedFax?site=default
Turning towards inbound faxes. I found in the debugger this address given does not exist. In my installation recieveFax.php does not exist. fax_server.php does exist.
Thanks for all your responses.
In my installation recieveFax.php does not exist. fax_server.php does exist.
Remember, these are REST calls so, recieveFax is a method in faxserver. That redirect happens via .htaccess.
I’m troubled by the empty Error message. I’ll take another look at code and maybe try to give you a better error trap.
@mfonnix
I added some error traps to interface/modules/custom_modules/oe-module-faxsms/rc_sms_notification.php. Here’s what I get.
rc_sms_notification.php (11.7 KB)
I am down a similar rabbit hole to some of the posts in this thread. When I run composer, it gets to “updating dependencies” then throws an out of memory error that I can’t seem to get around. But I can see that it updated the composer.json file to include openemr/oe-module-faxsms. So, I manually copied the oe-module-faxsms module to the interfaces/modules/custom_modules directory, and then I can enable and make active the fax module, and set the provider to Twilio in globals.
Now, when I click Modules > Fax Module to configure it, the tab is blank and titled as “Unknown”. When I view the frame source, I see “Site ID is missing from session data!”. Any thoughts on troubleshooting further, or am I hosed in some way because composer does not run successfully?
Goto the right top actions pull down and select credentials setup.
I am attempting to install the module and got through several dependency issues but am now stuck. When I use
composer require openemr/oe-module-faxsms:1.2.0
I get:
/var/www/html/openemr/vendor/openemr/oe-module-installer-plugin does not exist and could not be created.
I tried using composer require openemr/oe-module-installer-plugin and I get the same error (it’s trying to use 0.1.3 of oe-module-installer-plugin). I did not have a vendor/openemr directory and also tried creating one but that didn’t work. Is some vendor software required before this fax with SMS notification module is installed? The composer version I am using outdated - do I need to upgrade to composer 2.0?
Thank you.
It seem a tipical composer v2 error message (composer2 require composer-plugin-api ^2.0)
Can you try this command on terminal :
composer --version
If you are using composer v2 try a rollback to composer v1 with:
composer self-update --1
after that try composer require openemr/oe-module-faxsms
Before fooling with composer version try using
composer require openemr/oe-module-faxsms:^1.0.0
I’m not sure about the repository state of affairs any more.
Okay just tested with
Composer version 1.10.10 2020-08-03 11:35:19
and works so …





