Re: [asterisk-users] CDR Function in Hangup Channel

2007-12-07 Thread Steve Murphy
On Thu, 2007-12-06 at 12:54 -0800, Douglas Garstang wrote:
 Ok, this is a little crazy...
 
 billsec and duration are 0, but disposition is ANSWERED.
 Huh?
 
 h = {
 NoOp(*** LEG B HANGUP ${CDR(duration)} ${CDR(billsec)}
 ${CDR(disposition)});
 AddCallLeg(${LEGB_SOURCE},${LEGB_DEST},1,2,${HANGUPCAUSE});
 };
 

Douglas--

Check out cdr.conf--

; Normally, CDR's are not closed out until after all extensions are
finished
; executing.  By enabling this option, the CDR will be ended before
executing
; the h extension so that CDR values such as end and billsec may
be
; retrieved inside of of this extension.
;endbeforehexten=no

Try setting endbeforehexten=yes and see if you get what you need

murf

 
 - Original Message 
 From: Douglas Garstang [EMAIL PROTECTED]
 To: asterisk-users@lists.digium.com
 Sent: Thursday, December 6, 2007 12:04:29 PM
 Subject: CDR Function in Hangup Channel
 
 So... I'm trying to access CDR(duration) and CDR(billsec) inside h...
 
 I keep getting 0. Can I access the CDR function inside a hangup
 extensions?
 
 Asterisk 1.4.13
 
 Thanks, Doug.
 
 
 
 __
 Looking for last minute shopping deals? Find them fast with Yahoo!
 Search.
 
 
 
 
 __
 Never miss a thing. Make Yahoo your homepage.
 ___
 --Bandwidth and Colocation Provided by http://www.api-digital.com--
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


smime.p7s
Description: S/MIME cryptographic signature
___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] CDR Function in Hangup Channel

2007-12-06 Thread Douglas Garstang
So... I'm trying to access CDR(duration) and CDR(billsec) inside h...

I keep getting 0. Can I access the CDR function inside a hangup extensions?

Asterisk 1.4.13

Thanks, Doug.




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] CDR Function in Hangup Channel

2007-12-06 Thread Douglas Garstang
Ok, this is a little crazy...

billsec and duration are 0, but disposition is ANSWERED.
Huh?

h = {
NoOp(*** LEG B HANGUP ${CDR(duration)} ${CDR(billsec)} 
${CDR(disposition)});
AddCallLeg(${LEGB_SOURCE},${LEGB_DEST},1,2,${HANGUPCAUSE});
};


- Original Message 
From: Douglas Garstang [EMAIL PROTECTED]
To: asterisk-users@lists.digium.com
Sent: Thursday, December 6, 2007 12:04:29 PM
Subject: CDR Function in Hangup Channel


So... I'm trying to access CDR(duration) and CDR(billsec) inside h...

I keep getting 0. Can I access the CDR function inside a hangup extensions?

Asterisk 1.4.13

Thanks, Doug.




  Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.





  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] CDR Function in Hangup Channel

2007-12-06 Thread Tilghman Lesher
On Thursday 06 December 2007 14:54:14 Douglas Garstang wrote:
 Ok, this is a little crazy...

 billsec and duration are 0, but disposition is ANSWERED.
 Huh?

That's correct.  Both of those values depend upon the call be ENDED.
If the call is not yet ended, neither of those values has yet been
determined.

-- 
Tilghman

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] CDR Function in Hangup Channel

2007-12-06 Thread Douglas Garstang
Oh Crap. So there's no way to get the duration and billsec from the dial plan 
then?

- Original Message 
From: Tilghman Lesher [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Sent: Thursday, December 6, 2007 1:19:59 PM
Subject: Re: [asterisk-users] CDR Function in Hangup Channel


On Thursday 06 December 2007 14:54:14 Douglas Garstang wrote:
 Ok, this is a little crazy...

 billsec and duration are 0, but disposition is ANSWERED.
 Huh?

That's correct.  Both of those values depend upon the call be ENDED.
If the call is not yet ended, neither of those values has yet been
determined.

-- 
Tilghman

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users






  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] CDR Function in Hangup Channel

2007-12-06 Thread Joshua Colp
- Original Message -
From: Douglas Garstang
[mailto:[EMAIL PROTECTED]
To: Asterisk Users Mailing List -
Non-Commercial Discussion [mailto:[EMAIL PROTECTED]
Sent:
Thu, 06 Dec 2007 17:57:18 -0400
Subject: Re: [asterisk-users] CDR Function
in Hangup Channel


 Oh Crap. So there's no way to get the duration and billsec from the dial
 plan then?
 

There is an option which can be enabled in the general section of cdr.conf, 
endbeforehexten, which will cause the values to be calcuated before entering 
the h extension. Here is what it says in cdr.conf.sample:

; Normally, CDR's are not closed out until after all extensions are finished
; executing.  By enabling this option, the CDR will be ended before executing
; the h extension so that CDR values such as end and billsec may be
; retrieved inside of of this extension.
;endbeforehexten=no

Joshua Colp
Software Developer
Digium, Inc.

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] CDR Function in Hangup Channel

2007-12-06 Thread Steve Edwards
On Thu, 6 Dec 2007, Tilghman Lesher wrote:

 On Thursday 06 December 2007 14:54:14 Douglas Garstang wrote:
 billsec and duration are 0, but disposition is ANSWERED.

 That's correct.  Both of those values depend upon the call be ENDED.
 If the call is not yet ended, neither of those values has yet been
 determined.

Which is understandable from a coding standpoint, but it does make it more 
difficult to write an AGI that writes CDRs in the h extension.

I understand that just because a call is in the h extension doesn't mean 
that it has ended, but that would be a convienent point to post the 
variables to their current values.

Thanks in advance,

Steve Edwards  [EMAIL PROTECTED]  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] CDR Function in Hangup Channel

2007-12-06 Thread Steve Edwards
On Thu, 6 Dec 2007, Joshua Colp wrote:

 There is an option which can be enabled in the general section of 
 cdr.conf, endbeforehexten, which will cause the values to be calcuated 
 before entering the h extension.

A 1.4-ism?

Thanks in advance,

Steve Edwards  [EMAIL PROTECTED]  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] CDR Function in Hangup Channel

2007-12-06 Thread Douglas Garstang
Got it!
endbeforehexten=yes
Wooo!

- Original Message 
From: Steve Edwards [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Sent: Thursday, December 6, 2007 2:31:54 PM
Subject: Re: [asterisk-users] CDR Function in Hangup Channel


On Thu, 6 Dec 2007, Joshua Colp wrote:

 There is an option which can be enabled in the general section of 
 cdr.conf, endbeforehexten, which will cause the values to be
 calcuated 
 before entering the h extension.

A 1.4-ism?

Thanks in advance,

Steve Edwards  [EMAIL PROTECTED]  Voice: +1-760-468-3867
 PST
Newline Fax:
 +1-760-731-3000

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users






  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users