[Spce-user] Subscriber to Peer CLI via PAI header

Oleg spce at irg-x.net
Mon Mar 6 07:10:58 EST 2017


Hello,

I'm trying to pass outbound CLI via PAI header: Susbsciber -> Sipwise -> 
Peer. Since both UPN and NPN are initialized by data in the 'From' 
header, the end result is that whatever the user passes in 'From' is set 
into the PAI header.

Begin example

inbound sip:

    from: 100 at sip.somwhere.loc
    upn: 100
    npn: 100

subscriber prefs:

    allowed_clis: 9?????????
    cli: ''
    user_cli: 912345678

result:

   - 100 is rejected by allowed_clis
   - 912345678 is set as upn
   - 100 is set as npn
   - npn is put into PAI header

1. I tried outbound_pai_user=User-Provided-Number, but it didn't work (I 
guess this is for inbound calls Peer -> Sipwise -> Subscriber). 
Moreover, I'd like to avoid doing this.
2. I tried setting 'cli', but then Sipwise sets up NPN to 'cli' always 
(even if UPN does match allowed_clis). Eventually NPN ends up into PAI.

End example


Here is what I'd like to achieve:

   if upn_matches_allowed_cli
         set_pai_to_upn
   else
      set_npn_to_user_cli
      set_pai_to_npn

Namely, accept user's valid input (through From header), but override 
with user_clit (or cli) if user sends junk.

Can this be configured?

Thanks everyone

Oleg



More information about the Spce-user mailing list