[Home]

Summary:ASTERISK-08504: When using the asterisk manager to originate a call the billsec field in CDR's is set to 0
Reporter:Loic Didelot (voipgate)Labels:
Date Opened:2007-01-06 05:34:19.000-0600Date Closed:2007-01-08 12:59:22.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I do a lot of tests with the asterisk manager to originate calls. It is working great for the technical side. The calls are established etc.. But the CDR's/billing is totaly wrong.

Main problem is that the "billsec" is 0 everytime. Even that the "duration" is correct and the "disposition" is set to "ANSWERED"

Test1:
Action: Originate
Channel: IAX2/ldidelot
Context: CALLBACK-STEP2
Exten: +352091600422
Priority: 1
Account: 4966
Callerid: "Privat" <+352621209047>
Timeout: 10000
Variable: IPADDRESS=192.168.2.77|CALLMEBACK=1
ActionID: 01aff6f73ffbe09c992b03ce613919cb

In this test asterisk writes one single CDR's problem as described above billsec='0'.

Test 2:
Now when using Local channels everything is pretty much more complicated.
Action: Originate
Channel: Local/+352621209047@CALLBACK-STEP1
Context: CALLBACK-STEP2
Exten: +352091600422
Priority: 1
Account: 4966
Callerid: "Privat" <+352621209047>
Timeout: 10000
Variable: IPADDRESS=192.168.2.77|CALLMEBACK=1
ActionID: 9e736de81166721483eb948a62364610
Now its pretty weired. When I answer the first (Local) channel asterisk immediately writes a CDR even though that it should not. This CDR has a dispositioan as "ANSWERED" a duration which indicates the "ring time" but 0 billsec. I think this CDR should be written at the end when the call is hangup with the correct billsec. A second CDR line is generated when leg2 of the call is hangup or rejected. It has a disposition as "ANSWERED", 0 billsec and the duration contains the total duration from the start of the first leg till the hangup.


Maybe I should try the whole thing with .call files. What do you think?

I know this sounds pretty complicated but I am willing to provide access to my box and my scripts to launch the call so that someone can debug.

****** ADDITIONAL INFORMATION ******

I am using cdr with the mysql addon module. But the data is the same when using the cvs module.
Comments:By: Loic Didelot (voipgate) 2007-01-06 05:45:27.000-0600

I just tested with .call files and the results are exactly the same.

By: inspired (inspired) 2007-01-06 12:38:35.000-0600

I can confirm this. It also happens on my 1.2 installation. It has been reported on the mailing list a few times, but nothing has been done to fix it.

By: Loic Didelot (voipgate) 2007-01-07 06:02:25.000-0600

When using Local channles as described above one channel is hangup and as such one  CDR is written immediately. The problem is not only the CDR but also the callerid. When the channel hangs up the callerid name is set empty and the callerid number is set to the last extension. Other variables on that call remain. So my workaround is to set the callerid data to temporary variables before the channel is hangup and set them back to the callerid variables after the channel is hangup.

Again very complicated to describe but I can provide access to my box.

Here is the debug output so you see what is going on inside asterisk.


[Jan  7 12:56:37] DEBUG[4180] channel.c: Planning to masquerade channel SIP/C_tns1-0087b890 into the structure of Local/+352691600422@CALLBACK-STEP1-8096,1
[Jan  7 12:56:37] DEBUG[4180] channel.c: Done planning to masquerade channel SIP/C_tns1-0087b890 into the structure of Local/+352691600422@CALLBACK-STEP1-8096,1
[Jan  7 12:56:37] DEBUG[4186] channel.c: Released clone lock on 'Local/+352691600422@CALLBACK-STEP1-8096,1<ZOMBIE>'

By: Serge Vecher (serge-v) 2007-01-08 12:58:59.000-0600

this issue has already been reported earlier please try the suggestion in 8680 and report the results there.