Download jars from plugin and add them (ametys-plugin-sms-1.4.x.jar and ametys-plugin-sms-resources-1.4.x.jar ) in the WEB-INF/lib directory of your application. Ametys
plugin requires the creation of a table SQL SMS_Subscribers for storing subscriber telephone numbers. Run the script SQL file corresponding to your installation: http://viewvc.ametys.org/viewvc/trunk/plugins /sms/tags/1 .4.0/main/plugin -sms/scripts/
Add buttons to open the mailing list management tool (org.ametys.plugins.sms.SmsList) and send SMS (org.ametys.sms.SendSMS) in the WEB-INF/params/cms-ribbon-default.xml. We recommend adding it to the Home tab, in a new "SMS" group.
In the same file, import the ribbon file specific to SMS mailing lists. plugin:sms://cms-ribbon,.xml
Oops!
Copy to clipboard failed. Open the code and copy it manually.
SMS is sent via a service provider, known as a "broker".
To send SMS messages, you must choose a broker from those proposed by plugin or write your own broker. A broker is a simple extension point.
The plugin SMS provides 2 brokers:
org.ametys.plugins.sms.broker.LoggerBroker This implementation doesn't send SMS messages; it simply traces dummy messages in the application logs. It is therefore a test implementation only.
org.ametys.plugins.sms.broker.EtoileDieseBroker This implementation uses Etoile Dièse 's web service to send SMS messages. To use this broker, you must have an Etoile Dièse account.
In the WEB-INF/param/runtime.xmldeclare the broker to be used:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
Certificate error When sending SMS messages from the back office, you may receive the following error message (depending on the broker used):
Oops!
Copy to clipboard failed. Open the code and copy it manually.
peer not authenticated
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
peer not authenticated
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
peer not authenticated
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
If this is the case, you need to import the broker's certificate into your JVM:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
Broker configuration for mailing list unsubscription
To comply with legislation, you may need to allow your users to unsubscribe from the SMS mailing list.
Si vous avez souscrit à un service STOP SMS auprès de votre fournisseur, vous devrez lui donner l'URL de désabonnement. L'url à fournir est: http://<url_monsite>/_plugins/sms/stop-sms où url_monsite est l'url de votre site Ametys.
Help for contributors: personalized help when sending SMS messages
When sending SMS messages, a text at the bottom of the dialog box invites contributors to add to the end of the SMS message the procedure for unsubscribing from the mailing list:
It may be useful to overload this help text to adapt it to your subscription with your SMS provider. For example: To comply with legislation, add at the end of the message "To stop receiving messages from us, send STOP to 36 XXX".
For this purpose overload the key i18nPLUGINS_SMS_SEND_DIALOG_HINT2 in the WEB-INF/i18n/plugins/sms/message_en.xml:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="fr">
<message key="PLUGINS_SMS_SEND_DIALOG_HINT2">Pour être en conformité avec la législation, pensez à ajouter en fin de message \"Pour ne plus recevoir de message de notre part, envoyez STOP au 36 XXX\".</message>
</catalogue>
<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="fr">
<message key="PLUGINS_SMS_SEND_DIALOG_HINT2">Pour être en conformité avec la législation, pensez à ajouter en fin de message \"Pour ne plus recevoir de message de notre part, envoyez STOP au 36 XXX\".</message>
</catalogue>
<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="fr">
<message key="PLUGINS_SMS_SEND_DIALOG_HINT2">Pour être en conformité avec la législation, pensez à ajouter en fin de message \"Pour ne plus recevoir de message de notre part, envoyez STOP au 36 XXX\".</message>
</catalogue>