<div dir="ltr">I've set avp and radius_extra param properly. If I handle call forwarding from server side, everything works fine. I get leg source, destination, forward reason, etc. perfectly. The problem is there only when I do call forwarding from phone. <br>
<br><div class="gmail_quote">On Fri, Aug 8, 2008 at 8:08 PM, Pablo Hernan Saro <span dir="ltr"><<a href="mailto:pablosaro@gmail.com">pablosaro@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">I believe that it's not about how OpenSER or OpenSIPS implements multi-leg accounting, it's about how you do.<br>Particularly how you set up two important parameters for the acc module: multi_leg_info and db_extra. In my case, I set up one avp for source leg, another for destination leg and two avps for extra information: the state of the call and a classification of the dst.<br>
The "state of the call", for me, means when it's a call, a fw or whatever; while the "classification of the dst" means if dst is national, long distance, international.<br>So, you have to set up avps as the information you need and make sure to set it to proper values before the acc module writes the row in your db.<br>
BTW, take care of using Diversion header... It's a draft from 2004 and it's expired. Not all UAC/UAS has this implemented.<br>I hope it helps.<br>Cheers<br><br>Pablo<br><br><br><div class="gmail_quote"><div><div>
</div><div class="Wj3C7c">On Fri, Aug 8, 2008 at 4:05 AM, Ruchir <span dir="ltr"><<a href="mailto:ruchir.lists@gmail.com" target="_blank">ruchir.lists@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c"><div dir="ltr">I'm using uac_redirect module to handle redirect from UA and doing accounting from
openser. Redirect works fine so as cdr but I'm not able to store CDR records for multi-leg accounting properly. <br><br>I have set onreply avp by<div><br><blockquote><font size="2"><span style="font-family: arial,sans-serif;">modparam("tm", "onreply_avp_mode", 1)</span></font><br style="font-family: arial,sans-serif;">
</blockquote></div><pre><font size="2"><br><font face="arial,sans-serif"><font size="2">I've set following in onreply route<br><br></font></font></font></pre><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<font size="2"><font face="arial,sans-serif"><font size="2">if($hdr(Diversion)!=null)</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">        {</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">                avp_delete("$avp(s:src_call_type)");</font></font></font><br>
<font size="2"><font face="arial,sans-serif"><font size="2">                $avp(s:src_call_type) = $hdr(Diversion);</font></font></font><div><br><font size="2"><font face="arial,sans-serif"><font size="2">                xlog("Client call forwarding to $avp(s:src_user_reply)\n ");</font></font></font></div>
</blockquote>
<div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">avp_subst("$avp(s:src_user_reply)", "/(.*)<sip:(.*)@(.*)>;reason=(.*)/\4/"); <br>
</blockquote></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><br><font size="2"><font face="arial,sans-serif"><font size="2">                                </font></font></font><br>
<font size="2"><font face="arial,sans-serif"><font size="2">                switch($avp(s:src_call_type))</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">                {</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">                        case "unconditional":</font></font></font><br>
<font size="2"><font face="arial,sans-serif"><font size="2">                                $avp(s:call_type) = "cwfd";</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">                                break;</font></font></font><br>
<font size="2"><font face="arial,sans-serif"><font size="2">                        case "user-busy":</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">                                $avp(s:call_type) = "cwfdbusy";</font></font></font><br>
<font size="2"><font face="arial,sans-serif"><font size="2">                                break;</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">                        case "no-answer":</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">                                $avp(s:call_type) = "cwfdnoanswer";</font></font></font><br>
<font size="2"><font face="arial,sans-serif"><font size="2">                                break;</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">                        default:</font></font></font><br><font size="2"><font face="arial,sans-serif"><font size="2">                                log("no forwarding\n");</font></font></font><br>
<font size="2"><font face="arial,sans-serif"><font size="2">                }</font></font></font><br><br><font size="2"><font face="arial,sans-serif"><font size="2">        }</font></font></font><br style="font-family: arial,sans-serif;"><br>
</blockquote>But the problem is that records are not
generated the way we expect and the way it works in normal forwarding
using usr_preferences. For example call is forwarded from one user to
another, the first leg of the call should be logged as it should
normally be($fU in leg source, $rU in leg destination &
calltype=call) and in next cdr log, it should log with forwarding
details(Forwarding user in leg source, forwarded user in leg
destination & calltype=cfwd). But it actually generates 5 records(1
failed invite, 2 ok invites & 2 byes, instead of 2 invites & 2
byes) of the call. Also as we set calltype and leg source in onreply
route, it'll store that date for the first leg of the CDR which should
not happen.<br><br>Is the same limitation is there in OpenSIPS or it has better uac_redirect module?<br><br>I'll consider switching to OpenSIPS if it solves this issue.<br></div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><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></blockquote></div><br></div>
</blockquote></div><br></div>