OK. I guess i have found a solution, which works for me.
Now the callback first leg has the callerid of my system. The callerid of the Callback second leg is the number of the customer.
And using the callthrough method: Callerid is the one from the customer too.
I think this way it makes more sense as even dome customers without technical problems were confused seeing there own number in the display...
My Adjustments:
1. I created a new line in /etc/asterisk/a2billing.conf in the context [callback] (in my file behind line 51). I choosed the line behind callerid = callback (line 89). The new line is:
callerid_callback = +4930123456789 ( callerid of my system for the first leg)
2. I also did a small adjustment to a2billing.php Around line 507 ( $callerid=$A2B->CallerID; ) i added another line:
$callerid_callback= $A2B -> config["callback"]['callerid_callback'];
and in line 528 i changed the QUERY for MySQL (I guess Postgre Users have to change the same in the next QUERY in line 531):
I changed the variable '$callerid' to '$callerid_callback'.
In detail:
The old QUERY: $QUERY = " INSERT INTO cc_callback_spool (uniqueid, status, server_ip, num_attempt, channel, exten, context, priority, variable, id_server_group, callback_time, account, callerid, timeout ) VALUES ('$uniqueid', '$status', '$server_ip', '$num_attempt', '$channel', '$exten', '$context', '$priority', '$variable', '$id_server_group', ADDDATE( CURRENT_TIMESTAMP, INTERVAL $sec_wait_before_callback SECOND ), '$account', '$callerid', '$timeout')";
The new QUERY: $QUERY = " INSERT INTO cc_callback_spool (uniqueid, status, server_ip, num_attempt, channel, exten, context, priority, variable, id_server_group, callback_time, account, callerid, timeout ) VALUES ('$uniqueid', '$status', '$server_ip', '$num_attempt', '$channel', '$exten', '$context', '$priority', '$variable', '$id_server_group', ADDDATE( CURRENT_TIMESTAMP, INTERVAL $sec_wait_before_callback SECOND ), '$account', '$callerid_callback', '$timeout')";
Finally a few hints:
In a2billing.conf i set the following paramter:
In section [callback]: callerid = callback // (default)
In [agi-confX] (the one for the callback service): auto_setcallerid = YES force_callerid = // (not set) cid_sanitize = NO
I hope that i understood it right and made no big mistake. My first tests worked fine and calls are billed correctly (for first and second leg)
Would be nice if anyone could check it out und let me know if there is are problem with my adjustment...
|