[OpenSIPS-Users] Forking accounting

ibrahim tunali ibrahimtunali at gmail.com
Thu Feb 12 16:52:44 CET 2009


Hi Bogdan,

I have to use multileg accounting because my application records all
request leg to acc. I use mentioned issue for this scenario;

1. DID call come to my opensips and it add to multileg.
$avp(s:src_leg)=$fU; $avp(s:dst_leg)=$rU;
2. The user owner of the DID was set callforwarding to a few pstn destination.
3. I load these destinations to branch with "avp_pushto("$ru","$avp(s:fwd)/g");"
4. I had set dst_leg from on branch route;
branch_route[1]{
    $avp(s:dst_leg)=$rU;
}

I need to see only wining branch call in acc;

Method   src_leg        dst_leg
----------    ----------        -----------
INVITE    1925XXXXXX 1212XXXXXXXX (DID num)
INVITE    111              1707XXXXXXXX (CallFwd wining branch)

But i see;

Method   src_leg        dst_leg
----------    ----------        -----------
INVITE    1925XXXXXX 1212XXXXXXXX (DID num)
INVITE    111              1707XXXXXXXX (CallFwd branch1)
INVITE    111              1707AAAAAA (CallFwd branch2)
INVITE    111              1707BBBBBB (CallFwd branch3)

Best Regards,
Ibrahim TUNALI




On Thu, Feb 12, 2009 at 17:01, Bogdan-Andrei Iancu
<bogdan at voice-system.ro> wrote:
>
> Hi ibrahim,
>
> For paralel forking you do not need multi-leg accounting.  TM will select the wining branch (the one that picked up) and acc will use for accounting the wining branch. So you do not have to do anything about this.
>
> Regards,
> Bogdan
>
> ibrahim tunali wrote:
>>
>> Hello,
>>
>> I am dealing with branch routing and multiple leg accounting. I would like to forward call to several PSTN destinations. I want to account the certainly which one get the call
>>
>> I set destination leg avp with below;
>>
>> branch_route[1]{
>>     $avp(s:dst_leg)=$rU;
>> }
>>
>> The Avp has a few values with branch request username so final response will create a few Acc rows.
>>
>> I need to know the winning branch's request username and delete the rest values of dst_leg avp. Please give me an advise how to handle accounting at forking.
>>
>> Another question; When acc records insert to DB for INVITE request, before or after on_reply_route ?
>>
>> Best Regards,
>>
>> Ibrahim TUNALI
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>



More information about the Users mailing list