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.

+ 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
