According to http://www.voip-info.org/wiki/view/Asterisk+cmd+ResetCDR you
want to do ResetCDR(w) before your second leg.

- Ian

On 2/27/07, John Oladehinde <[EMAIL PROTECTED]> wrote:

Hello,

I need to know why this is not working as I suspect it should.  What I
have is the system Answer() an incoming call.  (The CDR starts recording
call 1).  The caller is given an option to Dial to customer service (CDR
of call 2 is not recorded).  After the bridge is done and both parties
have hung up, I suspect that there should be two entries in the CDR.
Originating number and the second leg of this call.  This is what I have
in my dial plan.  Everything works as the call routing and bridging.  It
is just the CDR that I am baffled with.

ORIGINATING LEG: CDR records properly with accountcode = 100 if the call
is hung up at this point
exten=>4165487558,1,Set(CDR(accountcode)=100)
exten=>4165487558,n,VXML(http://192.168.2.30/tele/mainmenu.php)
exten=>4165487558,n,GotoIf($["${VXML_RESULT}" = "Transfer"]?trans:no)
exten=>4165487558,n(trans),Goto(SECOND_LEG,s,1)
exten=>4165487558,n(no),Hangup()


SECOND_LEG CDR does record accountcode = 101 after the call but gives an
aggregate total of the call with no mention of the originating
accountcode 100.
exten => s,1,Wait,1
exten => s,n,Set(SCREEN_FILE=/tmp/${CALLERID(number)}-${EPOCH})
exten => s,n,Record(${SCREEN_FILE}.gsm|6|25)
exten => s,n,Set(CDR(accountcode)=101)
exten => s,n,Dial(SIP/${FINDME1}${SIPCO1},60,mgM(screen^${SCREEN_FILE}))

My goal is to have CDR say something like accountcode 100  2:00 mins
and accountcode 101 30s. After the call is hung up.  But in writing this
I think I understand what is happening.  Because if I do it my way it
would seem that the call is 2:30s when actually it was a total of 2:00
mins, with a  0:30s interim of 2 channels being used.

Addendum: Can and should I create another table to hold the second leg?
The second leg is important because it will always be a long distance
call and the time is important.

Regards,
John


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to