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.
--
Telefoon: 088 0100 700
Sales: sales@pocos.nl | Service: servicedesk@pocos.nl
http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel
17097024
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users