<div dir="ltr">Now I'm getting the forward reason. But still there's problem with CDR.<br>I have set onreply avp by<br><pre class="PROGRAMLISTING"></pre><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><pre class="PROGRAMLISTING"><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><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></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><pre class="PROGRAMLISTING"></pre>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>
Any advice how to forward the details to next call leg?<br><br><div class="gmail_quote">On Tue, Jul 22, 2008 at 3:59 PM, Ruchir <<a href="mailto:ruchir.lists@gmail.com">ruchir.lists@gmail.com</a>> 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 tried this but no luck. I'm storing avp in onreply route. That avp is set in radius_extra param.<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Mon, Jul 21, 2008 at 10:32 PM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>> 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>Ruchir wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I added "modparam("tm", "onreply_avp_mode", 1)" in config file. I've stored the diversion header in reply route using following code.<br>
<br>
if($hdr(Diversion)!=null)<br>
{<br>
avp_delete("$avp(s:src_user_reply)");<br>
$avp(s:src_user_reply) = $hdr(Diversion);<br>
xlog("Client call forwarding to<br>
$avp(s:src_user_reply)\n ");<br>
}<br>
<br>
<br>
But I always get NUll value in $avp(s:src_user_reply) when I check in script when new invite arrives.<br>
</blockquote></div>
The AVP will not be visible in a different transaction (for another invite). The AVP will be present only when doing acc for the transaction you set the AVP for.<br>
<br>
Regards,<br>
Bogdan<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
<br>
On Mon, Jul 21, 2008 at 1:48 PM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>> wrote:<br>
<br>
Hi Ruchir,<br>
<br>
You may try the following approach:<br>
<br>
1) in onreply_route, if 3xx, store the info from the reply in an<br>
AVP (be sure an enable onreply_avp_mode -<br>
<a href="http://www.openser.org/docs/modules/1.3.x/tm.html#AEN313" target="_blank">http://www.openser.org/docs/modules/1.3.x/tm.html#AEN313</a>)<br>
<br>
2) in failure route, if the 3xx was selected as final response,<br>
use the AVP for extra accouting.<br>
<br>
regards,<br>
Bogdan<br>
<br>
Ruchir wrote:<br>
<br>
I'm using uac_redirect module to handle redirect and<br>
accounting from openser. Redirect works fine so as cdr but I'm<br>
not getting how to write redirect reason in cdr. I didn't find<br>
any way to find and store redirect reason(call forward, busy,<br>
no answer) in CDR. Does anyone know how to do it?<br>
------------------------------------------------------------------------<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br></div>
<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a> <mailto:<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a>><div><br>
<a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>