[asterisk-users] Possible Bug (Include ${HANGUPCAUSE} in CDR)

Bryant Zimmerman BryantZ at zktech.com
Thu Dec 23 15:16:26 UTC 2010


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>


More information about the asterisk-users mailing list