<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello, Jayesh!<br>
<br>
You can not achieve this scenario in OpenSIPS 1.7.1, but you can wit
the acc module from trunk version. There you have a new parameter,
db_extra_bye[1], that can evaluate the pseudo variables after the
BYE message is received.<br>
<br>
An easier way to implement this, is to initialize a dlg_val with the
value 1, and if you receive a BYE message, change it to 0. If you
don't receive any BYE and a timeout is triggered, then the value
will remain 1 and that is what you will see in the database.
Otherwise, for a normal hang up, you should set it to 0 and this
will reflect in the DB. But once again, this will only work with
the trunk version, adding the dlg_val to the db_extra_bye parameter.<br>
<br>
[1]
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="http://www.opensips.org/html/docs/modules/devel/acc.html#id293815">http://www.opensips.org/html/docs/modules/devel/acc.html#id293815</a><br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">--
Răzvan Crainea
OpenSIPS Developer</pre>
<br>
On 01/18/2012 01:35 PM, Jayesh Nambiar wrote:
<blockquote
cite="mid:CALvF6vCch9jAeF80D6fpGxqMfMemWi2AkKfUJwJu+Xb33WtEkw@mail.gmail.com"
type="cite">Hi,<br>
I am using CDR accounting with mysql in my script. I want a way to
know if the CDR record is because of a dialog_timeout. Is there
some standard way of notifying it from the script. I was thinking
of something like this:<br>
I have an extra column "timeout" in my acc table which is
inserted using db_extra parameter $avp(timeout) which is
initialized to 0. If I know somewhere in the script that dialog
has timed out, I set this $avp(timeout) to 1, so that the record
inserted will have timeout column value as 1 and it will be easily
identifiable. <br>
<br>
I understand that AVPs are not dialog persistent, but probably I
can use some dlg_val variables. Also I dont find any function that
indicates the dialog_timeout event. Another idea was to set the
bye_on_timeout flag by calling create_dialog("B") and in
local_route catch the BYE request and set the dlg_val variables
there.<br>
<br>
Wanted to know if any of these ideas can work or is there some
more standard way of doing it.<br>
<br>
--- Jayesh<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>