The real question is, why are you rewriting a Contact header? :-) That
might be what you're really doing wrong ...
On Mon, Sep 24, 2018 at 05:54:04PM +0100, Ben Hood wrote:
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
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web:
http://www.evaristesys.com/,
http://www.csrpswitch.com/