Greetings,
How sould a call duration be calculated?
Let's say the call creation on Kamailio as a proxy has those steps :
1 - Invite is received 2 - Provisional responses 3 - 200 OK is received 4 - ACK to 200 OK is received 5 - BYE is received 6 - 200 OK to BYE is received
Should the duration begin to count on step 3 (200-Ok Received) or 4 (ACK received) ? Should it end on the step 5 or 6?
ACC module tells me that start time for CDR can either be on dialog creation or confirmation - https://www.kamailio.org/docs/modules/5.2.x/modules/acc.html#acc.p.cdr_start... - What is the dialog creation ? Is it when the INVITE is received ? - According to DIALOG module, a confirmed dialog can be "Waiting for ACK" or "Active Call". Which one is used by acc module? Best Regards,
On Mon, Dec 30, 2019 at 12:04:47PM +0000, Duarte Rocha wrote:
How sould a call duration be calculated?
Let's say the call creation on Kamailio as a proxy has those steps :
1 - Invite is received 2 - Provisional responses 3 - 200 OK is received 4 - ACK to 200 OK is received 5 - BYE is received 6 - 200 OK to BYE is received
Should the duration begin to count on step 3 (200-Ok Received) or 4 (ACK received) ? Should it end on the step 5 or 6?
IMHO from 3 to 5.
If you choose 4 to start people can get an x (30) amount of seconds for free by simply not sending an ACK. RTP will already be established and there will be 2 way communication. Not receiving the ACK will result in a teardown of the connection. But 30s free phone calls are enough for most.
Same for 5, you got a BYE and the only option you have to not getting an ACK is sending other BYEs and eventually tearing down the call. If you stop RTP at this moment and propagate the BYE there is nothgin more you can do IMHO.
3 to 6
Except that you will also accept non 2xx on the BYEs.
SIP accounting and hangup handling can be complicated sometimes.
The accounting module for example will generate ACC events on transactions completion or missed.
.
On Mon, Dec 30, 2019, 04:06 Duarte Rocha duarterocha91@gmail.com wrote:
Greetings,
How sould a call duration be calculated?
Let's say the call creation on Kamailio as a proxy has those steps :
1 - Invite is received 2 - Provisional responses 3 - 200 OK is received 4 - ACK to 200 OK is received 5 - BYE is received 6 - 200 OK to BYE is received
Should the duration begin to count on step 3 (200-Ok Received) or 4 (ACK received) ? Should it end on the step 5 or 6?
ACC module tells me that start time for CDR can either be on dialog creation or confirmation - https://www.kamailio.org/docs/modules/5.2.x/modules/acc.html#acc.p.cdr_start...
- What is the dialog creation ? Is it when the INVITE is received ?
- According to DIALOG module, a confirmed dialog can be "Waiting for ACK"
or "Active Call". Which one is used by acc module? Best Regards, _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users