Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track Delivery status of SMSes #11

Draft
wants to merge 26 commits into
base: develop
Choose a base branch
from

Conversation

BrianLusina
Copy link
Member

Description

This adds functionality to track delivery status of initially sent SMS messages. Adds a webhook endpoint that an external SMS service provider can call to send sms status callbacks via REST POST requests.

How can we test this?

In order to test this, one can run unit tests on the project with:

make test-unit

And integration tests with:

make test-integration

Manual tests will require starting up the application as specified in the README of this project and making a POST request to the status callback endpoint provided i.e. http://localhost:5000/api/v1/sms/callback with the following payload:

{
"AccountSid": "<ACCOUNT_SID>"
"From": "<FROM>"
"MessageSid": "<MESSAGE_SID>"
"MessageStatus": "<MESSAGE_STATUS>"
"SmsSid": "<SMS_SID>"
"SmsStatus": "SMS_STATUS"
}

Note that the values in <> should be filled with actual values.

This should accept the status callback request and publish the message to a broker. A consumer then picks up the message and matches the callback request to an initially delivered sms message. If no such message is found, the consumer will publish a message to another queue for further processing(This logic will be handled in another PR).

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new errors

@BrianLusina BrianLusina added documentation Improvements or additions to documentation enhancement New feature or request Unit Tests Unit Tests Integration Tests Integration Tests Consumers Consumer implementation labels Jun 9, 2023
@BrianLusina BrianLusina self-assigned this Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Consumers Consumer implementation documentation Improvements or additions to documentation enhancement New feature or request Integration Tests Integration Tests Unit Tests Unit Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant