Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 9:39 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: billing problem not mentioned by anyone before
PostPosted: Sat Nov 17, 2007 11:42 am 
Offline

Joined: Sat Nov 17, 2007 11:27 am
Posts: 3
Hello,

i am using a custom route on trixbox 2.2 ( Freepbx 2.2.1) to make calls via a2billing.

I am relying on caller id authentication

Calls are successful

But i have a problem which is that the duration( as specified in CDR) is ALWAYS either zero or one second

I noticed that as soon as the destination answers the call an INsert statement is being issued by rate engine.

I searched the forum, and upgraded accordingly to asterisk 1.2.24 and i also installed php-pcntl, but i am still experiencing the same problem

Please note that billing is correct when i directly use an a2billing sip friend.
billing is only wrong when i use a trixbox extension

any help is greatly appreciated . Please find the log below

a2billing.php: file:Class.A2Billing.php - line:1743 - [SET LANGUAGE() en]
a2billing.php: file:Class.A2Billing.php - line:635 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='3408130834']
a2billing.php: file:Class.A2Billing.php - line:1970 - [A2Billing] SAY BALANCE : 9.90000
a2billing.php:
a2billing.php: file:Class.A2Billing.php - line:1123 - [CURRENCY : USD]
a2billing.php: file:Class.A2Billing.php - line:1428 - [AUTO SetCallerID]
a2billing.php: file:Class.A2Billing.php - line:1434 - [REQUESTED SetCallerID : 199]
a2billing.php: file:Class.A2Billing.php - line:1445 - [EXEC SetCallerID : 199]
a2billing.php: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:170 - [CREDIT : 9.90000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:657 - 1 && && 10&& 0
a2billing.php: file:Class.A2Billing.php - line:682 - DESTINATION ::> 9613429689
a2billing.php: file:Class.A2Billing.php - line:684 - RULES APPLY ON DESTINATION ::> 9613429689
a2billing.php: file:Class.A2Billing.php - line:722 - OK - RESFINDRATE::> 1
a2billing.php: file:Class.A2Billing.php - line:744 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php: file:Class.A2Billing.php - line:761 - TIMEOUT::> 11880 : minutes=198 - seconds=0
a2billing.php: file:Class.RateEngine.php - line:961 - app_callingcard: Dialing 'SIP/8943/9613429689|60|HRrL(11880000:61000:30000)' with timeout of '11880'.
a2billing.php:
a2billing.php: file:Class.RateEngine.php - line:986 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
a2billing.php: file:Class.RateEngine.php - line:1087 - -> dialstatus : ANSWER, answered time is 0
a2billing.php:
a2billing.php: file:Class.RateEngine.php - line:1091 - [USEDRATECARD=0]
a2billing.php: file:Class.RateEngine.php - line:849 - [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 ('1195304958.37', 'Local/9613429689@a2billing-1622,2', '3408130834', '', CURRENT_TIMESTAMP - INTERVAL 0 SECOND , '0', '9613429689', 'ANSWER', now(), '0.05', '-0', '', '', 'all', '1', '1', '1', '1', '199', '0', '0', '0', '0')]
a2billing.php: file:Class.RateEngine.php - line:852 - [CC_asterisk_stop 1.1: SQL: DONE : result=1]
a2billing.php: file:a2billing.php - line:309 - [a2billing account stop]
a2billing.php: file:Class.A2Billing.php - line:635 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='3408130834']


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 20, 2007 8:47 am 
Offline

Joined: Sat Nov 17, 2007 11:27 am
Posts: 3
any suggesttions please , knowing that i already upgraded to asterisk 1.2.24 and installed php-pcntl

Thanks


Top
 Profile  
 
 Post subject: Re: billing problem not mentioned by anyone before
PostPosted: Tue Nov 20, 2007 9:56 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
macram wrote:
I noticed that as soon as the destination answers the call an INsert statement is being issued by rate engine.
Are you saying the call continues after this point, or the callers are cut off?
macram wrote:
a2billing.php: file:Class.RateEngine.php - line:961 - app_callingcard: Dialing 'SIP/8943/9613429689|60|HRrL(11880000:61000:30000)' with timeout of '11880'.
a2billing.php: file:Class.RateEngine.php - line:1087 - -> dialstatus : ANSWER, answered time is 0
What happens between these two lines of debug is pretty much down to Asterisk alone. A2B asks it to dial a number and bridge it to the currently connected caller. Asterisk later returns control to A2B with the billable duration once the call has cleared down. It looks like your problem may possibly be with your carrier.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 20, 2007 1:27 pm 
Offline

Joined: Sat Nov 17, 2007 11:27 am
Posts: 3
Hello Stavros,

Yes the call is continuing after this point ( The point where the CDR is inserted with duration zero)

Please note that this odd behaviour is only noticed when i call from trixbox via a2billing ( using called id detection), while billing is done correctly if I use an a2billing sip friend directly to call

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 20, 2007 1:38 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
That's most odd. I've no experience with Trixbox so I can't help you any further, but I think you've established the problem is not with A2B.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 27, 2007 8:40 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
You should probably use the asterisk sip/iax trunk definition directly in your A2B instead of the route.

A route can have several paths/trunks, a trunk is linked to one channel when active. A2B is looking for channels that it asks asterisk to dial.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 19, 2007 9:17 am 
Offline

Joined: Fri Dec 07, 2007 9:15 pm
Posts: 3
I also have the same problem.

If you have found a solution for this problem. What is the solution.

I am using the latest Trixbox 2.2.10 with the latest A2B (1.3).

Thank you in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 21, 2007 8:26 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

I thought I had got this to work, but as you say, the duration is recorded in A2Billing as around 0 seconds.

The way this is done would appear to be in this post here: -

http://forum.asterisk2billing.org/viewtopic.php?t=2127

Yours

Joe


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group