Telcobridges - Session Border Controllers
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Add Attestation-Info, Origination-ID and verstat in SIP headers according to incoming number

Go down

Add Attestation-Info, Origination-ID and verstat in SIP headers according to incoming number Empty Add Attestation-Info, Origination-ID and verstat in SIP headers according to incoming number

Post by lmorissette Mon Dec 18, 2023 3:39 pm

This script will add three SIP headers in the outgoing SIP Invites for stir/shaken cases

A. Add Header "Attestation-info"
Attestation-Info: A or B depending on the calling numbers
Will read from "calling_list.csv" file - if the number is present: A, otherwise B

B. Add  "verstat" in FROM header   (Added in sip_header_params script)
SIP-URI : From : "0123456789"sip:+123456789;verstat=TN-Validation-Passed@domain.com;user=phone;tag=abcdefghijk

C. Add Header "origination-ID" :
Origination-ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx



How to use
1. Load add_sip_attestation.rb script:
  Gateway -> Routing Scripts -> Import Script File
    File: add_sip_attestation.rb
    ScriptType: Customer
    Load at Startup: [unchecked]
2. Edit main script in 3 places (maybe simple_routing.rb):
 require 'add_sip_attestation'
 require 'sip_header_params' unless defined?(SipHeaderParams)

 include AddSIPAttestation
 include SipHeaderParams

 before_filter :method => :add_sip_attestation

 after_remap_filter :method => :sip_header_params, :headers_to_add => [
                {
                  :documentation  => "Add verstat to user parameters of most SIP headers",
                  :type           => :user_param,
                  :contents       => "verstat=TN-Validation-Passed",
                  :sip_headers    => [
                    :calling
                  ]
                  },
       ]  

3. Add CSV file with one column named "calling"
 Import file calling_list.csv: File DB -> Custom Files -> Import new file

lmorissette

Number of Messages : 43
Point : 85
Registration Date : 2017-11-27

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum