<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Aug 21, 2008 at 4:59 PM, Ruchir <span dir="ltr"><<a href="mailto:ruchir.lists@gmail.com">ruchir.lists@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">Oh I see. Then how we can get correct leg source, leg destination & forwarding reason?<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Thu, Aug 21, 2008 at 3:50 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</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;">Hi Ruchir,<br>
<br>
I see in the onreply_route you get the diversion type (src_user_reply).<br>
Also you try to populate the src avp, but as in onreply_route a reply is processed, the $rU will not work - there is no RURI in a reply.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
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;"><div>
I'm populating it from onreply route. Below is my onreply route.<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 $avp(s:src_user_reply)\n ");<br>
avp_subst("$avp(s:src_user_reply)", "/(.*)<sip:(.*)@(.*)>;reason=(.*)/\4/");<br>
$avp(s:src) = $rU;<br>
switch($avp(s:src_user_reply))<br>
{<br>
case "unconditional":<br>
$avp(s:call_type) = "cwfd";<br>
break;<br>
case "user-busy":<br>
$avp(s:call_type) = "cwfdbusy";<br>
break;<br>
case "no-answer":<br>
$avp(s:call_type) = "cwfdnoanswer";<br>
break;<br>
default:<br>
log("no forwarding\n");<br>
}<br>
xlog("FORWARDING REASON: $avp(s:call_type) \n ");<br>
<br>
}<br>
</div></blockquote></blockquote></div></div></div></div></blockquote></div><br></div>