Hello, I want to ask how to get call duration. -- Necati DEM?R http://demir.web.tr http://friendfeed.com/ndemir ndemir ~ demir.web.tr --------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100603/d4085dc6/attachment.htm
On 3 Jun 2010, at 14:24, Necati Demir wrote:> I want to ask how to get call duration.Go on then.... When you do ask the question you might want to include a few details. Are you trying to get call duration during a call? If so then the cli will help 'core show channels'. If it's after the call has happened then billsec in the CDR will help. S
First thing which comes to mind is: exten => h,1,Noop( >>> Call duration was ${CDR(duration)} seconds) exten => h,n,Hangup() There is also a variable ${CDR(billsec)} which shows only the duration the call was actually connected between two channels, however this may not match with the duration of your provider. Zeeshan A Zakaria -- Sent from my Android phone with K-9 Mail. On 2010-06-03 9:35 AM, "Necati Demir" <ndemir at demir.web.tr> wrote: Hello, I want to ask how to get call duration. -- Necati DEM?R http://demir.web.tr http://friendfeed.com/ndemir ndemir ~ demir.web.tr --------------------------------------- -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100603/d1049df5/attachment.htm
Un-top-posting...> On 2010-06-03 9:35 AM, "Necati Demir" <ndemir at demir.web.tr> wrote:> I want to ask how to get call duration.On Thu, 3 Jun 2010, Zeeshan Zakaria wrote:> exten => h,1,Noop( >>> Call duration was ${CDR(duration)} seconds)It would be a "better practice" to use the application provided explicitly for displaying output on the console ("verbose()") rather than using the obtuse "side effect" of an application whose name does not translate well for non-native-English speakers. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Its your personal opinion. Actually as a non-native-English speaker to me "Noop" sounds much better than "Verbose" which itself is a confusing word, plus I guess command "verbose" is new in 1.6, and I've never used it, so I'll stick with "Noop" which can be used with any version of asterisk. Zeeshan A Zakaria -- Sent from my Android phone with K-9 Mail. On 2010-06-03 12:18 PM, "Steve Edwards" <asterisk.org at sedwards.com> wrote: Un-top-posting...> On 2010-06-03 9:35 AM, "Necati Demir" <ndemir at demir.web.tr> wrote:> I want to ask how to get call duration.On Thu, 3 Jun 2010, Zeeshan Zakaria wrote:> exten => h,1,Noop( >>> Call duration was ${CDR(duratio...It would be a "better practice" to use the application provided explicitly for displaying output on the console ("verbose()") rather than using the obtuse "side effect" of an application whose name does not translate well for non-native-English speakers. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _____________________________________________________________________ -- Bandwidth and Colocation Pr... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100603/4a1dfbef/attachment.htm
First thing which comes to mind is:> exten => h,1,Noop( >>> Call duration was ${CDR(duration)} seconds) > exten => h,n,Hangup() > > There is also a variable ${CDR(billsec)} which shows only the duration the > call was actually connected between two channels, however this may not match > with the duration of your provider. >Is there another way for getting a reliable call duration. ${CDR(duration)} show more duration than actual, and ${CDR(billsec)} shows always 0. --> Sent from my Android phone with K-9 Mail. > > On 2010-06-03 9:35 AM, "Necati Demir" <ndemir at demir.web.tr> wrote: > > Hello, > > I want to ask how to get call duration. > > -- > Necati DEM?R > http://demir.web.tr > http://friendfeed.com/ndemir > ndemir ~ demir.web.tr > --------------------------------------- > > -- > > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Necati DEM?R http://demir.web.tr http://friendfeed.com/ndemir ndemir ~ demir.web.tr --------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100604/74a7c254/attachment.htm