cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
andrewd
New Contributor

Set SIP privacy based on blank PRI calling number

Jump to solution

We are using a 908e to bridge between a PBX and an ITSP. The PBX is connected via PRI and the ITSP is connected via a SIP trunk. When a phone on the PBX is configured to block caller ID, we get a call setup like this:

M - 05 SETUP
         ...
  IE - 6C CALLING PARTY #     Len=2
       00 Numb. Type:UNKNOWN      
          Numb. Plan:UNKNOWN       
       80 Presentation:ALLOWED    
          Ph.#

Unfortunately the PBX is unable to set the Presentation to RESTRICTED. However, the ITSP requires the outgoing call have the Privacy header set to something other than none. Ideally we would have the INVITE to look like:

INVITE sip:8005550123@4.3.2.1:5060 SIP/2.0

From: "Private" <sip:anonymous@4.3.2.1:5060;transport=UDP>;tag=3bbb6c8-7f000001-13c4-715-77cb95df-715

To: <sip:8005550123@4.3.2.1:5060>

Call-ID: 3bfca98-7f000001-13c4-715-7e4307e7-715@4.3.2.1

CSeq: 1 INVITE

Via: SIP/2.0/UDP 1.2.3.4:5060;branch=z9hG4bK-715-1bac7d-45832753

Max-Forwards: 70

Proxy-Require: privacy

Privacy: user

P-Asserted-Identity: <sip:5555550123@4.3.2.1:5060;transport=UDP>

Supported: 100rel,replaces

Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER

User-Agent: ADTRAN_Total_Access_908e_2nd_Gen/A5.03.00.E

Contact: <sip:anonymous@1.2.3.4:5060;transport=UDP>

Instead of what we have now:

INVITE sip:8005550123@4.3.2.1:5060 SIP/2.0

From: <sip:4.3.2.1:5060;transport=UDP>;tag=3bbb6c8-7f000001-13c4-715-77cb95df-715

To: <sip:8005550123@4.3.2.1:5060>

Call-ID: 3bfca98-7f000001-13c4-715-7e4307e7-715@4.3.2.1

CSeq: 1 INVITE

Via: SIP/2.0/UDP 1.2.3.4:5060;branch=z9hG4bK-715-1bac7d-45832753

Max-Forwards: 70

Proxy-Require: privacy

Privacy: none

Supported: 100rel,replaces

Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER

User-Agent: ADTRAN_Total_Access_908e_2nd_Gen/A5.03.00.E

Contact: <sip:1.2.3.4:5060;transport=UDP>

Basically we want the same result described in "Blocking Outbound Caller ID from a PRI in AOS Voice Devices.pdf" only determined by having an empty Calling Party Number rather than Presentation: RESTRICTED.

I tried several ways of doing this including match dnis "" replace ani "anonymous" and setting up two SIP trunks and matching based on ani "", but nothing seems to allow me to match an empty string or replace with a non-numeric string.

Is this doable, and how would I implement it?

Labels (2)
0 Kudos
1 Solution

Accepted Solutions
david
Valued Contributor
Valued Contributor

Re: Set SIP privacy based on blank PRI calling number

Jump to solution

Andrewd,

Unfortunately, these SIP header changes will not be possible with a match and substitute command.  If the PBX cannot send presentation set to RESTRICTED, our only option would be to utilize our HMR feature defined in Manipulating SIP Headers and Messages in AOS.  This feature will allow us to modify SIP headers based on regular expressions.  Since the firmware required for this feature is not available for download on our website yet, you will need to create a normal Technical Support ticket by calling 888-423-8726 and request the current R10 release.

Thanks!

David

View solution in original post

0 Kudos
2 Replies
david
Valued Contributor
Valued Contributor

Re: Set SIP privacy based on blank PRI calling number

Jump to solution

Andrewd,

Unfortunately, these SIP header changes will not be possible with a match and substitute command.  If the PBX cannot send presentation set to RESTRICTED, our only option would be to utilize our HMR feature defined in Manipulating SIP Headers and Messages in AOS.  This feature will allow us to modify SIP headers based on regular expressions.  Since the firmware required for this feature is not available for download on our website yet, you will need to create a normal Technical Support ticket by calling 888-423-8726 and request the current R10 release.

Thanks!

David

0 Kudos
andrewd
New Contributor

Re: Set SIP privacy based on blank PRI calling number

Jump to solution

Thanks David, that's a pretty awesome feature. It did exactly what I needed:

hmr rule-set PrivateWorkaround
   message-rule Rule1 message-type request 10
     match header from match-value /(<sip:)([^@]+)>/
     modify header from position first match-value /(<sip:)([^@]+)>/ new-value "/\x22Anonymous\x22  \1anonymous@\2>/" 10
     modify header contact position first match-value /(<sip:)([^@]+)>/ new-value /\1anonymous@\2>/ 15
     modify header privacy position first new-value /user/ 20