<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">search in archives<br>
save the records to another table like cdr_extended<br>
<br>
<br>
Dne 7.10.2015 v 15:26 Ross Beer napsal(a):<br>
</div>
<blockquote cite="mid:SNT151-W1111D6AC5555E78A758DDAFF360@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi,
<div><br>
</div>
<div>I have the following code that operates when a channel is
hung-up:</div>
<div><br>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding:
0px;">
<div>
<div>[record-hangupcause]</div>
</div>
<div>
<div>exten => 1,n,Set(CDR(hangupcause)=${HANGUPCAUSE})</div>
</div>
<div>
<div>exten => s,n,Return()</div>
</div>
</blockquote>
<div><br>
</div>
<div>Before the dial a hangup handler is registered:</div>
<div><br>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding:
0px;">
<div>Set(CHANNEL(hangup_handler_push)=record-hangupcause,s,1)</div>
</blockquote>
<div><br>
</div>
<div>The routine is called and the variables are being set,
however not on the channel's CDR which made the call. I
believe this is due to the CDR being closes as soon as the
dial returns. </div>
<div><br>
</div>
<div>By changing the cdr option 'endbeforehexten=no' this should
keep the CDR accessible, however all this does is cause
another CDR to be created for the 'h' extension.</div>
<div><br>
</div>
<div>Is there a way to update the CDR so that a result can be
stored per dial?</div>
<div><br>
</div>
<div>Thank you in advance,</div>
<div><br>
</div>
<div>Ross</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
---------------------------------------
Marek Cervenka
=======================================
</pre>
</body>
</html>