Hi,<br>Just missed in the snippet below, I do call create_dialog("B") before setting the $dlg_val(timeout) and the problems mentioned below are still there.<br><br>--- Jayesh<br><br><div class="gmail_quote">2012/1/19 Jayesh Nambiar <span dir="ltr"><<a href="mailto:jayesh.voip@gmail.com">jayesh.voip@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Razvan,<br>I copied the acc directory of revision 8673 into my opensips-1.7.1 and also applied the patch and it compiled properly. But I guess it does not work as expected. I did the following:<br>
<br>modparam("acc", "db_extra_bye", "timeout=$dlg_val(timeout)")<br>
<br>if(has_totag()) {<br> if(match_dialog()) { # --- Match dialog to associate sequential requests ---<br> if(is_method("BYE")) {<br> $dlg_val(timeout) = "0";<br> xlog("L_INFO", "Bye received and timeout is $dlg_val(timeout)");<br>
}<br> t_relay();<br> }<br>}<br><br>if(is_method("INVITE")) {<br> $dlg_val(timeout) = "1";<br> route(call_logic);<br> exit;<br>}<br><br>Now here, When BYE is received, I can see the XLOG logging the values correct, but the value entered in the DB is still 1. Morepver now when dialog times out, no CDR record is generated and I can see the following in the syslog:<br>
<br>ERROR:acc:acc_dlg_callback: not enough info<br><br>Any pointers or directions that you can give me to test this properly. For information, I use the topology_hiding function in dialog module to route the calls. Also I have another 14 extra values that I enter in acc table using the normal db_extra parameter.<br>
<br>Thanks,<br><br>--- Jayesh<div class="HOEnZb"><div class="h5"><br><br><br><div class="gmail_quote">2012/1/19 Jayesh Nambiar <span dir="ltr"><<a href="mailto:jayesh.voip@gmail.com" target="_blank">jayesh.voip@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thank you very much Razvan. I will try this out.<span><font color="#888888"><br><br>--- Jayesh</font></span><div><div><br><br><div class="gmail_quote">On Wed, Jan 18, 2012 at 8:34 PM, Razvan Crainea <span dir="ltr"><<a href="mailto:razvancrainea@opensips.org" target="_blank">razvancrainea@opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi, Jayesh!<br>
<br>
First of all, there are not so many changes between the 1.7.1 and
trunk for the accounting module. Only this new parameter was added
as far as I know, and it should be pretty stable. If you do want to
use the module from trunk, you can simply copy it in your OpenSIPS
1.7.1 folder, and apply the patch I've attached in order to compile
properly.<br>
<br>
If you are using the automatic CDR accounting, then the scenario you
described above can not be implemented. The accounting backend is
only set at the initial invite.<br>
<br>
Regards,<span><font color="#888888"><br>
<pre cols="72">--
Răzvan Crainea
OpenSIPS Developer</pre></font></span><div><div>
<br>
On 01/18/2012 04:53 PM, Jayesh Nambiar wrote:
<blockquote type="cite">Hi Razvan,<br>
Not a very relevant question to ask, but is it possible to disable
accounting when dialog times out?? So that no record is entered in
the DB because of dialog timeout. I can probably setflag for
syslog accounting where such calls will also get logged !!<br>
<br>
--- Jayesh<br>
<br>
<div class="gmail_quote">On Wed, Jan 18, 2012 at 7:14 PM, Jayesh
Nambiar <span dir="ltr"><<a href="mailto:jayesh.voip@gmail.com" target="_blank">jayesh.voip@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Razvan,<br>
Thanks for your reply. Is it possible to use only the acc
module of trunk version with the 1.7.1 stable version or do I
have to download and configure the entire latest trunk version
of opensips.<br>
I intend to use this in production setup, so just a little
more worried about the reliability.<br>
<br>
Thanks again,<br>
<br>
--- Jayesh<br>
<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hello, Jayesh!<br>
<br>
You can not achieve this scenario in OpenSIPS 1.7.1, but
you can wit the<br>
acc module from trunk version. There you have a new
parameter,<br>
db_extra_bye[1], that can evaluate the pseudo variables
after the BYE<br>
message is received.<br>
<br>
An easier way to implement this, is to initialize a
dlg_val with the<br>
value 1, and if you receive a BYE message, change it to 0.
If you don't<br>
receive any BYE and a timeout is triggered, then the value
will remain 1<br>
and that is what you will see in the database. Otherwise,
for a normal<br>
hang up, you should set it to 0 and this will reflect in
the DB. But<br>
once again, this will only work with the trunk version,
adding the<br>
dlg_val to the db_extra_bye parameter.<br>
<br>
[1] <a href="http://www.opensips.org/html/docs/modules/devel/acc.html#id293815" target="_blank">http://www.opensips.org/html/docs/modules/devel/acc.html#id293815</a><br>
<br>
Regards,<span><font color="#888888"><br>
<br>
--<br>
Ra(zvan Crainea<br>
OpenSIPS Developer</font></span>
<div>
<div><br>
<br>
<br>
On 01/18/2012 01:35 PM, Jayesh Nambiar wrote:<br>
> Hi,<br>
> I am using CDR accounting with mysql in my
script. I want a way to<br>
> know if the CDR record is because of a
dialog_timeout. Is there some<br>
> standard way of notifying it from the script. I
was thinking of<br>
> something like this:<br>
> I have an extra column "timeout" in my acc table
which is inserted<br>
> using db_extra parameter $avp(timeout) which is
initialized to 0. If I<br>
> know somewhere in the script that dialog has
timed out, I set this<br>
> $avp(timeout) to 1, so that the record inserted
will have timeout<br>
> column value as 1 and it will be easily
identifiable.<br>
><br>
> I understand that AVPs are not dialog persistent,
but probably I can<br>
> use some dlg_val variables. Also I dont find any
function that<br>
> indicates the dialog_timeout event. Another idea
was to set the<br>
> bye_on_timeout flag by calling create_dialog("B")
and in local_route<br>
> 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<br>
> standard way of doing it.<br>
><br>
> --- Jayesh<br>
><br>
><br>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br>
</blockquote>
</div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>