Trying to get some help on this topic again.
I have enabled all the possible debugging, and still there are no hints on why would a2billing lose some calls.
Here are examples of two calls with agi debug (a2billing debug is almost same up to the last point, so I omitted it)
This one is logged. Note that after getting result=-1 a2billing starts asking for answeredtime, answer status and so on:
Code:
[Jun 7 18:58:00] VERBOSE[10335] logger.c: AGI Rx << EXEC DIAL SIP/cat/00359XXXXXXX|60|iLTt(5400000:61000:30000)
[Jun 7 18:58:00] VERBOSE[10335] logger.c: -- AGI Script Executing Application: (DIAL) Options: (SIP/cat/00359XXXXXXX|60|iLTt(5400000:61000:30000))
[Jun 7 18:58:00] VERBOSE[10335] logger.c: -- Called cat/00359XXXXXXX
[Jun 7 18:58:01] VERBOSE[10335] logger.c: -- SIP/cat-00003c22 is making progress passing it to SIP/cat-00003c21
[Jun 7 18:58:13] VERBOSE[10335] logger.c: -- SIP/cat-00003c22 answered SIP/cat-00003c21
[Jun 7 18:58:28] VERBOSE[10335] logger.c: AGI Tx >> 200 result=-1
[Jun 7 18:58:28] VERBOSE[10335] logger.c: AGI Rx << GET VARIABLE ANSWEREDTIME
[Jun 7 18:58:28] VERBOSE[10335] logger.c: AGI Tx >> 200 result=1 (15)
[Jun 7 18:58:28] VERBOSE[10335] logger.c: AGI Rx << GET VARIABLE DIALSTATUS
[Jun 7 18:58:28] VERBOSE[10335] logger.c: AGI Tx >> 200 result=1 (ANSWER)
[Jun 7 18:58:28] VERBOSE[10335] logger.c: a2billing.php|3: file:Class.RateEngine.php - line:1491 - uniqueid:1402156680.15421 - -> dialstatus : ANSWER, answered time
is 15
[Jun 7 18:58:28] VERBOSE[10335] logger.c: AGI Rx << HANGUP
[Jun 7 18:58:28] VERBOSE[10335] logger.c: AGI Tx >> 200 result=1
[Jun 7 18:58:28] VERBOSE[10335] logger.c: == Spawn extension (disa, 00359XXXXXXX, 1) exited non-zero on 'SIP/cat-00003c21'
This one does not get billed. Note that after getting result=-1 a2billing just does nothing, so asterisk ends the call
Code:
[Jun 7 18:49:36] VERBOSE[6076] logger.c: AGI Rx << EXEC DIAL SIP/cat/00359XXXXXXX|60|iLTt(5400000:61000:30000)
[Jun 7 18:49:36] VERBOSE[6076] logger.c: -- AGI Script Executing Application: (DIAL) Options: (SIP/cat/00359XXXXXXX|60|iLTt(5400000:61000:30000))
[Jun 7 18:49:36] VERBOSE[6076] logger.c: -- Called cat/00359XXXXXXX
[Jun 7 18:49:36] VERBOSE[6076] logger.c: -- SIP/cat-00003c20 is making progress passing it to SIP/cat-00003c1f
[Jun 7 18:49:48] VERBOSE[6076] logger.c: -- SIP/cat-00003c20 answered SIP/cat-00003c1f
[Jun 7 18:49:59] VERBOSE[6076] logger.c: AGI Tx >> 200 result=-1
[Jun 7 18:49:59] VERBOSE[6076] logger.c: == Spawn extension (disa, 00359XXXXXXX, 1) exited non-zero on 'SIP/cat-00003c1f'
I've read similar topics here. I don't have problems with database, I don't have problems with open files, my load is maximum 8-10 calls, so I see absolutely no reasons why would a2billing just ignore input from agi and lose the call.
Please help me if it is possible. I don't want to write additional script to sync the asterisk cdr and a2billing call records, I want to get it working as it is intended.