[Spce-user] Peer Preference 'Outbound PAI-Username Field' - NPN without Country Code

Andrew Pogrebennyk apogrebennyk at sipwise.com
Wed Jan 30 04:15:50 EST 2019


Hi Robert,
that would do the trick but we usually approach it in a different way:
1) leave cli set to cc+ac+sn as it's managed automatically by the
ngcp-panel;
2) in outbound_pai_user peer preference select NPN, this is where your
subscriber's cli value ends up actually;
3) Add rewrite to remove 1 as outbound rewrite rule for Calling party to
the new Rewrite rule set and assign it to your peer.

That way the calling party number can be changed before sending call out
to that peer, but this is actually applied to the UPN and NPN so
can/will affect the From header as well as PAI-username so it might not
be what you want.
In that case you would need to go with your patch or a similar one to
apply a fixed transformation to $var(caller_cli_netprov) at the top of
ROUTE_SET_CALLER_CLI. Because actually cli is copied to that
$var(caller_cli_netprov).

P.S. Just released version mr7.1.1 has a header manipulation rule
constructor in Web UI but this is only included in the PRO and Carrier
editions of NGCP.

BR,
Andrew

On 1/29/19 10:36 PM, Robert Johnson wrote:
> I have found found that $xavp(caller_real_prefs[0]=>cli) contains the
> value I am looking for.
>
>
> This solution seems to accomplish what I'm needing, but I'm wondering
> if anyone with more experience with NGCP would have a better solution?
>
>
> I have made the following modifications to
> /etc/ngcp-config/templates/etc/kamailio/proxy/proxy.cfg.tt2
>
>
>                 if($var(ccli_user) != 0)
>                 {
>                         if($rd == "MY_PEER_DOMAIN")
>                         {
>                                 xlog("L_NOTICE", "BT-RJE-01: Setting
> P-Asserted-Identity for outbound call to peer\n");
>                                 $var(caller_uri) = "sip:" +
> $xavp(caller_real_prefs[0]=>cli) + "@" + $var(ccli_domain);
>                         }
>                         else
>                         {
>                                 $var(caller_uri) = "sip:" +
> $var(ccli_user) + "@" + $var(ccli_domain);
>                         }
>                         ...
>                         append_hf("P-Asserted-Identity:
> <$var(caller_uri)>\r\n");
>                 }
>
>
> On 1/29/19 1:00 PM, Robert Johnson wrote:
>> I have found this[1] page in the archives, which recommended
>> rewriting $var(ccli_user) to a suitable value.
>>
>> I'm fine with doing so, but I'd like to use the value placed in the
>> subscribers cli field. Is there a Pseudo-variable that I can use to
>> directly access the cli parameter?
>>
>>
>>
>> On 1/29/19 9:57 AM, Robert Johnson wrote:
>>> I've gone through the various outbound_pai_user options on the peer
>>> settings, and retested after each change. In every case, I'm seeing
>>> the 1+10D number show up in the PAI header field on our upstream
>>> switch.
>>>
>>> The thing that really strikes me as odd, is that, even when I set
>>> outbound_pai_user = None, I still see 1+10D PAI on the upstream switch.
>>>
>>>
>>> Perhaps outbound_pai_user does nothing at all for peer settings?
>>>
>>>
>>> As another test, I also set the cli attribute to the 10D number on
>>> the subscriber preferences, doing so did not make a difference.
>>>
>>>
>>> On 1/29/19 9:15 AM, Robert Johnson wrote:
>>>> Is there a way to drop the country code from the
>>>> Network-Provided-Number in the PAI field when sending a call to a
>>>> peer?
>>>>
>>>>
>>>> Our upstream switch is unable to identify a subscriber with a
>>>> 1+10-digit PAI.
>>>>




More information about the Spce-user mailing list