[Asterisk-Users] RE: CDR and transfer

Tor Setane tor.setane at ella.no
Wed Sep 29 01:16:26 MST 2004


 > Hello,

 > I was looking into cdr (w/ mysql) before enabling dialout
 > through CAPI, found out that transfered call are not reported
 > as such.
 > For instance, let's say we have 2 local SIP extensions A and B
 > and C is a GSM number.
 > If A calls B and B transfers to C (automatic or after picking up)
 > the CDR shows A calling C. IMHO, It should record A called B then
 > B transfered to C, so that the cost of the outgoing call is "blamed"
 > on B not A.
 > Does anyone know how to deal with it?
 > It's might be a bigger problem if A is and incoming call from PSTN
 > as no-one is "billable".

 > Thanks.

 > Andre

Hi Andre,

I'm not sure if this will help you with cdr in mysql, but I use this in my dialplan
to get correct billing for forwarded calls. Our billing system is currently outside
the Isdn Pri.

exten => _X.,1,GotoIf($["${RDNIS}" = ""]?5)
exten => _X.,2,SetCallerid(${RDNIS})
exten => _X.,3,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _X.,4,Congestion
exten => _X.,5,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _X.,6,Congestion

So if Redirecting number exist, set clid to that number.

This way, in our case, "B" will pick up the bill for the call if he is forwarded to "C".
Not sure what happens if "B" transfers the call to "C".

This did not work for me on asterisk 0.9.1, I had to use cvs version.

Regards,
Tor.



More information about the asterisk-users mailing list