Bryant Zimmerman
2010-Dec-22 17:42 UTC
[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
Ok I can't get my CDR values to set from the h extension in either 1.6.2 or 1.8 What is wrong? Here is what I found in the 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. The default value is "no". endbeforehexten=no The default is set to no so why can't I store any CDR values in my h extension. exp.. exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE}) I need the cause code stored. Really what I need to be able to do is in the h quickly store some values to the CDR then. For the write of the CDR and stopping the billing seconds. Then continue to process some cleanup funcitons. How can I work arround asterisk not honoring the endbeforehexten=no. Is there some other way to achieve this? Bryant I need the cause code stored.Really what I need to be able to do is in the h quickly store some values to the CDR then.For the write of the CDR and stopping the billing seconds. Then continue to process some cleanup funcitons.How can I work arround asterisk not honoring the endbeforehexten=no.Is there some other way to achieve this?Bryant -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20101222/159e28ea/attachment.htm>
Danny Nicholas
2010-Dec-22 18:45 UTC
[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
_____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Bryant Zimmerman Sent: Wednesday, December 22, 2010 11:43 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Asterisk Developers Mailing List Subject: Re: [asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR) Ok I can't get my CDR values to set from the h extension in either 1.6.2 or 1.8 What is wrong? Here is what I found in the 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. The default value is "no". endbeforehexten=no The default is set to no so why can't I store any CDR values in my h extension. exp.. exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE}) I need the cause code stored. Really what I need to be able to do is in the h quickly store some values to the CDR then. For the write of the CDR and stopping the billing seconds. Then continue to process some cleanup funcitons. How can I work arround asterisk not honoring the endbeforehexten=no. Is there some other way to achieve this? Bryant I need the cause code stored.Really what I need to be able to do is in the h quickly store some values to the CDR then.For the write of the CDR and stopping the billing seconds. Then continue to process some cleanup funcitons.How can I work arround asterisk not honoring the endbeforehexten=no.Is there some other way to achieve this?Bryant Okay, this is a "mentally challenged" solution, but at the h extension you have ${UNIQUEID} and ${HANGUPCAUSE} available to you. Use DeadAGI to "stuff" these values into the CDR or into another file that you can cross-reference. If you use the two-file method, you would just select the matching file using uniqueid. That's what I did when I had this problem on a version of 1.4. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20101222/a21280ec/attachment.htm>
Carlos Chavez
2010-Dec-22 18:48 UTC
[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
On Wed, 2010-12-22 at 12:42 -0500, Bryant Zimmerman wrote:> Ok I can't get my CDR values to set from the h extension in either > 1.6.2 or 1.8 What is wrong? Here is what I found in the 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. The default value is "no". > endbeforehexten=no > > The default is set to no so why can't I store any CDR values in my h > extension. > > exp.. > exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE}) > I need the cause code stored. > > Really what I need to be able to do is in the h quickly store some > values to the CDR then. > For the write of the CDR and stopping the billing seconds. Then > continue to process some cleanup funcitons. > > How can I work arround asterisk not honoring the endbeforehexten=no. > Is there some other way to achieve this? > > Bryant > > I need the cause code stored.Really what I need to be able to do is in > the h quickly store some values to the CDR then.For the write of the > CDR and stopping the billing seconds. Then continue to process some > cleanup funcitons.How can I work arround asterisk not honoring the > endbeforehexten=no.Is there some other way to achieve this?BryantIs the CDR line your only h line? I ask because if you only have one priority for h then you MUST have: exten => h,1,Set(CDR(cause_code)=${HANGUPCAUSE}) This is because the dialplan will not use n for the first priority and thus will never run. -- Telecomunicaciones Abiertas de M?xico S.A. de C.V. Carlos Ch?vez Prats Director de Tecnolog?a +52-55-91169161 ext 2001 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20101222/44047727/attachment.pgp>
Tilghman Lesher
2010-Dec-22 19:16 UTC
[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
On Wednesday 22 December 2010 11:42:33 Bryant Zimmerman wrote:> Ok I can't get my CDR values to set from the h extension in either 1.6.2 > or 1.8 What is wrong? Here is what I found in the 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. The default value is "no". > endbeforehexten=no > > The default is set to no so why can't I store any CDR values in my h > extension. > > exp.. > exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE}) > I need the cause code stored.Sounds like your "h" extension is in the wrong context. Try including some information about where you are putting the "h" extension and what includes you're doing. -- Tilghman
Bryant Zimmerman
2010-Dec-23 03:08 UTC
[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
My "h" extension is in the same context as my Dial commands. Here is a cut back version of the code. The cause_code value is never stored in the mysql databae even when set in the "h" extension or the when set in "rc-ANSWER' OR "doDialStd" [macro-OBD-DoOutboundDial] exten => s,1,Macro(${ARG1}) exten => s,n,Set(CALLERID(name)=${siteDefaultCIDName}) exten => s,n,Set(CALLERID(number)=${siteDefaultCIDNumber}) exten => s,n,SipAddHeader(X-interNetGR-linetype:${gbl_ibclinetype}) exten => s,n,SipAddHeader(X-interNetGR-actlineid:${gbl_actlineid}) exten => s,n,Set(GROUP()=${siteGrpLineCount}) exten => s,n,Set(c_DialArg=${ARG2}) exten => s,n,Set(c_DialExten=${MACRO_EXTEN}) exten => s,n,GoSub(DoLineCountCheck,1) exten => s,n,GotoIf($[${siteOverLineCount}=1]?OverLineCount,1) exten => s,n,GosubIf($["${c_DialExten}"="${siteDirSer}"]?OverLineCount,1) exten => s,n,GosubIf($["${c_DialExten}"="411"]?nofeature,1) exten => s,n,GosubIf($["${siteUseE164}"="1"]?doDialE164,1:doDialStd,1) exten => s,n,Goto(rc-${DIALSTATUS},1) exten => s,n,Busy(60) exten => s,n,Hangup() exten => h,1,NoOp(Cause Code = ${HANGUPCAUSE}) exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE}) exten => h,n,Goto(rc-${DIALSTATUS},1) exten => doDialStd,1,NoOp(Calling Using No E164) exten => doDialStd,n,Macro(OBD-CheckOutboundNumber,${c_DialArg}${c_DialExten}) exten => doDialStd,n,Dial(${siteDefaultOutboundTrunk}/${c_DialArg}${c_DialExten},120, ge${siteDialOptionsPublic}) exten => doDialStd,n,Set(CDR(cause_code)=${HANGUPCAUSE}) exten => doDialStd,n,Return exten => rc-ANSWER,1,NoOp(Do Return ANSWER) exten => rc-ANSWER,n,Set(CDR(cause_code)=${HANGUPCAUSE}) exten => rc-ANSWER,n,Hangup() exten => rc-BUSY,1,NoOp(Do Return BUSY) exten => rc-BUSY,n,Busy() exten => rc-BUSY,n,Hangup() exten => rc-NOANSWER,1,NoOp(Do Return NOANSWER) exten => rc-NOANSWER,n,NoOp(Cause Code = ${HANGUPCAUSE}) exten => rc-NOANSWER,n,Hangup() Any more feed back would be appercaited. Bryant ---------------------------------------- From: "Tilghman Lesher" <tilghman at meg.abyt.es> Sent: Wednesday, December 22, 2010 3:06 PM To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com> Subject: Re: [asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR) On Wednesday 22 December 2010 11:42:33 Bryant Zimmerman wrote:> Ok I can't get my CDR values to set from the h extension in either 1.6.2 > or 1.8 What is wrong? Here is what I found in the 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. The default value is "no". > endbeforehexten=no > > The default is set to no so why can't I store any CDR values in my h > extension. > > exp.. > exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE}) > I need the cause code stored.Sounds like your "h" extension is in the wrong context. Try including some information about where you are putting the "h" extension and what includes you're doing. -- Tilghman -- _____________________________________________________________________ -- 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/20101222/fd8eb61e/attachment-0001.htm>
Bryant Zimmerman
2010-Dec-23 03:15 UTC
[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
No this is just a snip of the much larger code. The "h" extension is runing but no values port dial function aer being written. If I do a Set(CDR(field)=Value) before the dial The value is stored. See my other response for a larger snip of code. Bryant ---------------------------------------- From: "Carlos Chavez" <cursor at telecomabmex.com> Sent: Wednesday, December 22, 2010 2:46 PM To: asterisk-users at lists.digium.com Subject: Re: [asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR) On Wed, 2010-12-22 at 12:42 -0500, Bryant Zimmerman wrote:> Ok I can't get my CDR values to set from the h extension in either > 1.6.2 or 1.8 What is wrong? Here is what I found in the 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. The default value is "no". > endbeforehexten=no > > The default is set to no so why can't I store any CDR values in my h > extension. > > exp.. > exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE}) > I need the cause code stored. > > Really what I need to be able to do is in the h quickly store some > values to the CDR then. > For the write of the CDR and stopping the billing seconds. Then > continue to process some cleanup funcitons. > > How can I work arround asterisk not honoring the endbeforehexten=no. > Is there some other way to achieve this? > > Bryant > > I need the cause code stored.Really what I need to be able to do is in > the h quickly store some values to the CDR then.For the write of the > CDR and stopping the billing seconds. Then continue to process some > cleanup funcitons.How can I work arround asterisk not honoring the > endbeforehexten=no.Is there some other way to achieve this?BryantIs the CDR line your only h line? I ask because if you only have one priority for h then you MUST have: exten => h,1,Set(CDR(cause_code)=${HANGUPCAUSE}) This is because the dialplan will not use n for the first priority and thus will never run. -- Telecomunicaciones Abiertas de M?xico S.A. de C.V. Carlos Ch?vez Prats Director de Tecnolog?a +52-55-91169161 ext 2001 -- _____________________________________________________________________ -- 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/20101222/9abf51ed/attachment.htm>
Bryant Zimmerman
2010-Dec-23 15:16 UTC
[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
Tilghman This does not make any sense. In the voip-info posting for the "h" extension it specifically states that to handle "h" while in a macro that the macro needs an "h" extension. The "h" extension runs inside the macro but the CDR data is not being updated correctly. Also the rc-ANSWER entry in the macro does not update the CDR with the ${HANGUPCAUSE} either after the far end hangs up. This is diffently inconsistent behavior here. Both the DIAL and "h" extension are inside the macro so the behaivior should be consistent. If I am understanding you correctly the only way we can get a CDR to update after a dial is to not do any DIAL calls in a MACRO is this what you are saying? Otherwise your logic may be flawed or we have a very big logic bug in the Asterisk Macro system. From: http://www.voip-info.org/wiki/view/Asterisk+h+extension Be aware: Macros require their own h extension as they do not make use of the calling context's h extension! Tilghamn thanks for the feed back the back and forth here is great and helps a lot it is giving me more ideas to test against. Bryant ---------------------------------------- From: "Tilghman Lesher" <tilghman at meg.abyt.es> Sent: Thursday, December 23, 2010 12:30 AM To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com> Subject: Re: [asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR) On Wednesday 22 December 2010 21:08:56 Bryant Zimmerman wrote:> My "h" extension is in the same context as my Dial commands. Here is a > cut back version of the code. > The cause_code value is never stored in the mysql databae even when set > in the "h" extension or the > when set in "rc-ANSWER' OR "doDialStd" > > [macro-OBD-DoOutboundDial] > exten => h,1,NoOp(Cause Code = ${HANGUPCAUSE}) > exten => h,n,Set(CDR(cause_code)=${HANGUPCAUSE}) > exten => h,n,Goto(rc-${DIALSTATUS},1)There's the problem. The "h" extension should be in whatever context is calling the Macro, not in the Macro context itself. -- Tilghman -- _____________________________________________________________________ -- 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/20101223/68430027/attachment.htm>
Tilghman Lesher
2010-Dec-23 19:39 UTC
[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
On Thursday 23 December 2010 09:16:26 Bryant Zimmerman wrote:> In the voip-info postingRight here is why you fail. Voip-info is very often wrong. Refer to the documentation that comes with Asterisk for definitive information. In this case, the "h" extension should be in the calling context, not within the Macro itself. -- Tilghman
Sherwood McGowan
2010-Dec-25 12:56 UTC
[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
On Thu, Dec 23, 2010 at 1:39 PM, Tilghman Lesher <tilghman at meg.abyt.es> wrote:> On Thursday 23 December 2010 09:16:26 Bryant Zimmerman wrote: >> In the voip-info posting > > Right here is why you fail. ?Voip-info is very often wrong. ?Refer to the > documentation that comes with Asterisk for definitive information. ?In > this case, the "h" extension should be in the calling context, not within > the Macro itself. > > -- > Tilghman > > -- > _____________________________________________________________________ > -- 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 >+1 for the informative answer