This script is to add customer header params but specifically to have Contact header using the tgrp of the NAP’s column as configured via the webgui.
How to use this script to add tgrp of incoming NAP to the contact header of the outgoing Invite:
1- Add the following lines to main script (simple_routing.rb)
require ‘sip_header_params_add trgp in Contact Header’ unless defined?(SipHeaderParams)
include SipHeaderParams
after_remap_filter :method => :sip_header_params, :headers_to_add => [
{
:documentation => “Add incoming_nap[:tgrp] to Contact and TO/R-URI parameters of SIP headers”,
:type => :user_param,
:contents => “”,
:sip_headers => [
:contact
]
},
]
2- Add NAP column: tgrp with Value like “TG999”