Delen via


Azure Communication Services - SMS-gebeurtenissen

Dit artikel bevat de eigenschappen en het schema voor sms-gebeurtenissen van communication services. Zie het Gebeurtenisschema van Azure Event Grid voor een inleiding tot gebeurtenisschema's.

Gebeurtenistypen

Azure Communication Services verzendt de volgende typen sms-gebeurtenissen:

Gebeurtenistype Beschrijving
Microsoft.Communication.SMSReceived Gepubliceerd wanneer een SMS wordt ontvangen door een telefoonnummer dat is gekoppeld aan de Communication Service.
Microsoft.Communication.SMSDeliveryReportReceived Gepubliceerd wanneer een leveringsrapport wordt ontvangen voor een SMS die door de Communication Service wordt verzonden.

Reacties op gebeurtenissen

Wanneer een gebeurtenis wordt geactiveerd, verzendt de Event Grid-service gegevens over die gebeurtenis om eindpunten te abonneren.

Deze sectie bevat een voorbeeld van hoe de gegevens voor elke gebeurtenis eruitzien.

Microsoft.Communication.SMSDeliveryReportReceived-gebeurtenis

[{
  "id": "Outgoing_202009180022138813a09b-0cbf-4304-9b03-1546683bb910",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/microsoft.communication/communicationservices/{communication-services-resource-name}",
  "subject": "/phonenumber/15555555555",
  "data": {
    "messageId": "Outgoing_202009180022138813a09b-0cbf-4304-9b03-1546683bb910",
    "from": "15555555555",
    "to": "+15555555555",
    "deliveryStatus": "Delivered",
    "deliveryStatusDetails": "No error.",
    "receivedTimestamp": "2020-09-18T00:22:20.2855749Z",
    "deliveryAttempts": [
      {
        "timestamp": "2020-09-18T00:22:14.9315918Z",
        "segmentsSucceeded": 1,
        "segmentsFailed": 0
      }
    ],
    "Tag": "Optional customer-tag set in the original message"
  },
  "eventType": "Microsoft.Communication.SMSDeliveryReportReceived",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2020-09-18T00:22:20Z"
}]

Notitie

Mogelijke waarden voor DeliveryStatus zijn Delivered en Failed.

Microsoft.Communication.SMSReceived-gebeurtenis

[{
  "id": "Incoming_20200918002745d29ebbea-3341-4466-9690-0a03af35228e",
  "topic": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourcegroups/acse2e/providers/microsoft.communication/communicationservices/{communication-services-resource-name}",
  "subject": "/phonenumber/15555555555",
  "data": {
    "messageId": "Incoming_20200918002745d29ebbea-3341-4466-9690-0a03af35228e",
    "from": "15555555555",
    "to": "15555555555",
    "message": "Great to connect with Azure Communication Services events",
    "receivedTimestamp": "2020-09-18T00:27:45.32Z",
    "segmentCount": 1
  },
  "eventType": "Microsoft.Communication.SMSReceived",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2020-09-18T00:27:47Z"
}]

Volgende stappen

Zie de volgende zelfstudie: Quickstart: Gebeurtenissen van sms- en bezorgingsrapport verwerken.