Re: [OpenSIPS-Users] Accounting of 200 OK and BYE

2017-07-28 Thread Bogdan-Andrei Iancu

Hi Daniel,

Yes, transaction is on the final response - fro INVITE you want to 
account when the call was accepted, not when it was dialed. If you want 
for the BYE to account when the request was received, use extra 
accounting to store the timestamp (ms also) of receiving the BYE (via 
script operations). When you correlate the INVITE with the BYE, you will 
calculate the duration from the 200 OK INVITE to the BYE request.


Or much simpler just use dialog based accounting which is already doing 
this.


Regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 07/27/2017 12:05 AM, Daniel Zanutti wrote:

Hi Bogdan

So on transaction accounting, the record is written after transaction 
receives final response. So it's not written as soon I receive BYE, 
but when I receive the 200OK of the BYE.


My customer is complaining that the call is taking 200ms more and our 
system is charging 1 sec more than on his billing. On million calls, 
this is generating a some thousands difference.


Thanks for the information!

Regards

On Tue, Jul 25, 2017 at 6:36 AM, Bogdan-Andrei Iancu 
> wrote:


Hi Daniel,

There are 3 types of accountings in OpenSIPS - per message, per
transaction, per dialog.

For the per message, it is clear :) . When doing per-transaction
accounting, the ACC record is written when the transaction is
completed with a final response (>=200) on the UAS side (towards
caller). For the dialog based accounting, the time reference (for
ending the call) is the reception of BYE request; still the CDR is
written on the BYE final reply (as OpenSIPS allows you to collect
CDR info from the BYE replies too).

Best regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com 

OpenSIPS Bootcamp 2017, Houston, US
   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html


On 07/20/2017 10:49 PM, Daniel Zanutti wrote:

Hi Alex

I'm having a billing problem from receiving BYE to 200 OK is
taking more than 500ms. If BYE is accounted when it's received,
great!

Are you absolutely sure it works this way?

Thanks

On Thu, Jul 20, 2017 at 4:26 PM, Alex Balashov
> wrote:

My understanding is that this is a rather simple module
without sophisticated state componentry, and that it logs
things immediately as received, in the same iteration of
message processing.

-- Alex

--
Principal, Evariste Systems LLC (www.evaristesys.com
)

Sent from my Google Nexus.

___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users






___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Accounting of 200 OK and BYE

2017-07-26 Thread Daniel Zanutti
Hi Bogdan

So on transaction accounting, the record is written after transaction
receives final response. So it's not written as soon I receive BYE, but
when I receive the 200OK of the BYE.

My customer is complaining that the call is taking 200ms more and our
system is charging 1 sec more than on his billing. On million calls, this
is generating a some thousands difference.

Thanks for the information!

Regards

On Tue, Jul 25, 2017 at 6:36 AM, Bogdan-Andrei Iancu 
wrote:

> Hi Daniel,
>
> There are 3 types of accountings in OpenSIPS - per message, per
> transaction, per dialog.
>
> For the per message, it is clear :) . When doing per-transaction
> accounting, the ACC record is written when the transaction is completed
> with a final response (>=200) on the UAS side (towards caller). For the
> dialog based accounting, the time reference (for ending the call) is the
> reception of BYE request; still the CDR is written on the BYE final reply
> (as OpenSIPS allows you to collect CDR info from the BYE replies too).
>
> Best regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> OpenSIPS Bootcamp 2017, Houston, US
>   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
>
> On 07/20/2017 10:49 PM, Daniel Zanutti wrote:
>
> Hi Alex
>
> I'm having a billing problem from receiving BYE to 200 OK is taking more
> than 500ms. If BYE is accounted when it's received, great!
>
> Are you absolutely sure it works this way?
>
> Thanks
>
> On Thu, Jul 20, 2017 at 4:26 PM, Alex Balashov 
> wrote:
>
>> My understanding is that this is a rather simple module without
>> sophisticated state componentry, and that it logs things immediately as
>> received, in the same iteration of message processing.
>>
>> -- Alex
>>
>> --
>> Principal, Evariste Systems LLC (www.evaristesys.com)
>>
>> Sent from my Google Nexus.
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Accounting of 200 OK and BYE

2017-07-25 Thread Bogdan-Andrei Iancu

Hi Daniel,

There are 3 types of accountings in OpenSIPS - per message, per 
transaction, per dialog.


For the per message, it is clear :) . When doing per-transaction 
accounting, the ACC record is written when the transaction is completed 
with a final response (>=200) on the UAS side (towards caller). For the 
dialog based accounting, the time reference (for ending the call) is the 
reception of BYE request; still the CDR is written on the BYE final 
reply (as OpenSIPS allows you to collect CDR info from the BYE replies too).


Best regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 07/20/2017 10:49 PM, Daniel Zanutti wrote:

Hi Alex

I'm having a billing problem from receiving BYE to 200 OK is taking 
more than 500ms. If BYE is accounted when it's received, great!


Are you absolutely sure it works this way?

Thanks

On Thu, Jul 20, 2017 at 4:26 PM, Alex Balashov 
> wrote:


My understanding is that this is a rather simple module without
sophisticated state componentry, and that it logs things
immediately as received, in the same iteration of message processing.

-- Alex

--
Principal, Evariste Systems LLC (www.evaristesys.com
)

Sent from my Google Nexus.

___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Accounting of 200 OK and BYE

2017-07-20 Thread Alex Balashov
On Thu, Jul 20, 2017 at 04:49:16PM -0300, Daniel Zanutti wrote:

> I'm having a billing problem from receiving BYE to 200 OK is taking more
> than 500ms. If BYE is accounted when it's received, great!

> Are you absolutely sure it works this way?

As far as I have always seen it behave, yeah. 

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Accounting of 200 OK and BYE

2017-07-20 Thread Daniel Zanutti
Hi Alex

I'm having a billing problem from receiving BYE to 200 OK is taking more
than 500ms. If BYE is accounted when it's received, great!

Are you absolutely sure it works this way?

Thanks

On Thu, Jul 20, 2017 at 4:26 PM, Alex Balashov 
wrote:

> My understanding is that this is a rather simple module without
> sophisticated state componentry, and that it logs things immediately as
> received, in the same iteration of message processing.
>
> -- Alex
>
> --
> Principal, Evariste Systems LLC (www.evaristesys.com)
>
> Sent from my Google Nexus.
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Accounting of 200 OK and BYE

2017-07-20 Thread Alex Balashov
My understanding is that this is a rather simple module without sophisticated 
state componentry, and that it logs things immediately as received, in the same 
iteration of message processing. 

-- Alex

--
Principal, Evariste Systems LLC (www.evaristesys.com)

Sent from my Google Nexus.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Accounting of 200 OK and BYE

2017-07-20 Thread Daniel Zanutti
Yes, ACC module.

On Thu, Jul 20, 2017 at 3:45 PM, Alex Balashov 
wrote:

> On Thu, Jul 20, 2017 at 03:40:29PM -0300, Daniel Zanutti wrote:
>
> > In what exactly moment the 200OK and BYE messages are accounted and
> written
> > to the database?
> >
> > At the moment Opensips receive the 200 OK or after receive ACK of 200 OK?
> >
> > Also on BYE, when receive BYE or on 200 OK of BYE?
>
> Are you referring to the ACC module, or some other method of accounting?
> :-)
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Accounting of 200 OK and BYE

2017-07-20 Thread Alex Balashov
On Thu, Jul 20, 2017 at 03:40:29PM -0300, Daniel Zanutti wrote:

> In what exactly moment the 200OK and BYE messages are accounted and written
> to the database?
> 
> At the moment Opensips receive the 200 OK or after receive ACK of 200 OK?
> 
> Also on BYE, when receive BYE or on 200 OK of BYE?

Are you referring to the ACC module, or some other method of accounting?
:-)

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Accounting of 200 OK and BYE

2017-07-20 Thread Daniel Zanutti
In what exactly moment the 200OK and BYE messages are accounted and written
to the database?

At the moment Opensips receive the 200 OK or after receive ACK of 200 OK?

Also on BYE, when receive BYE or on 200 OK of BYE?

Thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users