On Tuesday 03 March 2015 18:31:13 Alex Balashov wrote:
$var(contact) = $(var(contact){re.subst,/^<(sip:\+?
[0-9]+@.*)>$/\1/});
I would recommend, from a best-practical perspective, not doing this substitution, but instead using transformations[1] to extract the URI. The Contact header is a "name-address pair", so you can extract the URI component this way:
$var(contact) = $(T_rpl($ct){nameaddr.uri});
[Multiple valid reasons.]
Thanks Alex, I'll take your advice on this.
BTW I don't allow client endpoints to do redirects, I only accept this from my redirecters so I'm not concerned about strange headers not handled by my subst.