Sms service fixing
We've a few applications which are sending sms to its end users. The applications are using the service from ebensms for broadcasting smses.
However there are a few instances where this facility gets blocked in the server. In such cases, follow the below steps.
1. Check if the server has outbound connectivity,
** If not, ask the server team to enable it, or open a specific outbound-allow rule to the following URLs:
tsms.origamitechnologies.com AND alerts.ebensms.com (port 80)
** If yes, check if you can connect to alerts.ebensms.com and tsms.origamitechnologies.com from the server (port 80).
If you are unable to connect, ask the server team to check the issue and do a traceroute to see if our server IP is blocked in the SMS server (amazon).
If it's blocked, make the following changes in the SMS sending code, so that we can spoof our server IP address into another one which is not blocked. (Since it's almost impossible to make them unblock)
$ch = curl_init(API_URL_TSMS.'data='.$data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_INTERFACE, "109.73.166.100");
curl_exec($ch);
curl_close($ch);
The bolded line is what we need to add. The IP can be any other IP which is associated with the server (this one can be used in owrench and sin3 server).
Note: Developers can use the bolded line to add in their code, if they already have information about such case in any server or once confirmed with system admin.