I had to deal with an custom header, a bit similar to your case. It may help you.
You'll have to start with init_parser
. Here SIP messages are parsed. Add your own custom function here. Add an element in pjsip_rx_data
and store the result. This information will be passed downstream. Finally implement your stuff here pres_process_rx_notify