Asterisk 1.4 CDR

Hi guys,

I need to use Asterisk CDR to make the calls billing. I’m doing some tests and I’m not understanding what Asterisk creates in CDR tables. I’m using attended transfer.
My DialPlan:

[from-internal] exten => _2XX,1,NoOp(FROM-INTERNAL) exten => _2XX,n,Dial(SIP/${EXTEN},45,Tt) exten => _2XX,n,Hangup()

My transfer DialPlan defined by __TRANSFER_CONTEXT:

[transfer-custom] exten => _2XX,1,NoOp(TRANSFER-CUSTOM) exten => _2XX,n,Dial(SIP/${EXTEN},45,Tt) exten => _2XX,n,Hangup()

  1. I call from extension 200 to 201, talk for about 30 secs.
  2. 201 transfer the call to 202 and talk one each other for about 15 secs.
  3. 202 accepts the transfer and talk to 200 extension for about 60 secs.

The MySQL table is like this:

mysql> select * from cdr order by calldate; +---------------------+-------------+-----+-----+-----------------+-------------------------------------+----------------------------------+---------+-----------------------------+----------+---------+-------------+----------+-------------+----------+-----------+ | calldate | clid | src | dst | dcontext | channel | dstchannel | lastapp | lastdata | duration | billsec | disposition | amaflags | accountcode | uniqueid | userfield | +---------------------+-------------+-----+-----+-----------------+-------------------------------------+----------------------------------+---------+-----------------------------+----------+---------+-------------+----------+-------------+----------+-----------+ | 2008-01-04 10:16:32 | | | 201 | from-internal | Transfered/SIP/200-08f66e88<ZOMBIE> | Local/202@transfer-custom-9e68,1 | Dial | Local/202@transfer-custom/n | 39 | 37 | ANSWERED | 3 | | | | | 2008-01-04 10:17:08 | 201 | 201 | 202 | transfer-custom | Local/202@transfer-custom-9e68,2 | SIP/202-08f691b0 | Dial | SIP/202|45|Tt | 80 | 77 | ANSWERED | 3 | | | | | 2008-01-04 10:17:23 | "200" <200> | 200 | 201 | from-internal | SIP/200-08f66e88 | Local/202@transfer-custom-9e68,1 | Dial | SIP/201|45|Tt | 65 | 0 | ANSWERED | 3 | | | | +---------------------+-------------+-----+-----+-----------------+-------------------------------------+----------------------------------+---------+-----------------------------+----------+---------+-------------+----------+-------------+----------+-----------+ 3 rows in set (0.00 sec)

For while it’s only internal calls and I’m not understanding what asterisk is registering in the table. How can I link the call tranfers that were originated by the same call?

I will connect in this server an E1 link and do more tests, but I need to understand the basic tests first. If someone can explain me how to read this table, or change my DialPlan or configurations of CDR to make it easier to be read, I would be very grateful =)

Thanks for your attention =)