SouthLoop Group

Supporting the communITy

Diafaan SMS from The Dude

This was done some time ago for someone but still works. It uses Diafaan SMS Server as the Web/SMPP Server.

There are other programs out there 

If you use "The Dude" and need SMS alerts when something goes astray, then this may help.

 Obviously below you need to set:

  • URL
  • username
  • password
  • to

According to your needs and Diafaan settings (which are hinted at lower down the page).

 
:local notificationtext "Service [Probe.Name] on [Device.Name] is now [Service.Status]"
:local notificationtextEncoded

:for i from=0 to=([:len $notificationtext] - 1) do={ 
  :local char [:pick $notificationtext $i]
  :if ($char = " ") do={
    :set $char "%20"
  }
  :set notificationtextEncoded ($notificationtextEncoded . $char)
}
:put $notificationtextEncoded

:local url "http://your.serveraddress.here:9710/http"
:local username user
:local password pass
# :local from dude
#
#
# First Name Last Name
 :local to "+xxxxxxxxxx"
#
/tool fetch url="$url/send-message\?username=$username&password=$password&to=$to&message-type=sms.automatic&message=$notificationtextEncoded" keep-result=no
# And test it via pressing Test button.


#Service [Probe.Name] on [Device.Name] is now [Service.Status] ([Service.ProblemDescription])

To add this entry look under Notifications on the left hand side of The Dude panel.

Note that SMS2 is via SMTP and will depend on your mailserver to sort.

 

 

Within Diafaan:

You will need to first create a Connector within Diafaan SMS Server to do this.

You must click on Test to continue to the final steps - this checks that the service starts properly and that the TCP port is unused by anything else.

Select Web Connector on the left hand side and choose Edit connector properties on the right of the screen.

Ensure your that Enable HTTP API is on and set as above.

You will then need to log into the local web server with your Diafaan user credentials and create the user you need to send SMS' from.

 

Remember to Test inside The Dude before thinking it's all go.