Need to execute some code before and Dial(

WORLDWIDE EMERGENCY
This code needs to be executed before any SIP or PJSIP call destined to the US network, or soon no call will terminate. This is called Stir-Shaken, a new law from the FCC.
If this is not working the whole Vicidial industry will crash, vanish, be gone.
I need some help as to where to call this code as a Gosub from everywhere a Dial is being attempted.
I am also assuming that the caller ID and the Destination Number are in the variables "${CALLERID(num):-10}" "${EXTEN:-11}"
;Dialplan section to execute before any Dial
[strshk]
exten => _X.,1,Set(ARRAY(Token)=${MYSQL_STRSHK(${CALLERID(num):-10},${EXTEN:-11})})
;same=n,Verbose(0,Token ${Token})
;same=n,SIPAddHeader(Identity:${Token}) ;OLD SIP CHANNEL
same=n,Set(PJSIP_HEADER(add,Identity)=${Token}) ; NEW PJSIP CHANNEL
same=n,Return()
This code needs to be executed before any SIP or PJSIP call destined to the US network, or soon no call will terminate. This is called Stir-Shaken, a new law from the FCC.
If this is not working the whole Vicidial industry will crash, vanish, be gone.
I need some help as to where to call this code as a Gosub from everywhere a Dial is being attempted.
I am also assuming that the caller ID and the Destination Number are in the variables "${CALLERID(num):-10}" "${EXTEN:-11}"
;Dialplan section to execute before any Dial
[strshk]
exten => _X.,1,Set(ARRAY(Token)=${MYSQL_STRSHK(${CALLERID(num):-10},${EXTEN:-11})})
;same=n,Verbose(0,Token ${Token})
;same=n,SIPAddHeader(Identity:${Token}) ;OLD SIP CHANNEL
same=n,Set(PJSIP_HEADER(add,Identity)=${Token}) ; NEW PJSIP CHANNEL
same=n,Return()