Before every ami Event that had Response in it was being handle as a response, but
Originate Action, generates and Event with Response, which ami.on("eventOriginateResponse") was failing to recognise.
Therefore, adding a new if, that checks when the data from AMI has, Response Action and Event emits an event and not
a response.
Before every ami Event that had Response in it was being handle as a response, but Originate Action, generates and Event with Response, which ami.on("eventOriginateResponse") was failing to recognise. Therefore, adding a new if, that checks when the data from AMI has, Response Action and Event emits an event and not a response.