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

Robert Johnson robert.j at bendtel.com
Tue Jan 29 16:36:44 EST 2019


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.
>>>
>>>
>>>
>>> _______________________________________________
>>> Spce-user mailing list
>>> Spce-user at lists.sipwise.com
>>> https://lists.sipwise.com/listinfo/spce-user
>> _______________________________________________
>> Spce-user mailing list
>> Spce-user at lists.sipwise.com
>> https://lists.sipwise.com/listinfo/spce-user
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user



More information about the Spce-user mailing list