I want to implement call back feature using asterisk pbx. What I need is - to call one external number (XXXXXXXX) - and on ANSWER call another external number (YYYYYYYY), bridge them and rate both calls by using billsec column from CDR table.
I tried to use originate command using file with the following content:
Action: Originate
Channel: Local/XXXXXXXX@callback
Timeout: 3000
Callerid: XXXXXXXXXX
Application: Macro
Data: CallBack,YYYYYYYY,Context
Using this file - everything is working properly, i’m receiving first call - then after Answer - i’m receiving the second call as well. The only issue is with the CDR. In CDR table i have 2 records for both calls - but only one have billsec value, the second record have always billsec equal to 0.
I guess this is because Asterisk are bridging both calls and use only one billsec record.
How can i solve this? or are there any method to achieve this? Thank You.
Using: Asterisk 1.8