<div class="gmail_quote"><div>Hi All,</div><div>Just an update to this post.</div><div>If I use my own sip_code column and add values in those column using the PV $rs, it works good. I use a t_on_reply in the branch route and store the response codes in a avp variable when the codes are 4XX or 2XX. So when there are two attempts for a single call this avp stores both response codes and inserts appropriate rows in the columns as desired.</div>
<div>Is there a way to just ask opensips to not enter the sip_code values in the acc table?<b> </b>Because i do not want two columns indicating the same thing. Or is there some way to let opensips know that sip_code column is also part of multi_leg_info? So that it maintains the final response code of each INVITE transaction to properly insert into the acc table.</div>
<div><br></div><div>--- Jayesh</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
I have a scenario:<br>
Before routing a call to the PSTN, I fetch multiple IPs from DB in a single<br>
AVP, for eg. i fetch two IP addresses to which I need to forward the calls<br>
according to some LCR algorithm. I route the calls to specific IP address<br>
using the AVP indexes. If routing to first index value fails, I do a<br>
failover to second one. Now here when the call on first IP address fails and<br>
it connects on second, I get two rows inserted in &quot;ACC&quot; table for the INVITE<br>
as I have multi-leg info enabled. Up till here everything is good.<br>
The problem here is, the SIP Code column shows 200 on both rows. Basically<br>
the SIP code column always inserts the last response code in all the rows.<br>
Is there a way where I can segregate the SIP Codes. What I need is the row<br>
where call failed, the sip_code should be the failed response code(403, 404,<br>
503 etc) as received and the row where call connected the sip_code should be<br>
200. Is this doable?<br>
<br>
Is there a way I can use the PV $rs in some way and manipulate the values in<br>
sip_code column of acc based on call leg?<br>
Any help is highly appreciated. Thanks in advance.<br>
<br>
--- Jayesh<br></blockquote></div>