When ProSBC passes the Invite to Stir/Shaken service provider (e.g. ClearIP, Neustar), in the 302 returned message, it will keep only the basic hearders and parameters.
Meaning, some specific parameters, e.g. cic, trgp, rn, npdi, calling_noa, callled_noa, trunk-context…
Also in the 302 message, it will replace the original contact number (normall it is the same as the From number in the Inivte) with the called number, which causes a confusion/wrong number in the Diversion header of the next Inivte from ProSBC.
So this script is to
- Reserve all the original headers/parameters of the inbound Invite
- Send the call to the Stir/Shaken service provider to get the token/signing
- Match the routes by the TGRP value from the source Invite
- Pass all the reserved original headers/parameters to the outbound Invites along with the token/signing.
To use these filters, add the following lines to main script (simple_routing.rb)
require ‘process_ruri_tgrp’
include ProcessRuriTgrp
before_filter :method => :process_ruri_tgrp
Add NAP columns: send_clearip_flag with YES|NO
Add NAP columns: tgrp with Value like “TG999”