[Spce-user] Source CLI billing and redirection with Diversion Header on 4.5.5 with wrong source_cli

Matthias Hohl matthias.hohl at telematica.at
Mon Jan 15 07:22:25 EST 2018


Hello Andrew,

Hmm... i checked the /etc/ngcp-config/templates/etc/kamailio/proxy/proxy.cfg.customtt.tt2 file but I can't find your descriped value "acc_caller_source_cli" or any related to that.

In "ROUTE_ACC_CALLER" there is just this:
Maybe cause I have just 4.5.5 ?

########################################################################
route[ROUTE_ACC_CALLER]
{

	if($avp(s:caller_peer_auth_user) != $null)
	{
		$(avp(s:acc_caller_pau)[*]) = $avp(s:caller_peer_auth_user);
	}
	else
	{
		$(avp(s:acc_caller_pau)[*]) = '';
	}
	if($avp(s:caller_peer_auth_realm) != $null)
	{
		$(avp(s:acc_caller_par)[*]) = $avp(s:caller_peer_auth_realm);
	}
	else
	{
		$(avp(s:acc_caller_par)[*]) = '';
	}
	if($avp(s:from_pstn) == 1)
	{
		$var(gpp) = $xavp(caller_peer_prefs[0]=>gpp0) + "|" +
		            $xavp(caller_peer_prefs[0]=>gpp1) + "|" +
		            $xavp(caller_peer_prefs[0]=>gpp2) + "|" +
		            $xavp(caller_peer_prefs[0]=>gpp3) + "|" +
		            $xavp(caller_peer_prefs[0]=>gpp4) + "|" +
		            $xavp(caller_peer_prefs[0]=>gpp5) + "|" +
		            $xavp(caller_peer_prefs[0]=>gpp6) + "|" +
		            $xavp(caller_peer_prefs[0]=>gpp7) + "|" +
		            $xavp(caller_peer_prefs[0]=>gpp8) + "|" +
		            $xavp(caller_peer_prefs[0]=>gpp9);
	}
	else
	{
		$var(gpp) = $xavp(caller_real_prefs[0]=>gpp0) + "|" +
		            $xavp(caller_real_prefs[0]=>gpp1) + "|" +
		            $xavp(caller_real_prefs[0]=>gpp2) + "|" +
		            $xavp(caller_real_prefs[0]=>gpp3) + "|" +
		            $xavp(caller_real_prefs[0]=>gpp4) + "|" +
		            $xavp(caller_real_prefs[0]=>gpp5) + "|" +
		            $xavp(caller_real_prefs[0]=>gpp6) + "|" +
		            $xavp(caller_real_prefs[0]=>gpp7) + "|" +
		            $xavp(caller_real_prefs[0]=>gpp8) + "|" +
		            $xavp(caller_real_prefs[0]=>gpp9);
	}

	$var(caller_lnp_prefix) = "";
	if(pv_isset("$avp(s:caller_lnp_prefix)"))
	{
		$var(caller_lnp_prefix) = $avp(s:caller_lnp_prefix);
	}
	else if($avp(s:from_pstn) == 1 && pv_isset("$xavp(caller_peer_prefs[0]=>default_lnp_prefix)"))
	{
		$var(caller_lnp_prefix) = $xavp(caller_peer_prefs[0]=>default_lnp_prefix);
	}
	else if($avp(s:from_pstn) == 0 && pv_isset("$xavp(caller_real_prefs[0]=>default_lnp_prefix)"))
	{
		$var(caller_lnp_prefix) = $xavp(caller_real_prefs[0]=>default_lnp_prefix);
	}

	xlog("L_NOTICE", "Setting acc source-leg for uuid '$avp(s:caller_uuid)': '$avp(s:caller_uuid)|$avp(s:acc_caller_user)|$avp(s:acc_caller_domain)|$avp(s:caller_cli_userprov)|$var(caller_ext_subscriber_id)|$var(caller_ext_contract_id)|$var(caller_account_id)|$avp(s:acc_caller_pau)|$avp(s:acc_caller_par)|$avp(s:caller_clir)|$avp(s:acc_state)|$avp(s:caller_ip_val)|$TV(Sn)|$var(gpp)|$var(caller_lnp_prefix)|' - [% logreq -%]\n");
	$avp(i:901) = $_s($avp(s:caller_uuid)|$avp(s:acc_caller_user)|$avp(s:acc_caller_domain)|$avp(s:caller_cli_userprov)|$var(caller_ext_subscriber_id)|$var(caller_ext_contract_id)|$var(caller_account_id)|$avp(s:acc_caller_pau)|$avp(s:acc_caller_par)|$avp(s:caller_clir)|$avp(s:acc_state)|$avp(s:caller_ip_val)|$TV(Sn)|) + $var(gpp) + "|" + $var(caller_lnp_prefix) + "|";
	return;
}

########################################################################

-----Ursprüngliche Nachricht-----
Von: Andrew Pogrebennyk [mailto:apogrebennyk at sipwise.com] 
Gesendet: Montag, 15. Jänner 2018 12:50
An: Matthias Hohl <matthias.hohl at telematica.at>; 'Spce-user' <Spce-user at lists.sipwise.com>
Betreff: Re: [Spce-user] Source CLI billing and redirection with Diversion Header on 4.5.5 with wrong source_cli

Hello,
one thing to try would be to change route[ROUTE_ACC_CALLER] in
proxy.cfg.customtt.tt2:

        # store the network-provided number if both source_user and the user-provided number
        # are anonymous
        $var(acc_caller_source_cli) = $avp(s:caller_cli_userprov);

change that line to
$var(acc_caller_source_cli) = $avp(s:caller_cli_netprov);

Then there will always be NPN in source_cli.

Let us know if it works.
Andrew

On 01/15/2018 12:31 PM, Matthias Hohl wrote:
> Hello again,
> 
>  
> 
> i want to revise my possible solution fix and describe it again: Not 
> the UPRN the accepted “NPN” should be used as “source_cli” for billing:
> 
>  
> 
> IF there is a Diversion Header and the UPRN from this Diversion Header 
> is accepted by SPCE. => “Checking User-provided Redirecting CLI 
> against subscriber aliases”. Then the UPRN number will be used as NPN. It fits here.
> 
> But now this accepted NPN number should also be used as “source_cli”
> number for billing, but currently the “UPN” will be used for this, so 
> my source_cli billing is wrong.
> 
>  
> 
> How can I fix that, that the NPN number as “source_cli” will be used 
> for the billing?
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5532 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20180115/9aba1b30/attachment-0001.p7s>


More information about the Spce-user mailing list