Now I'm getting the forward reason. But still there's problem with CDR.
I have set onreply avp bymodparam("tm", "onreply_avp_mode", 1)
I've set following in onreply routeif($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/");
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.
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");
}
}
Any advice how to forward the details to next call leg?On Tue, Jul 22, 2008 at 3:59 PM, Ruchir <ruchir.lists@gmail.com> wrote:
I tried this but no luck. I'm storing avp in onreply route. That avp is set in radius_extra param.On Mon, Jul 21, 2008 at 10:32 PM, Bogdan-Andrei Iancu <bogdan@voice-system.ro> wrote:
Ruchir wrote:The AVP will not be visible in a different transaction (for another invite). The AVP will be present only when doing acc for the transaction you set the AVP for.
I added "modparam("tm", "onreply_avp_mode", 1)" in config file. I've stored the diversion header in reply route using following code.
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 ");
}
But I always get NUll value in $avp(s:src_user_reply) when I check in script when new invite arrives.
Regards,
Bogdan
Users@lists.openser.org <mailto:Users@lists.openser.org>
On Mon, Jul 21, 2008 at 1:48 PM, Bogdan-Andrei Iancu <bogdan@voice-system.ro <mailto:bogdan@voice-system.ro>> wrote:
Hi Ruchir,
You may try the following approach:
1) in onreply_route, if 3xx, store the info from the reply in an
AVP (be sure an enable onreply_avp_mode -
http://www.openser.org/docs/modules/1.3.x/tm.html#AEN313)
2) in failure route, if the 3xx was selected as final response,
use the AVP for extra accouting.
regards,
Bogdan
Ruchir wrote:
I'm using uac_redirect module to handle redirect and
accounting from openser. Redirect works fine so as cdr but I'm
not getting how to write redirect reason in cdr. I didn't find
any way to find and store redirect reason(call forward, busy,
no answer) in CDR. Does anyone know how to do it?
------------------------------------------------------------------------
_______________________________________________
Users mailing list