Yeah, I saw $mb as I was browsing through things. I was hoping to not have to re-parse the SIP message in the API since Kamailio has already done that work, and it would require some form of a SIP parser in my API.
As a future feature request, I'll say that I think this would be a helpful addition (possibly even just a function that exports all headers names to an AVP which you can then iterate as you choose). Especially as applications continue to become more dynamic in nature.
For now, I'll probably go the current route of just cherry-picking the headers that I need in my API and pushing those up.
Thanks all!
Best,
Colin