[ASTPPCOM-182] Billing on error disposition Created: 04/Feb/17  Updated: 01/Apr/21  Resolved: 01/Apr/21

Status: Done
Project: ASTPP Community
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature
Reporter: fozzygo4 Assignee: Samir Doshi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have seen that if there is an error type disposition that there is no billing to the customer or provider. Some errors should still be billed. The reason I say this is based o the following example:

NORMAL_CLEARING = billable
Origination_cancel = non-bill
User_busy = non-bill

This is correct I feel but I got the following disposition on some of the calls: RECOVERY_ON_TIMER_EXPIRE and the customer duration was set to 0 and debit / cost 0 but the provider billed me for the call. The duration was 72 seconds. I think what happened was there was a network error and loss of packets. The call dropped but ASTPP did not bill for the duration the call was active for.

How can I choose what disposition must get billed for when there is a active duration or is this a bug to be fixed in ASTPP?



 Comments   
Comment by Samir Doshi [ 06/Feb/17 ]

That will require code modification as we have condition as below in cdr
processing file,

if ( ($dataVariable['hangup_cause'] != 'NORMAL_CLEARING') &&
($dataVariable['hangup_cause'] != 'ALLOTTED_TIMEOUT')) {
$dataVariable['billsec'] = 0;
}

Comment that condition and check if that works for you.

Best Regards

Samir Doshi
iNextrix Technologies Pvt. Ltd.
http://www.inextrix.com

Disclaimer:
The information contained in this communication is confidential and may be
legally privileged. It is intended solely for the use of the individual or
entity to whom it is addressed and others authorised to receive it. If you
are not the intended recipient you are hereby notified that any disclosure,
copying, distribution or taking action in reliance of the contents of this
information is strictly prohibited and may be unlawful.

On Sat, Feb 4, 2017 at 8:52 PM, Stephen Forster <notifications@github.com>
wrote:

> I have seen that if there is an error type disposition that there is no
> billing to the customer or provider. Some errors should still be billed.
> The reason I say this is based o the following example:
>
> NORMAL_CLEARING = billable
> Origination_cancel = non-bill
> User_busy = non-bill
>
> This is correct I feel but I got the following disposition on some of the
> calls: RECOVERY_ON_TIMER_EXPIRE and the customer duration was set to 0 and
> debit / cost 0 but the provider billed me for the call. The duration was 72
> seconds. I think what happened was there was a network error and loss of
> packets. The call dropped but ASTPP did not bill for the duration the call
> was active for.
>
> How can I choose what disposition must get billed for when there is a
> active duration or is this a bug to be fixed in ASTPP?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/iNextrix/ASTPP/issues/182>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AA6gcVJSCiU7VpPpbHRLjMunC6wuMSpGks5rZJfLgaJpZM4L3LWU>
> .
>

Comment by fozzygo4 [ 06/Feb/17 ]

Thanks Samir,

I did find that code in the FS scripts and commented it out. I also had to change the following code from
if ($duration > 0 && ($dataVariable['hangup_cause'] == 'NORMAL_CLEARING' || $dataVariable['hangup_cause'] == 'ALLOTTED_TIMEOUT')) {
to
if ($duration > 0){

This I feel is correct because if there is actual billable seconds in a call then it should be charged for regardless of the disposition. It is up to us as our customers provider to look into networking issues that we could be at fault for and credit this customer should the fault be ours. The way it currently is will be beneficial to to customer every time but we will still pay for the calls to our providers.

On a security note on this I feel it could be exploited if someone knows what to do. For example if a customer A calls to a number for 1 hour. He / she knows of this flaw and simple disconnects there internet / network cable from their phone. ASTPP does not receive a BYE signal from the phone so eventually times out. ASTPP will not give a NORMAL_CLEARING disposition so it will change the duration to 0 and the call for customer A is now free.

I tested this theory with the code in place and its true. If I modify the code then the call still gets charged to the customer.

Hope this helps.

Comment by Samir Doshi [ 07/Feb/17 ]

Hi Stephen,

That is right. If that is the case then we can remove that condition and
only focus on the duration of the calls for billing. No matters what
disposition we have got from freeswitch.

We will check it out further.

Best Regards

Samir Doshi
iNextrix Technologies Pvt. Ltd.
http://www.inextrix.com

Disclaimer:
The information contained in this communication is confidential and may be
legally privileged. It is intended solely for the use of the individual or
entity to whom it is addressed and others authorised to receive it. If you
are not the intended recipient you are hereby notified that any disclosure,
copying, distribution or taking action in reliance of the contents of this
information is strictly prohibited and may be unlawful.

On Mon, Feb 6, 2017 at 4:39 PM, Stephen Forster <notifications@github.com>
wrote:

> Thanks Samir,
>
> I did find that code in the FS scripts and commented it out. I also had to
> change the following code from
> if ($duration > 0 && ($dataVariable['hangup_cause'] == 'NORMAL_CLEARING'
> || $dataVariable['hangup_cause'] == 'ALLOTTED_TIMEOUT')) {
> to
> if ($duration > 0){
>
> This I feel is correct because if there is actual billable seconds in a
> call then it should be charged for regardless of the disposition. It is up
> to us as our customers provider to look into networking issues that we
> could be at fault for and credit this customer should the fault be ours.
> The way it currently is will be beneficial to to customer every time but we
> will still pay for the calls to our providers.
>
> On a security note on this I feel it could be exploited if someone knows
> what to do. For example if a customer A calls to a number for 1 hour. He /
> she knows of this flaw and simple disconnects there internet / network
> cable from their phone. ASTPP does not receive a BYE signal from the phone
> so eventually times out. ASTPP will not give a NORMAL_CLEARING disposition
> so it will change the duration to 0 and the call for customer A is now free.
>
> I tested this theory with the code in place and its true. If I modify the
> code then the call still gets charged to the customer.
>
> Hope this helps.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/iNextrix/ASTPP/issues/182#issuecomment-277651759>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AA6gcWh4188wmVI50qhX5vEF3-IY09Qsks5rZv9ngaJpZM4L3LWU>
> .
>

Comment by Samir Doshi [ 28/Feb/17 ]

@FozzyGo4 , Issue has been resolved. Please confirm.

Generated at Sat Feb 10 07:14:53 CET 2024 using Jira 8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a.