asterisk2billing.org
http://forum.asterisk2billing.org/

INCORRECT TIME BILLING
http://forum.asterisk2billing.org/viewtopic.php?f=16&t=5076
Page 1 of 1

Author:  aldanet [ Wed Apr 01, 2009 3:18 am ]
Post subject:  INCORRECT TIME BILLING

I detected that ANSWEREDTIME reports the time from when user dials in to the time when he hangs up, but not the from the time when the remote answers. i.e. it shoud be the second channel ANSWEREDTIME.

Can this be configured?

Best Regards

Dario Alvarez

Author:  stavros [ Wed Apr 01, 2009 3:33 am ]
Post subject:  Re: INCORRECT TIME BILLING

aldanet wrote:
I detected that ANSWEREDTIME reports the time from when user dials in to the time when he hangs up, but not the from the time when the remote answers. i.e. it shoud be the second channel ANSWEREDTIME.
I'm going to presume you're referring to 'standard' mode calling (as opposed to callback or DIDs, which may possibly behave differently).
A2B uses the ANSWEREDTIME of the outbound leg of the call. If you're seeing ANSWEREDTIME > 0 for calls that are un-answered, you need to speak with your carrier about their poor answer supervision (they'll also be charging you for these calls).

Of course it's possible that you're using a version of Asterisk in which the behaviour has changed from what we are accustomed to.

PS All good bug-reports mention exact version numbers (in our case, of at least A2B and Asterisk).

Author:  aldanet [ Fri Apr 03, 2009 2:38 am ]
Post subject:  INCORRECT TIME BILLING

I'm sorry.

A2Billing V.1.3.1 YellowJacket
Asterisk 1.4.24

Unanswered calls are not billed.

This is an example
-----------------------------------------------------------------------
[Apr 2 07:33:58] VERBOSE[4634] logger.c: -- Executing [7424988@a2billingTelmex:1] Answer("SIP/10.8.2.145-081a7690", "") in new stack
[Apr 2 07:33:58] VERBOSE[4634] logger.c: -- Executing [7424988@a2billingTelmex:2] DeadAGI("SIP/10.8.2.145-081a7690", "a2billing.php|1|standard") in new stack
[Apr 2 07:33:58] VERBOSE[4634] logger.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
.
.
.
[Apr 2 07:34:32] DEBUG[4634] chan_dahdi.c: Dialing '3002206941'
[Apr 2 07:34:32] DEBUG[4634] chan_dahdi.c: Deferring dialing...
[Apr 2 07:34:32] VERBOSE[4634] logger.c: -- Called g11/3002206941
[Apr 2 07:34:32] DEBUG[4634] chan_dahdi.c: Sent deferred digit string: T3002206941w
[Apr 2 07:34:55] DEBUG[4634] chan_dahdi.c: Answering on polarity switch!
[Apr 2 07:34:55] DEBUG[4634] chan_dahdi.c: Polarity Reversal event occured - DEBUG 1: channel 8, state 6, pol= 1, aonp= 1, honp= 1, pdelay= 600, tv= 0
[Apr 2 07:34:55] DEBUG[4634] chan_dahdi.c: Polarity Reversal detected but NOT hanging up (too close to answer event) on channel 8, state 6
[Apr 2 07:34:55] DEBUG[4634] chan_dahdi.c: Polarity Reversal event occured - DEBUG 2: channel 8, state 6, pol= 1, aonp= 1, honp= 1, pdelay= 600, tv= 0
[Apr 2 07:34:55] VERBOSE[4634] logger.c: -- Zap/8-1 answered SIP/10.8.2.145-081a7690
[Apr 2 07:35:00] VERBOSE[4634] logger.c: -- Hungup 'Zap/8-1'

Real Call duration was 5 seconds. It billed 62!!


[Apr 2 07:35:00] VERBOSE[4634] logger.c: a2billing.php|1|standard: file:Class.RateEngine.php - line:1062 - [K=0]:[ANSWEREDTIME=62-DIALSTATUS=ANSWER]
[Apr 2 07:35:00] VERBOSE[4634] logger.c: a2billing.php|1|standard: file:Class.RateEngine.php - line:1147 - -> dialstatus : ANSWER, answered time is 62
[Apr 2 07:35:00] VERBOSE[4634] logger.c: a2billing.php|1|standard:
[Apr 2 07:35:00] VERBOSE[4634] logger.c: a2billing.php|1|standard: file:Class.RateEngine.php - line:1151 - [USEDRATECARD=0]
[Apr 2 07:35:00] VERBOSE[4634] logger.c: a2billing.php|1|standard: file:Class.RateEngine.php - line:821 - ft2c_package_offer : 0 ; ; 0
[Apr 2 07:35:00] VERBOSE[4634] logger.c: a2billing.php|1|standard: file:Class.RateEngine.php - line:900 - [CC_asterisk_stop QUERY = INSERT INTO cc_call

(uniqueid,sessionid,username,nasipaddress,starttime,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub,

destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('1238675638.58',

'SIP/10.8.2.145-081a7690', '7056450798', '', CURRENT_TIMESTAMP - interval '62 seconds' , '62', '3002206941', 'ANSWER', now(), '190', '+380', '', '',

'tigo', '4', '1', '1', '19', '16015259', '0', '49', '98', '0')]

Best Regards

J. Dario Alvarez

Author:  aldanet [ Fri Apr 03, 2009 1:45 pm ]
Post subject:  INCORRECT TIME BILLING

I came back to Asterisk 1.4.20 and now A2billing is billing correctly!!

WATCH OUT!!!

Best Regards

J. DARIO ALVAREZ

Author:  stavros [ Fri Apr 03, 2009 5:05 pm ]
Post subject:  Re: INCORRECT TIME BILLING

aldanet wrote:
I came back to Asterisk 1.4.20 and now A2billing is billing correctly!!
Interesting... Thanks for warning us. I'm pretty sure this doesn't happen on Asterisk v1.4.23.1 though. I'll see if I can reproduce this on v1.4.24.1 later today.

Author:  engrjawad [ Sat Apr 04, 2009 6:48 am ]
Post subject:  Call Duration

Dear stavros

i am visiting this forum from many days and i registered myself on this forum today, and i am very impressed from you,

i ve recently installed A2Billing with my Asterisk 1.4 version , and i configured it, i m facing one strange problem, when i call to some one suppose of 10 second , A2billing counts this call to 6 Second duration ,
Similarly when i call somone of 1 minute A2billing counts it of 44 second ,

the percentage of difference of call duration is same almost, According to your discussion in forum that this problem might be due to possible two reasons , 1rst is check that php-pcntl package is installed and second use of DeadAGI instead of AGI

i was already using DeadAGI , but in my server there was no php-pcntl package, then i installed php-pcntl package, and restart my server.

but my problem didnt solved, can you suggest me something more ,

i am using Redhat Enterprise 5.

Thanks in Advance

Author:  jervin [ Thu Nov 25, 2010 6:54 am ]
Post subject:  Re: INCORRECT TIME BILLING

Hello,

I have a2billing server for 2 years everything was OK.
Now I set up another a2billing for my reseller and registered trunk in the previous a2billing like a SIP user.
The new server start to bill the call when its start to ring. If I register it to another provider its billing correctly.
I think its from poor answer supervision on first server.

The first server bill everything OK.

How can I fix this?

Ervin

Author:  jroper [ Thu Nov 25, 2010 2:41 pm ]
Post subject:  Re: INCORRECT TIME BILLING

Hi

It looks like your new carrier is answering the call, and they should not be, create a trouble ticket with the carrier, or change carriers.

Joe

Author:  jervin [ Fri Nov 26, 2010 1:11 pm ]
Post subject:  Re: INCORRECT TIME BILLING

Hello Joe,

There is no new carrier,
I have a2billing call it number 1 that is connected to a carrier and everything is OK.billing correctly.
Now I set up a2billing number 2 what is connected to a2billing No.1 with a sip trunk like a2billing sip user.
Now the a2billing number2 give an icorrect billing.
Its start to bill when its start to ring.
I nead to change something on a2billin no1 to give a proper call time.
Just what is that:? I try to change
[a2billing]
exten => _X.,1,Answer
exten => _X.,2,Wait(2)
exten => _X.,3,AGI(a2billing.php)
exten => _X.,4,Wait(2)
exten => _X.,5,Hangup

But I dont know what to put there ?

Author:  priya99 [ Sun Aug 12, 2012 11:16 am ]
Post subject:  Re: INCORRECT TIME BILLING

Quote:
I detected that ANSWEREDTIME reports the time from when user dials in to the time when he hangs up, but not the from the time when the remote answers. i.e. it shoud be the second channel ANSWEREDTIME. I also noticed it is in German language, so I may need translation services from someone to translate it. Where can I get such service.

and more importantly, can this be configured?
Quote:


Thanks for the tread.i also get this fault.Have any one way to get rid from it :?:

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/