<div dir="ltr">Hi Bogdan,<br><br>That works! Thank you very much for your help.<br><br><div class="gmail_quote">On Thu, Aug 21, 2008 at 5:07 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">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;">I would suggest the following scenario:<br>
- use onreply_route to get the type of diversion ; be sure to enable the onreply_avp_mode (<a href="http://www.opensips.org/html/tm.html#id2560594" target="_blank">http://www.opensips.org/html/tm.html#id2560594</a>)<br>
- set the actual src/dst for the new set in failure route when you create the new branch; the AVPs you set in onreply_route will be visible here.<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 class="Ih2E3d">
<br>
Oh I see. Then how we can get correct leg source, leg destination<br>
& forwarding reason?<br>
<br>
<br>
On Thu, Aug 21, 2008 at 3:50 PM, Bogdan-Andrei Iancu<br></div><div><div></div><div class="Wj3C7c">
<<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>
I see in the onreply_route you get the diversion type<br>
(src_user_reply).<br>
Also you try to populate the src avp, but as in onreply_route<br>
a reply is processed, the $rU will not work - there is no RURI<br>
in a reply.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Ruchir wrote:<br>
<br>
I'm populating it from onreply route. Below is my onreply<br>
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<br>
$avp(s:src_user_reply)\n ");<br>
avp_subst("$avp(s:src_user_reply)",<br>
"/(.*)<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>
<br>
<br>
</div></div></blockquote>
<br>
</blockquote></div><br></div>