2009/6/24 Carlo Dimaggio <jaasmail...@gmail.com>:
> Hi Iñaki,
>
> My aim is a little bit different because I want to handle a simple cfu
> directly from opensips (without a 302 from client).

No problem.


> I don't understand very well how CDRTool bill the call diversion in this
> case (maybe is not possible?)
> In the opensips.cfg now I have:

As Adrian already suggested: by setting an appropiate value for an AVP
which will be mapped to Radius UserName field (billing username). Or
well, if you set Billing-Party it has preference.


> modparam("acc", "radius_extra", "User-Name=$Au; Calling-Station-Id=$from;
> Called-Station-Id=$to; Sip-Translated-Request-URI=$ruri; [...]
> Canonical-URI=$avp(s:can_uri); Billing-Party=$avp(s:billing_party)
>
>        # Simple test for unconditional call forward
>        $avp(s:callfwd)="sip:00390212...@sip.clio.it";
>        avp_pushto("$ru", "$avp(s:callfwd)");
>        $avp(s:divert_reason)="cfu";
>        $avp(s:billing_party)=$tu;

This is NOT secure at all, please NEVER rely on the To header as the
caller could generate an spoofed INVITE with To different than the
RURI.
Instead, store the original RURI in some AVP and use it to set
$avp(s:billing_party).


>        xlog ("L_INFO", "TEST Forward - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>
>
> The result is that radius request is (for 1000 to 1001 diverted to
> 00390212345):
>
> Wed Jun 24 11:59:29 2009
>        Acct-Status-Type = Start
>        Service-Type = Sip-Session
>        Sip-Response-Code = 200
>        Sip-Method = Invite
> [...]
>        User-Name = "1...@sip.clio.it"
>        Calling-Station-Id = "sip:1...@sip.clio.it:5060"
>        Called-Station-Id = "sip:1...@sip.clio.it:5060"
>        Sip-Translated-Request-URI = "sip:00390212...@10.0.1.44"
> [...]
>        Canonical-URI = "sip:00390212...@sip.clio.it"
>        Billing-Party = "sip:1...@sip.clio.it:5060"
>        Divert-Reason = "cfu"
> [...]

As you see,  Billing-Party = "sip:1...@sip.clio.it:5060"
Isn't it what you desire?



-- 
Iñaki Baz Castillo
<i...@aliax.net>

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to