I'm using the RingOut API to initiate calls for my customers and I'm monitoring the events. When I initiate a call to a number A, 2 calls are being created and I'm receiving events of both of them.
I'm sending the following body:
{
from: {phoneNumber: "NUMBER_A"},
to: {phoneNumber: "NUMBER_B"},
playPrompt: true
}
Then I start receiving the following events:
[{ telephonyStatus: 'Ringing', from: 'NUMBER_A', id: '', to: 'NUMBER_B', sessionId: '35393577028', direction: 'Outbound' }]
The one above is ok, but then I receive these:
[{ telephonyStatus: 'Ringing', from: 'NUMBER_B', id: 'b536df52145149d6af765f47a2ec6ed9', to: 'NUMBER_A', sessionId: '35393581028', direction: 'Inbound' },{ telephonyStatus: 'CallConnected', from: 'NUMBER_A', id: 'c4e45991e1d84caa9dccd6e9b76d1e10', to: 'NUMBER_B', sessionId: '35393577028', direction: 'Outbound' }]
See the call log below:
I'd like to know if I'm doing something wrong or if I could relate both events because I don't believe it's reliable to correlate the "from" and "to" properties from the events, or even if I could change the way I'm doing the RingOut and make it stop creating two calls, when it was suppose to just create an Outbound call. Any guidance here will be really appreciated!
Let me know if you need further information.