<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Hello Bogdan-Andrei,</div><div><br></div><div>Might as well disregard this request. I wasn’t really thinking about the fact that if I was to host a couple of customers and they happen to call each other, I would need account_id (attrs) for both of them. So when I run the report at the end of the month, they would both have it as a record. </div><div><br></div><div>Thanks again,</div><div><br></div><div>Gordon</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>><br><span style="font-weight:bold">Reply-To: </span> OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>><br><span style="font-weight:bold">Date: </span> Sun, 8 Jun 2014 17:45:35 +0300<br><span style="font-weight:bold">To: </span> OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>>, Gordon Sims <<a href="mailto:gsims94@gmail.com">gsims94@gmail.com</a>><br><span style="font-weight:bold">Subject: </span> Re: [OpenSIPS-Users] Adding extra information into the acc table based on dr_rules<br></div><div><br></div><div><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<div bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><tt>Hi Gordon,<br>
<br>
Instead of adding a new column to the dr_rules, I suggest to use
the "attrs" column of that table. It is not used by the actual
routing engine, its only purpose is to allow the user to attach
custom data to the rules. So add your ID into the attrs columns
- when the rule is match, the attrs value will be available into
script into a variable (see
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.11.x/drouting.html#id294716">http://www.opensips.org/html/docs/modules/1.11.x/drouting.html#id294716</a>,
rule_attrs_pvar parameter).<br>
<br>
Once you loaded into a variable, via db_extra you can push it to
the acc table.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
On 08.06.2014 15:35, Gordon Sims wrote:<br>
</div>
<blockquote cite="mid:CFB9C2CD.1708C%25gsims94@gmail.com" type="cite">
<div><font face="Calibri,sans-serif">First off, I would like to
thank </font>Razvan for my cdr accounting issue and using
db_extra. Was exactly what I was looking for.</div>
<div><br>
</div>
<div>Now I’m getting stumped on adding in extra information into
the acc table. I’ve added in another field to both my dr_rules
and acc tables called account_id (int 6). What I would like to
do is when the call comes in, based on the destination, is to
take the account_id information from the dr_rules table and
insert that same value into the acc table. I’ve looked at
avpops module, but not finding anything definitive that would do
what I’ve looking for. I hope I’m not the only one that is
trying to do this. I’m looking for a working example on how to
accomplish this one.</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div><br>
</div>
<div>Gordon </div>
<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>
<br>
</div></div>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</span></body></html>