Bogdan,<div>What was happening is that a call to a carrier failed and caused the RURI which was written to the DB to come from the Contact header of the 486 that came from the carrier. I&#39;m not sure why it used that instead of the OURI..</div>

<div><br></div><div>I fixed this issue by storing the OURI to an avp ON INVITE and the writing that AVP to the db instead of rU or oU.</div><div><br></div><div>This works for *me*.</div><div>-Brett</div><div><br></div><div>

<br><div class="gmail_quote">On Wed, Apr 22, 2009 at 2:42 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

HI Brett,<br>
<br>
You lost me here.....<br>
<br>
The $oU is the original username (whatever opensips received in the RURI of the request).   Also you mentioned about the Contact URI (mod_sofia), right??<br>
<br>
So, what exact part of the message are you trying to log?<div class="im"><br>
<br>
Regards,<br>
Bogdan<br>
<br>
Brett Nemeroff wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
No, actually, the original invite, had a perfectly valid RURI in it.. but the contact had sip:mod_sofia in it..<br>
<br>
I am using extra_accounting and I&#39;m looking $oU, which is why I&#39;m confused since the actual $oU is valid and not sip:mod_sofia<br>
<br>
<br>
<br></div><div class="im">
On Wed, Apr 8, 2009 at 8:40 AM, Bogdan-Andrei Iancu &lt;<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;&gt; wrote:<br>


<br>
    Hi Brett,<br>
<br>
    The acc module will log the last RURI of the failed branch...so<br>
    what was the RURI before sending the INVITE out....because if I<br>
    look at the ACK, I guess the INVITE also has &quot;mod_sofia&quot;, right ?<br>
    In failure route you cannot change the branch that was just<br>
    completed....<br>
<br>
    If you want something custom to be logged, use the<br>
    extra_accounting options.<br>
<br>
    Regards,<br>
    Bogdan<br>
<br>
    Brett Nemeroff wrote:<br>
<br>
        Hey All,<br>
        I&#39;m sure I&#39;m doing someting stupid here.. In general, I set<br>
        all the acc_db flags at the top of my script so everything<br>
        gets logs. I&#39;m getting 486 Busy from the far end and nice,<br>
        pretty to_did from the original RURI is being blown away with<br>
        &#39;sip:mod_sofia&#39;<br>
<br>
        Question is.. what do I need to do to get the 486 logged, but<br>
        to have the right did in the record.. right now I use $oU.<br>
        Maybe a revert_uri? (am I making that up?)<br>
<br>
<br>
        Here&#39;s the 486 from my upstream:<br>
<br>
<br>
        U <a href="http://5.6.239.142:5060" target="_blank">5.6.239.142:5060</a> &lt;<a href="http://5.6.239.142:5060" target="_blank">http://5.6.239.142:5060</a>&gt;<br>
        &lt;<a href="http://5.6.239.142:5060" target="_blank">http://5.6.239.142:5060</a>&gt; -&gt; <a href="http://1.2.204.8:5060" target="_blank">1.2.204.8:5060</a><br></div>
        &lt;<a href="http://1.2.204.8:5060" target="_blank">http://1.2.204.8:5060</a>&gt; &lt;<a href="http://1.2.204.8:5060" target="_blank">http://1.2.204.8:5060</a>&gt;<div class="im"><br>
<br>
<br>
        SIP/2.0 486 Busy Here.<br>
<br>
        Via: SIP/2.0/UDP 1.2.204.8;branch=z9hG4bK5a3.473e0af1.0.<br>
<br>
        Via: SIP/2.0/UDP<br>
        2.3.72.138:5060;received=2.3.72.138;branch=z9hG4bK0bf20a91;rport=5060.<br>
<br>
        From: &quot;<a href="http://custdomain.com" target="_blank">custdomain.com</a> &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt;<br>
        &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt;&quot; &lt;sip:<a href="http://custdomain.com" target="_blank">custdomain.com</a><br></div>
        &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt; &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt;@<a href="http://2.3.72.138" target="_blank">2.3.72.138</a><br>


        &lt;<a href="http://2.3.72.138" target="_blank">http://2.3.72.138</a>&gt; &lt;<a href="http://2.3.72.138" target="_blank">http://2.3.72.138</a>&gt;&gt;;tag=as0e9ef59a.<div class="im"><br>
<br>
        To: &lt;<a href="mailto:sip%3A5212324399441@1.2.204.8" target="_blank">sip:5212324399441@1.2.204.8</a><br>
        &lt;mailto:<a href="mailto:sip%253A5212324399441@1.2.204.8" target="_blank">sip%3A5212324399441@1.2.204.8</a>&gt;<br>
        &lt;mailto:<a href="mailto:sip%253A5212324399441@1.2.204.8" target="_blank">sip%3A5212324399441@1.2.204.8</a><br></div>
        &lt;mailto:<a href="mailto:sip%25253A5212324399441@1.2.204.8" target="_blank">sip%253A5212324399441@1.2.204.8</a>&gt;&gt;&gt;;tag=BeZcHaUmX1D8Q.<div class="im"><br>
<br>
        Call-ID: <a href="mailto:29728c50765bdc3275a6bd375a6508b1@2.3.72.138" target="_blank">29728c50765bdc3275a6bd375a6508b1@2.3.72.138</a><br>
        &lt;mailto:<a href="mailto:29728c50765bdc3275a6bd375a6508b1@2.3.72.138" target="_blank">29728c50765bdc3275a6bd375a6508b1@2.3.72.138</a>&gt;<br>
        &lt;mailto:<a href="mailto:29728c50765bdc3275a6bd375a6508b1@2.3.72.138" target="_blank">29728c50765bdc3275a6bd375a6508b1@2.3.72.138</a><br>
        &lt;mailto:<a href="mailto:29728c50765bdc3275a6bd375a6508b1@2.3.72.138" target="_blank">29728c50765bdc3275a6bd375a6508b1@2.3.72.138</a>&gt;&gt;.<br>
<br>
<br>
        CSeq: 103 INVITE.<br>
<br>
        User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-12911.<br>
<br>
        Accept: application/sdp.<br>
<br>
        Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE,<br>
        SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH.<br>
<br>
        Supported: timer, precondition, path, replaces.<br>
<br>
        Content-Length: 0.<br>
<br>
        .<br>
<br>
<br>
<br>
        U <a href="http://2.3.72.138:5060" target="_blank">2.3.72.138:5060</a> &lt;<a href="http://2.3.72.138:5060" target="_blank">http://2.3.72.138:5060</a>&gt;<br>
        &lt;<a href="http://2.3.72.138:5060" target="_blank">http://2.3.72.138:5060</a>&gt; -&gt; <a href="http://1.2.204.8:5060" target="_blank">1.2.204.8:5060</a><br></div>
        &lt;<a href="http://1.2.204.8:5060" target="_blank">http://1.2.204.8:5060</a>&gt; &lt;<a href="http://1.2.204.8:5060" target="_blank">http://1.2.204.8:5060</a>&gt;<div class="im"><br>
<br>
<br>
        ACK sip:mod_sofia@63.211.239.143:5060;transport=udp SIP/2.0.<br>
<br>
        Via: SIP/2.0/UDP 2.3.72.138:5060;branch=z9hG4bK0bf20a91;rport.<br>
<br>
        Route:<br>
        &lt;sip:1.2.204.8;lr=on;did=bf5.880cbc94&gt;,&lt;sip:5.6.239.142;lr=on;ftag=as0e9ef59a&gt;.<br>
<br>
        Max-Forwards: 70.<br>
<br>
        From: &quot;<a href="http://custdomain.com" target="_blank">custdomain.com</a> &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt;<br></div><div class="im">
        &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt;&quot; &lt;sip:<a href="http://custdomain.com" target="_blank">custdomain.com</a><br></div>
        &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt; &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt;@<a href="http://2.3.72.138" target="_blank">2.3.72.138</a><br>


        &lt;<a href="http://2.3.72.138" target="_blank">http://2.3.72.138</a>&gt; &lt;<a href="http://2.3.72.138" target="_blank">http://2.3.72.138</a>&gt;&gt;;tag=as0e9ef59a.<div class="im"><br>
<br>
        To: &lt;<a href="mailto:sip%3A5212324399441@1.2.204.8" target="_blank">sip:5212324399441@1.2.204.8</a><br>
        &lt;mailto:<a href="mailto:sip%253A5212324399441@1.2.204.8" target="_blank">sip%3A5212324399441@1.2.204.8</a>&gt;<br>
        &lt;mailto:<a href="mailto:sip%253A5212324399441@1.2.204.8" target="_blank">sip%3A5212324399441@1.2.204.8</a><br></div>
        &lt;mailto:<a href="mailto:sip%25253A5212324399441@1.2.204.8" target="_blank">sip%253A5212324399441@1.2.204.8</a>&gt;&gt;&gt;;tag=BeZcHaUmX1D8Q.<div class="im"><br>
<br>
        Contact: &lt;sip:<a href="http://custdomain.com" target="_blank">custdomain.com</a> &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt;<br></div><div class="im">
        &lt;<a href="http://custdomain.com" target="_blank">http://custdomain.com</a>&gt;@<a href="http://2.3.72.138" target="_blank">2.3.72.138</a> &lt;<a href="http://2.3.72.138" target="_blank">http://2.3.72.138</a>&gt;<br>

</div><div class="im">
        &lt;<a href="http://2.3.72.138" target="_blank">http://2.3.72.138</a>&gt;&gt;.<br>
<br>
        Call-ID: <a href="mailto:29728c50765bdc3275a6bd375a6508b1@2.3.72.138" target="_blank">29728c50765bdc3275a6bd375a6508b1@2.3.72.138</a><br>
        &lt;mailto:<a href="mailto:29728c50765bdc3275a6bd375a6508b1@2.3.72.138" target="_blank">29728c50765bdc3275a6bd375a6508b1@2.3.72.138</a>&gt;<br></div><div class="im">
        &lt;mailto:<a href="mailto:29728c50765bdc3275a6bd375a6508b1@2.3.72.138" target="_blank">29728c50765bdc3275a6bd375a6508b1@2.3.72.138</a><br></div><div class="im">
        &lt;mailto:<a href="mailto:29728c50765bdc3275a6bd375a6508b1@2.3.72.138" target="_blank">29728c50765bdc3275a6bd375a6508b1@2.3.72.138</a>&gt;&gt;.<br>
<br>
<br>
        CSeq: 103 ACK.<br>
<br>
        User-Agent: SS.<br>
<br>
        Content-Length: 0.<br>
<br>
<br>
<br>
<br>
        ------------------------------------------------------------------------<br>
<br>
        _______________________________________________<br>
        Users mailing list<br></div>
        <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a> &lt;mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>&gt;<div class="im"><br>
        <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
         <br>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div>