O exemplo a seguir mostra uma entrada inválida. Nesse caso, o objeto JSON passa muitos itens para um aplicativo de mídia SIP.
{
"SchemaVersion": "1.0",
"Actions": [
{
"Type": "PlayAudio",
"Parameters": {
"ParticipantTag": "LEG-A
",
"AudioSource": {
"Type": "S3",
"BucketName": "mtg1-sipmedia-app-iad
",
"Key": "Welcome3.wav
"
}
}
}
],
"TransactionAttributes": {
"key1
": "value1
",
"key2
": "value2
",
"key3
": "value3
",
"key4
": "value4
",
"key5
": "value5
",
"key6
": "value6
",
"key7
": "value7
",
"key8
": "value8
",
"key9
": "value9
",
"key10
": "value10
",
"key11
": "value11
"
}
}
O exemplo a seguir mostra a resposta à entrada fornecida anteriormente. Essa saída é passada de um aplicativo de mídia SIP de volta para a função do Lambda da AWS que invocou o aplicativo.
{
"SchemaVersion": "1.0",
"Sequence": 2
,
"InvocationEventType": "INVALID_LAMBDA_RESPONSE",
"CallDetails": {
"TransactionId": "mtg1-tx-id
",
"AwsAccountId": "166971021612
",
"AwsRegion": "us-east-1
",
"SipRuleId": "aafbd402-b7a2-4992-92f8-496b4563c492
",
"SipMediaApplicationId": "e88f4e49-dd21-4a3f-b538-bc84eae11505
",
"Participants": [
{
"CallId": "72cbec69-f098-45d8-9ad6-e26cb9af663a
",
"ParticipantTag": "LEG-A
",
"To": "+14345550101
",
"From": "+14255550199
",
"Direction": "Inbound",
"StartTimeInMilliseconds": "1644540839987
"
}
]
},
"ErrorType": "TransactionAttributesInvalidMapSize",
"ErrorMessage": "Transaction Attributes has too many mappings. Maximum number of mappings is 10"
}