In local Stir-Shaken regulation, ITSP are required to sometimes :
add a custom SIP header in 200 OK replies to incoming INVITEs
log such custom SIP header in 200 OK reply when you receive one in outbound INVITE.
For those curious to know more about this custom header, it would be a Reason header warning the originating SIP endpoint with something like “your call is passing through this time but it bears a mis-formatted Identity header”.
Have you ever heard of something similar (ie controlling 200 OK replies) ?
Could this be done with Asterisk ?
The stir_shaken implementation already has the capability to send the Reason header on the response per RFC8224.
From the stir_shaken.conf.sample file…
[verification]
-- failure_action -----------------------------------------------------
Indicates what will happen to requests that have failed verification.
...
- continue_return_reason -
Continue processing the request but, per RFC8224, send a SIP Reason
header back to the originator in the next provisional response
indicating the issue according to RFC8224. You can use the
STIR_SHAKEN dialplan function to determine whether the request
passed or failed verification and take the action you deem
appropriate.
We don’t currently look for the Reason header in responses however. Please create an Improvement issue for this.