AMI: Originate failed, however, Asterisk completes the call

We have built an application that generates calls using the AMI through Action: Originate. We rely on the AMI response, Response: Success, and Response: Error, to ensure that it has received the command and whether or not it will execute the call.

However, we have noticed that often the AMI responds with the message:

Action: Originate
Channel: Local/996741393@cmp-dial-out
Context: cmp_audio_playback
Exten: 13452
Priority: 1
CallerID: MARIA INES PAOLAZZI <996741393>
Account: 13452.191526.1694804090853
ActionID: 02690c9b-228e-4dcb-bec3-7c39e35854fd

Response: false
Response: Error
ActionID: 02690c9b-228e-4dcb-bec3-7c39e35854fd
Message: Originate failed

And yet it still executes the call:

[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] pbx.c: Executing [996741393@cmp-dial-out:1] NoOp("Local/996741393@cmp-dial-out-0000045a;2", "******************** CMP LOCAL CELULAR AMD ********************") in new stack
[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] pbx.c: Executing [996741393@cmp-dial-out:2] Set("Local/996741393@cmp-dial-out-0000045a;2", "CAMPANHA=13452") in new stack
[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] pbx.c: Executing [996741393@cmp-dial-out:3] Set("Local/996741393@cmp-dial-out-0000045a;2", "GROUP(13452)=13452") in new stack
[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] pbx.c: Executing [996741393@cmp-dial-out:4] Set("Local/996741393@cmp-dial-out-0000045a;2", "DB(cmp/13452)=5") in new stack
[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] pbx.c: Executing [996741393@cmp-dial-out:5] NoOp("Local/996741393@cmp-dial-out-0000045a;2", "DB(cmp/13452): 5") in new stack
[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] pbx.c: Executing [996741393@cmp-dial-out:6] NoOp("Local/996741393@cmp-dial-out-0000045a;2", "GROUP_COUNT(13452): 5") in new stack
[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] pbx.c: Executing [996741393@cmp-dial-out:7] Dial("Local/996741393@cmp-dial-out-0000045a;2", "SIP/vivo/996741393") in new stack
[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] netsock2.c: Using SIP RTP TOS bits 184
[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] netsock2.c: Using SIP RTP CoS mark 5
[2023-09-15 15:54:51] VERBOSE[42811][C-000015dd] app_dial.c: Called SIP/vivo/996741393
[2023-09-15 15:54:54] VERBOSE[42811][C-000015dd] app_dial.c: SIP/vivo-000017bf is ringing
[2023-09-15 15:54:55] VERBOSE[42811][C-000015dd] app_dial.c: SIP/vivo-000017bf is making progress passing it to Local/996741393@cmp-dial-out-0000045a;2
[2023-09-15 15:55:00] VERBOSE[42811][C-000015dd] app_dial.c: No one is available to answer at this time (1:0/0/0)
[2023-09-15 15:55:00] VERBOSE[42811][C-000015dd] pbx.c: Executing [996741393@cmp-dial-out:8] Hangup("Local/996741393@cmp-dial-out-0000045a;2", "") in new stack
[2023-09-15 15:55:00] VERBOSE[42811][C-000015dd] pbx.c: Spawn extension (cmp-dial-out, 996741393, 8) exited non-zero on 'Local/996741393@cmp-dial-out-0000045a;2'
[2023-09-15 15:55:01] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:1] NoOp("Local/996741393@cmp-dial-out-0000045a;2", "cmp-dial-out ACCOUNTCODE: 13452.191526.1694804090853 | DIALSTATUS: NOANSWER | BILLSEC: 0 | CALLDATE: 2023-09-15 15:55:00 | GRAVACAO: ") in new stack
[2023-09-15 15:55:01] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:2] Set("Local/996741393@cmp-dial-out-0000045a;2", "CURLOPT(userpwd)=admin:1f82bf7e27719b77b0603aa2e") in new stack
[2023-09-15 15:55:01] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:3] Set("Local/996741393@cmp-dial-out-0000045a;2", "EVENTO=AccountCode: 13452.191526.1694804090853 | Linkedid: 1694804091.71674 | Evento: NOANSWER | Data: 2023-09-15 15:55:00 | Duracao: 0 | Gravacao") in new stack
[2023-09-15 15:55:01] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:4] GotoIf("Local/996741393@cmp-dial-out-0000045a;2", "0?ANSWER") in new stack
[2023-09-15 15:55:17] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:5] Set("Local/996741393@cmp-dial-out-0000045a;2", "EVENTO=AccountCode: 13452.191526.1694804090853 | Linkedid: 1694804091.71674 | Evento: NOANSWER | Data:  | Duracao:  | Gravacao") in new stack
[2023-09-15 15:55:17] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:6] Set("Local/996741393@cmp-dial-out-0000045a;2", "CHAMADAS=2") in new stack
[2023-09-15 15:55:17] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:7] NoOp("Local/996741393@cmp-dial-out-0000045a;2", "ACCOUNTCODE -> 13452.191526.1694804090853 <-") in new stack
[2023-09-15 15:55:17] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:8] Set("Local/996741393@cmp-dial-out-0000045a;2", "GROUP(13452)=13452") in new stack
[2023-09-15 15:55:17] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:9] Set("Local/996741393@cmp-dial-out-0000045a;2", "DB(cmp/13452)=2") in new stack
[2023-09-15 15:55:17] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:10] NoOp("Local/996741393@cmp-dial-out-0000045a;2", "DB(cmp/13452): 2") in new stack
[2023-09-15 15:55:17] VERBOSE[42811][C-000015dd] pbx.c: Executing [h@cmp-dial-out:11] NoOp("Local/996741393@cmp-dial-out-0000045a;2", "GROUP_COUNT(13452): 2") in new stack

Should Asterisk execute the call if the message was Response: Error?
I understand that it shouldn’t.

Does this message (Response: Error) mean something else?
What does Response: Error mean?"

It’s whether the originated call was answered or not. In this case, it was not.

Thanks @jcolp

I see, my interpretation of the command was incorrect; I believed it to be a confirmation that the AMI had received the command.

There are times when I send the Originate command, and I monitor the Asterisk console, but the call is not executed, and no error is generated in the console. What can I do to find out what happened? Is there a different error generated in the AMI Response?

Is there any way to confirm that the AMI received the sent command?