Calling simultaneously 2 parties with tracking when call answered

Hello to all, community!
By design of application I need to call simultaneously 2 people. And when first answer he come to bridge and listen ringing until other side is answer too. If they both answer simultaneously thet come to the bridge almost in the same time and start speaking. To achieve this i initiate a call by call file:

Channel: Local/+111@outgoing
Context: outgoing
Extension: +999
Priority: 1

And have dialplan:

[outgoing]
exten => _+XXXXXXXXXXX,1,Answer()
same => n,Dial(PJSIP/${EXTEN}@provider)
same => n,Hangup()

But, as you can see first call in Answer, to let number +999 to be dialed. But once call answered by Asterisk it’s not meant that it was answered by real people on the other side, actually it’s can be ringing. And when it’s answered Asterisk do not track it. I cannot see it in CDR logs:

+---------------------+---------------------+---------------------+--------------+--------------+---------+----------------------------------------+
| start               | answer              | end                 | src          | dst          | billsec | channel                                |
+---------------------+---------------------+---------------------+--------------+--------------+---------+----------------------------------------+
| 2020-03-22 15:45:48 | 2020-03-22 15:45:48 | 2020-03-22 15:45:55 | +111         | +999         |       7 | Local/+111@outgoing-00000000;1         |
| 2020-03-22 15:45:48 | 2020-03-22 15:45:48 | 2020-03-22 15:45:55 | +999         | +111         |       7 | Local/+111@outgoing-00000000;2         |
| 2020-03-22 15:45:55 | 2020-03-22 15:45:55 | 2020-03-22 15:46:00 | +999         |              |       4 | PJSIP/provider-00000000                |

Call start and answer it’s the same time, but actually it’s a time when Asterisk answer a channel and immediately start Dial +999, or +111.
The last string is only one which is also confusing a little bit. My guess it’s a time when they both comes to bridge. But there can be a time when one of them answered but second is no, and this time when first answered waiting for another side (listening ringing bells) answer is not shows, but it’s billing time which sip provider counts.

How I can track exactly time when remote side is answer, despite of that asterisk consider channel as answered?

Also it’s not necessary to answer a call immediately in dialplan (first app Answer), it’s just trick to let call file start call another person - +999

Thanks in advance!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.