[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)
Bryant Zimmerman
BryantZ at zktech.com
Thu Dec 23 03:08:56 UTC 2010
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>
More information about the asterisk-users
mailing list