Hi,
I’m wondering how to use subst_hf() properly.
I’m trying to debug a broken flow by manually rewriting the contact header from
Contact: <sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@10.10.10.12:5090;transport=udp>
to
Contact: <sip:2018092417381900003@81.x.x.x>
by using
$var(ctct) = "<sip:2018092417381900003@81.x.x.x>";
subst_hf("Contact", “/\<.+\>/$var(ctct)\r\n/", "a”);
but the result is
Contact: <sip:2018092417381900003@81.x.x.x>
sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@10.10.10.12:5090;transport=udp
Testing the regex with an external tool appears to match all of the original header, so
I’m wondering why subst_hf doesn’t appear to rewrite the entire header.
Is there something I’m doing wrong?
TIA,
Ben