[OpenSIPS-Users] multi-leg accounting in case of redirect

Ruchir ruchir.lists at gmail.com
Thu Aug 21 13:32:59 CEST 2008


On Thu, Aug 21, 2008 at 4:59 PM, Ruchir <ruchir.lists at gmail.com> 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> 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/20080821/6112e4be/attachment.htm 


More information about the Users mailing list