<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Chris,<br>
<br>
On 06/30/2011 01:21 PM, Chris Martineau wrote:
<blockquote
cite="mid:1D10AB188D6CCA46BB4369E3268E36EF2D1A0C@SVR01.ghosttelecom.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to sort out some issues with
how my missed call and failure records are recorded.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My cfg file sets up the acc settings as
follows...<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">modparam("acc",
"db_url","mysql://opensips:opensipsrw@localhost/opensips")<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">modparam("acc",
"db_flag", 1)<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">modparam("acc",
"db_missed_flag", 2)<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">modparam("acc",
"failed_transaction_flag", 3)<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">modparam("acc",
"cdr_flag", 7)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family:
"Courier New";"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";"> if
(is_method("INVITE")) {<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";"> ... <o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">
setflag(1); # do accounting<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">
setflag(2); # do accounting<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">
setflag(3); # do accounting<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">
setflag(7); # do cdr accounting<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Everything works fine and confirmed calls
go to the acc database and missed calls go to the missed calls
database.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However I need to translate the error codes
I receive from upstream to a more generic code for callers.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have done this as follows...<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">At the end of the failure route...<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";">
t_reply("486","Busy");<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Courier New";"> exit;<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">which works and converts all returned
errors to 486 fine but I get 2 records in the missed calls db
the original and the translated. Is it possible to only log
the original somehow apart from retrospectively removing them
from the db?</p>
</div>
</blockquote>
This was a bug which was fixed today - normally, the missed call
event is generated by the received reply, not by the outgoing reply.
Because of a bug, in some cases, both were generated - if you update
from SVN, you should have the right code.<br>
<br>
<blockquote
cite="mid:1D10AB188D6CCA46BB4369E3268E36EF2D1A0C@SVR01.ghosttelecom.local"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Also for internally generated failure codes
(408 timeouts etc) I cannot see anyway of translating them.</p>
</div>
</blockquote>
You mean you do not get any missed calls for internal 408 ? is the
missed call flag set for that transaction ?<br>
<br>
Regards,<br>
Bogdan<br>
<br>
<pre class="moz-signature" cols="72">--
Bogdan-Andrei Iancu
OpenSIPS solutions and "know-how"</pre>
</body>
</html>