Can someone please explaind me what is DLR and how it used in sms gateways? - dynamic-language-runtime

Can someone please explaind me what is DLR and how it used in sms gateways?

It is a URL callback for Delivery Reports. Instead of the gateway logging the activity it will callback the provided URL using a querystring at the end with the parameters of the delivery report.
So in order for the URL callback to work you'll need a HTTP webserver with a URL that listens for incoming GET requests:
http://www.example.com/dlr.php
then requests are sent to it like so
"http://example.com/dlr.php?page=dlr&status=[status]&answer=[answer]&to=[to]&ts=[ts]&id=[id]"
The full listing of documentation can be found here.

When you send messages through a gateway you have the opportunity to specify wether or not you want to be notified of events other than the SMSC receiving your message.
When you do specify that you want to receive DLRs the gateway will send you a DLR to let you know that the result of attempting to deliver the message to the network. In case of failure the DLR will contain a code about the reason of failure.
Gateways may send more DLRs (Intermediate Notifications) to notify of other events that happen after the message has been delivered to the network, e.g., delivery to a handset.
You can find more by looking at the SMPP spec, below is a basic diagram of the flow for a Network Delivery Receipt (taken from the spec v3.4).

Related

Can you add a Nagios Acknowledgment URL to Slack messages

I'm new to nagios and my first task has been slack integration. I am using the Nagios created plugin for Slack and everything is working correctly as far as posting the message in the channels for both hosts and services. I want to add an acknowledgment URL to the message that gets sent to slack, so our team can just acknowledge through the slack message. I have tried adding the URL in various places, like the host/service definitions so I could then call it in the command Slack_notification_handlers. Is it possible to add said acknowledgement urls with the current methods I'm using? or is this something I'm going to have to make myself?

What's the correct HTTP response code to return for Denial of Service (DoS) attack?

I have some logic in the web server to find out if the user is trying to do a DoS attack. But what's the correct HTTP response code to return for that? Also what's a good error message I can put in HTTP body to tell the user politely that he's got into the DoS attack path?
But what's the correct HTTP response code to return for that?
RFC 6585 suggests 429 Too Many Requests
The 429 status code indicates that the user has sent too many requests in a given amount of time ("rate limiting").
If the attack has compromised your ability to handle legitimate requests, then to those you might respond with 503 Service Unavailable.
Note the change in semantics - the person sending the bad requests gets a status out of the 4NN Client Error class, while those not at fault get a status from the 5NN Internal Service Error class.
what's a good error message I can put in HTTP body to tell the user politely that he's got into the DoS attack path?
Please stop that?

EASYSMPP- Capture the exact reponses from SMPP server

I am using EASYSMPP to send SMSes through an SMPP server, however am unable to capture the exact responses from the SMSC because the function client.SendSMS, returns either TRUE(for sent SMS) or FALSE(for a failed SMS). I want to be able to log those responses so that I can share with the service provider for analysis.
Kindly assist.

control flow with anypoint studio// using choice

i want to do a test on a flow with anypoint, so the idea is to test if a response coming from a http flow is ok (response from a server who will send a push to a device). If the response is yes there is nothing to do, if not we have to send a message to a number phone.
So for the elements i was thinking about http connector, and a flow control: choice.is that all what i need? there is any other suggestion? and finaly how to configure choice element.
Please go through the Choice to know how to configure it :- http://www.mulesoft.org/documentation/display/current/Choice+Flow+Control+Reference
You could have atleast tried it in a flow and shared it here so that we could have suggested you on what you attempted
Http inbound connector and Choice router is what you need , remaining elements depends on what device or end system you are planning to push the data
Use Http connector, choice router and a Java component which can sen SMS though SMS gateway.

How to receive webhook signal from 3rd party service

I'm using a SaaS for my AWS instance monitoring and Mandrill for email sending/campaigns.
I had created a simple chart with Zapier but I'd rather like to host it myself. So my question is:
How can I receive a webhook signal from Mandrill and then send it to Datadog from my server? Then again I guess hosting this script right on the same server I'm monitoring would be a terrible idea...
Basically I don't know how to "receive the webhook" so I can report it back to my Datadog service agent so it gets updated on their website.
I get how to actually report the data to Datadog as explained here http://docs.datadoghq.com/api/ but I just don't have a clue how to host a listener for web hooks?
Programming language isn't important, I don't have a preference for that case.
Here you can find how to add a new webhook to your mandrill account: https://mandrillapp.com/api/docs/webhooks.php.html#method=add
tha main thing here is this:
$url = 'http://example/webhook-url';
this is your webhook URL what will process the data sent by mandrill and forward the information to Datadog.
and this is a description about what mandrill will send to your webhook URL: http://help.mandrill.com/entries/21738186-Introduction-to-Webhooks
a listener for webhooks is nothing else then a website/app which triggers an action if a request comes in. Usually you keep it secret or secure it with (http basic) authentication. E.g. create a website called http://yourdomain.com/hooklistener.php. You can then call it with HTTP POST or GET and pass some data like hooklistener.php?event=triggerDataDog or with POST and send data along with the body. You then run a script or anything you want to process that event.
A "listener" is just any URL that you host where you can receive data that is posted to it. Keep in mind, since you mentioned Zapier, you can set up a trigger that receives the webhook data - in this case the listener URL is provided by Zapier, and you can then send that data into any application (or even post to another webhook). Using Zapier is nice because it doesn't require you to write the listener code that receives the hook data and does something with it.