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

Ruchir ruchir.lists at gmail.com
Fri Aug 8 09:05:56 CEST 2008


I'm using uac_redirect module to handle redirect from UA and doing
accounting from openser. Redirect works fine so as cdr but I'm not able to
store CDR records for multi-leg accounting properly.

I have set onreply avp by

modparam("tm", "onreply_avp_mode", 1)


I've set following in onreply route

if($hdr(Diversion)!=null)
> {
> avp_delete("$avp(s:src_call_type)");
>  $avp(s:src_call_type) = $hdr(Diversion);
> xlog("Client call forwarding to $avp(s:src_user_reply)\n ");
>
avp_subst("$avp(s:src_user_reply)", "/(.*)<sip:(.*)@(.*)>;reason=(.*)/\4/");
>
>

>
>  switch($avp(s:src_call_type))
> {
> 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");
>  }
>
> }
>
> But the problem is that records are not generated the way we expect and the
way it works in normal forwarding using usr_preferences. For example call is
forwarded from one user to another, the first leg of the call should be
logged as it should normally be($fU in leg source, $rU in leg destination &
calltype=call) and in next cdr log, it should log with forwarding
details(Forwarding user in leg source, forwarded user in leg destination &
calltype=cfwd). But it actually generates 5 records(1 failed invite, 2 ok
invites & 2 byes, instead of 2 invites & 2 byes) of the call. Also as we set
calltype and leg source in onreply route, it'll store that date for the
first leg of the CDR which should not happen.

Is the same limitation is there in OpenSIPS or it has better uac_redirect
module?

I'll consider switching to OpenSIPS if it solves this issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20080808/91b15897/attachment.htm 


More information about the Users mailing list