Colin,
I don't see a way to do that, either, but you could just pass in the whole SIP message ($mb) to the API and decode the headers on the API backend side.
Example:
if(is_method("OPTIONS")) { xlog("L_ERR", "Message buffer = $mb\n"); ... }
sasha@peacock:~$ sipsak -T -s sip:s@10.150.20.6 warning: IP extract from warning activated to be more informational 0: ?? (4.852 ms) SIP/2.0 483 Too Many Hops (10) 1: ?? (7.730 ms) SIP/2.0 200 OK without Contact header
Jun 26 16:41:52 allegro-4 /usr/local/sbin/kamailio[29268]: [1361911286@127.0.1.1 1] ERROR: Message buffer = OPTIONS sip:s@10.150.20.6 SIP/2.0#015#012Via: SIP/2.0/UDP 127.0.1.1:43150;branch=z9hG4bK.6c27cf6b;rport;alias#015#012From: sip:sipsak@127.0.1.1:43150;tag=512d1df6#015#012To: sip:s@10.150.20.6#015#012Call-ID: 1361911286@127.0.1.1#015#012CSeq: 2 OPTIONS#015#012Contact: sip:sipsak@127.0.1.1:43150#015#012Content-Length: 0#015#012Max-Forwards: 0#015#012User-Agent: sipsak 0.9.6#015#012Accept: text/plain
-- Alex