[Users] example for Multi Call-Legs accounting please

Ovidiu Sas sip.nslu at gmail.com
Thu Jun 8 02:14:05 CEST 2006


Rafael,

Here's a basic example:

 - first of all, enable multi Call-Legs accounting:
modparam("acc", "multi_leg_enabled", 1)
modparam("acc", "src_leg_avp_id", 110)
modparam("acc", "dst_leg_avp_id", 111)

 - then whenever is appropriate in your script, populate the avps:
avp_write("<caller_info>", "$avp(i:110)");
avp_write("<callee_info>", "$avp(i:111)");

And just like Andreas pointed out, it is up to you what the
<caller_info> and <callee_info> are.


Hope this helps,
-ovi

On 6/7/06, Andreas Granig <andreas.granig at inode.info> wrote:
> Rafael J. Risco G.V. wrote:
> > Hi
> > I was searching in the entire list archive but there was not a single
> > post about multi call-leg containing a script example to use this
> > module, I need call forwarding (busy/no answer) accounting, please
> > someone help me.
>
> Don't know an example by heart, but basically you have to set both
> source and destination leg AVPs of each pair {AB}, {BC} in a forward
> scenario. So if for example A calls B and B forwards to C, you may set
> the uuid of A as src-leg-avp and the uuid of B as dst-leg-avp for the
> first accounting record, and after you know that B forwards to C, you
> may set the uuid of B as the src-leg-avp and the uuid of C as
> dst-leg-avp of the second accounting record.
>
> For a real-world example, I don't only set the uuid of the UACs, but use
> avp_printf for creating a CSV-style AVPs which include the client's
> uuid, uri, a call-status (if acc-record is a call, an unconditional
> call-forward etc.) along with some additional information, which is
> evaluated by a mediation software for creating proper CDRs.
>
> Hope this helps,
> Andy
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>




More information about the sr-users mailing list