Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 2:47 pm
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: A2Billing FastAGI tcp socket issue
PostPosted: Mon Sep 01, 2014 8:48 am 
Offline

Joined: Mon Jun 30, 2014 8:48 am
Posts: 1
Hi All,

I'm trying to expand A2Billing(using version v2.0.14) on 2 separate servers as follows:

server 1 should proccess asterisk(1.8) + web portal
server 2 should proccess the billing script(a2billing.php) and DB(MySQL)

I've managed to make it work regarding call proccessing, although I have the following problem:

The asterisk initiates FastAGI communication and everything works well and the billing works well if the Called side hangs up. However if the Caller hangs up then I have the call filed in the database, but the duration isn't inserted and the call isn't billed. I've managed to find out the following in the asterisk logs:

VERBOSE[3845] res_agi.c: <SIP/3354110529-00376c34>AGI Tx >> 200 result=-1
VERBOSE[3845] res_agi.c: <SIP/3354110529-00376c34>AGI Tx >> HANGUP
VERBOSE[3845] res_agi.c: <SIP/3354110529-00376c34>AGI Rx << GET VARIABLE ANSWEREDTIME
VERBOSE[3845] res_agi.c: <SIP/3354110529-00376c34>AGI Tx >> 200 result=1 (4)
VERBOSE[3845] res_agi.c: <SIP/3354110529-00376c34>AGI Rx << GET VARIABLE DIALSTATUS
VERBOSE[3845] res_agi.c: <SIP/3354110529-00376c34>AGI Tx >> 200 result=1 (ANSWER)
VERBOSE[3845] res_agi.c: <SIP/3354110529-00376c34>AGI Rx << HANGUP
VERBOSE[3845] res_agi.c: <SIP/3354110529-00376c34>AGI Tx >> 511 Command Not Permitted on a dead channel
VERBOSE[3845] res_agi.c: -- <SIP/3354110529-00376c34>AGI Script agi://xxx.xxx.xxx.xxx completed, returning 4
VERBOSE[3845] res_agi.c: <SIP/3354110529-00376c34>AGI Tx >> HANGUP
ERROR[3845] utils.c: write() returned error: Broken pipe

I suppose that the tcp socket is being closed and the script doesn't exit properly, although there are no errors in the php log, that's why there is no update in the DB.

Did someone handled that issue before? Any Ideas?

Thanks in advance :)


Top
 Profile  
 
 Post subject: Re: A2Billing FastAGI tcp socket issue
PostPosted: Mon Apr 23, 2018 5:12 am 
Offline

Joined: Fri Sep 26, 2008 12:39 am
Posts: 11
Hello De Facto

Did you manage to make it work?
Without seeing your post, I tried the same thing using xinetd with this method:
https://stackoverflow.com/questions/294 ... agi-script

Got the same issue.
If A hangs up the call, billing goes ok.
if B hangs up the call, no answered or session time is logged.

What I noticed on the agi log file using level 4 (debug) is this:
[file:Class.RateEngine.php - line:1043 - uniqueid:1524426141.270861]:[CallerID:XXXXXXX]:[CN:1065]:[:[sessiontime:GUP - id_cc_package_offer:-1 - package2apply:]

It does not show the same on asterisk console using level 4 (verbose). Sessiontime shows empty:
:[sessiontime: - id_cc_package_offer:-1 - package2apply:]

I even changed the source code so if $sessiontime = "GUP" then set sessiontime to a static value of 33, and then noticed IF statement returned true because calls are 33 on the logs, but then other parts of the log that reference "sessiontime" get wrong values again.

I modified every get_variable("ANSWEREDTIME") to get_variable("CDR(billsec)") with no luck :(

Anyone has a clue?


Top
 Profile  
 
 Post subject: Re: A2Billing FastAGI tcp socket issue
PostPosted: Mon Jul 09, 2018 3:18 pm 
Offline

Joined: Sat Oct 13, 2007 4:07 am
Posts: 189
Did you try the newest version, though a new version has not come out in 3+ years


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: No registered users and 10 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group