Summary:ASTERISK-06929: chan_local makes cdr 'duration' and 'billsec' useless
Reporter:Juan Pablo Abuyeres (jpabuyer)Labels:
Date Opened:2006-05-08 17:20:20Date Closed:2011-06-07 14:08:25
Versions:Frequency of
Description:Performing a Dial(Local/xxxx@context), when the call is just answered a cdr record is created. Duration being the time since the phone started ringing until the person answered, and billsec being 0.

The expected behaivor is: when the call is terminated, a cdr record should be created showing correctly the duration and the billsec.

In other words, the cdr record is being logged when the call is answered, and one expects it to be created when the call is terminated.

ps: I would have liked to report this as 'major' because I'm having serious problems with this.. to me it's a condition of "application unusable".
Comments:By: Juan Pablo Abuyeres (jpabuyer) 2006-05-08 17:21:59

oops.. sorry, it was supposed to be reported for "chan_local", not "chan agents".

By: Serge Vecher (serge-v) 2006-05-08 17:28:30

please illustrate the problem with a sample call and relevant cdr log snippet. Thanks.

By: Juan Pablo Abuyeres (jpabuyer) 2006-05-08 18:49:29

you mean the dialplan?

I have this in extensions.conf:
exten => 111,1,Dial(Local/1001@test)
exten => _XXXX,1,Dial(SIP/${EXTEN})

I have 2 SIP phones: 1001 and 1002.
1002 dials 111 and 1001 begins ringing. As soon as 1001 answers, this entry is logged:
"phone2","1002","1001","test","""phone2"" <1002>","Local/1001@test-5557,2","SIP/1001-2fa7","Dial","SIP/1001","2006-05-08 17:55:38","2006-05-08 17:55:39","2006-05-08 17:55:39",1,0,"ANSWERED","DOCUMENTATION"
Then when 1001 or 1002 hung up, this second entry is logged:
"phone2","1002","111","test","""phone2"" <1002>","SIP/1002-7ea1","Local/1001@test-5557,1","Dial","Local/1001@test","2006-05-08 17:55:38","2006-05-08 17:55:39","2006-05-08 17:55:42",4,3,"ANSWERED","DOCUMENTATION"

If this is not what you need, please tell me exactly what it is and I'll provide it at once. Thank you.

By: Juan Pablo Abuyeres (jpabuyer) 2006-05-09 10:45:41

Looks like local channels are destroyed once the call is answered, SIP channels get bridged, local channels are gone, and the cdr entry gets logged, so that's where it's wrong as I see it.. or am I wrong and what I need should be done by other means?

By: Serge Vecher (serge-v) 2006-05-09 10:55:51

yes, you are correct. This is the intended design behind chan_local.

By: Andrey S Pankov (casper) 2006-05-09 13:52:20

Dial(Local/1001@test) -> Dial(Local/1001@test\n)

By: Serge Vecher (serge-v) 2006-05-09 14:04:10

thanks for the pointer, casper:

the slash for n is 'the forward', i.e. Dial(Local/1001@test/n)

I'm closing this issue, well, because it is not. :) Thanks.