[OpenSIPS-Users] multi-leg accounting in case of redirect
Ruchir
ruchir.lists at gmail.com
Wed Sep 3 12:09:43 CEST 2008
Hi Bogdan,
That works! Thank you very much for your help.
On Thu, Aug 21, 2008 at 5:07 PM, Bogdan-Andrei Iancu <bogdan at voice-system.ro
> wrote:
> I would suggest the following scenario:
> - use onreply_route to get the type of diversion ; be sure to enable the
> onreply_avp_mode (http://www.opensips.org/html/tm.html#id2560594)
> - 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.
>
> Regards,
> Bogdan
>
> Ruchir wrote:
>
>>
>> Oh I see. Then how we can get correct leg source, leg destination
>> & forwarding reason?
>>
>>
>> On Thu, Aug 21, 2008 at 3:50 PM, Bogdan-Andrei Iancu
>> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>>
>> Hi Ruchir,
>>
>> I see in the onreply_route you get the diversion type
>> (src_user_reply).
>> 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.
>>
>> Regards,
>> Bogdan
>>
>> Ruchir wrote:
>>
>> I'm populating it from onreply route. Below is my onreply
>> route.
>> if($hdr(Diversion)!=null)
>> {
>> avp_delete("$avp(s:src_user_reply)");
>> $avp(s:src_user_reply) = $hdr(Diversion);
>> xlog("Client call forwarding to
>> $avp(s:src_user_reply)\n ");
>> avp_subst("$avp(s:src_user_reply)",
>> "/(.*)<sip:(.*)@(.*)>;reason=(.*)/\4/");
>> $avp(s:src) = $rU;
>> switch($avp(s:src_user_reply))
>> {
>> case "unconditional":
>> $avp(s:call_type) = "cwfd";
>> break;
>> case "user-busy":
>> $avp(s:call_type) = "cwfdbusy";
>> break;
>> case "no-answer":
>> $avp(s:call_type) = "cwfdnoanswer";
>> break;
>> default:
>> log("no forwarding\n");
>> }
>> xlog("FORWARDING REASON: $avp(s:call_type) \n ");
>>
>> }
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20080903/77977103/attachment.htm
More information about the Users
mailing list