OK, First of all i would like to thank Areski and all other Active members of this forum for thier continiues help and support.
This week i have installed Trixbox 2.2.4 with A2B 1.3.1 , every think was good except the CDR Report in the Trixbox admin sies every SIP-Friend call i place as an answered call,even if it is not answered.However In A2B Call Report everything is correct, if i answer the call it shows the correct call duration and cost, and if don't answer it says CANCEL in the TC field.
If i place a call from Trixbox Extention Everything is OK,at least in the trixbox CDR report. I first thought it has something to do with the known problem of some asterisk 1.2 versions, so i upgraded 1.2.4 , then 1.4.10 , then 1.4.17 , with the same result.
I then thought it is configuration problem and that asterisk answers the call too early, i changed the answer_call = in a2billing.conf to NO ,with the same result.
The problem is very clear in the log, but i just don't know why it behaves like that.
Jan 22 11:13:55 DEBUG[3746] chan_sip.c: Setting NAT on RTP to 0
Jan 22 11:13:55 DEBUG[3746] chan_sip.c: Outgoing Call for 00xxxxxxx
Jan 22 11:13:55 DEBUG[3746] channel.c: Driver for channel 'SIP/5079623989-0a0ef540' does not support indication 3, emulating it
Jan 22 11:13:55 DEBUG[3101] chan_sip.c: Acked pending invite 102
Jan 22 11:13:55 DEBUG[3101] chan_sip.c: Stopping retransmission on '
[email protected]' of Request 102: Match Found
Jan 22 11:13:55 DEBUG[3101] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on '
[email protected]' Request 103: Found
Jan 22 11:13:56 DEBUG[3101] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on '
[email protected]' Request 103: Found
Jan 22 11:13:57 DEBUG[3101] chan_sip.c: Auto destroying call 'Yjg0MWJiMjZhOGU1M2RhODQ5ODIxOThkMmU5ZTk4Zjg.'
Jan 22 11:14:00 DEBUG[3485] manager.c: Manager received command 'Command'
Jan 22 11:14:00 DEBUG[3485] manager.c: Manager received command 'Command'
Jan 22 11:14:00 DEBUG[3485] manager.c: Manager received command 'Command'
Jan 22 11:14:09 DEBUG[3746] chan_sip.c: update_call_counter(00xxxxxx) - decrement call limit counter
Jan 22 11:14:09 DEBUG[3746] chan_sip.c: Acked pending invite 103
Jan 22 11:14:09 DEBUG[3746] chan_sip.c: Stopping retransmission on '
[email protected]' of Request 103: Match Found
Jan 22 11:14:09 DEBUG[3746] app_dial.c: Exiting with DIALSTATUS=CANCEL.
Jan 22 11:14:09 VERBOSE[3746] logger.c: a2billing.php|1: file:Class.RateEngine.php - line:1157 - [USEDRATECARD=0]
Jan 22 11:14:09 VERBOSE[3746] logger.c: a2billing.php|1: file:Class.RateEngine.php - line:914 - [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 ('1200996833.0', 'SIP/5079623989-0a0ef540', '5079623989', '', CURRENT_TIMESTAMP - INTERVAL 0 SECOND , '0', '00xxxxxxxx',
'CANCEL', now(), '0.025', '-0', '', '', 'NL', '1', '1', '1', '2', '151843420800390', '0', '0.009', '0', '0')]
Jan 22 11:14:09 VERBOSE[3746] logger.c: a2billing.php|1: file:Class.RateEngine.php - line:917 - [CC_asterisk_stop 1.1: SQL: DONE : result=1]
Jan 22 11:14:09 VERBOSE[3746] logger.c: a2billing.php|1: file:a2billing.php - line:310 - [a2billing account stop]
Jan 22 11:14:09 VERBOSE[3746] logger.c: a2billing.php|1: file:Class.A2Billing.php - line:650 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='5079623989']
Jan 22 11:14:09 DEBUG[3101] chan_sip.c: Stopping retransmission on '
[email protected]' of Request 103: Match Found
Jan 22 11:14:09 DEBUG[3101] chan_sip.c: Stopping retransmission on '
[email protected]' of Request 103: Match Not Found
Jan 22 11:14:09 DEBUG[3746] pbx.c: Extension 00xxxxxxx,
priority 3 returned normally even though call was hung up
Jan 22 11:14:09 DEBUG[3746] chan_sip.c:
update_call_counter(5079623989) - decrement call limit counter
Jan 22 11:14:09 DEBUG[3746] cdr_addon_mysql.c: cdr_mysql: inserting a CDR record.
Jan 22 11:14:09 DEBUG[3746] cdr_addon_mysql.c: cdr_mysql: SQL command as follows: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode) VALUES ('2008-01-22 11:13:53','151843420800390','151843420800390','00xxxxxxx','a2billing', 'SIP/5079623989-0a0ef540','SIP/mytrunk-0a10eeb8','Dial','SIP/mytrunk/00xxxxxxxxx|60|HRgrL(1199960000:61000:30000)',16,16,'
ANSWERED',2,'5079623989')
Jan 22 11:14:11 DEBUG[3101] chan_sip.c: Stopping retransmission on '
[email protected]' of Request 102: Match Found
Jan 22 11:14:15 DEBUG[3101] chan_sip.c: Stopping retransmission on '
[email protected]' of Request 102: Match Found
the first time everything is good, it says exiting with dialstatus cancel, and it inserts the cancel status in the a2b call report, but it comes back and update again as an answered call and it insert that in the CDR Report of Trixbox.
and It only happens when i call from SIP Friend.
I still don't know if this is a bug or a mis configuration from me, but i wait what the experts say.
Thankz in advance!