Thanks for advice, but I want to change something like this: From: "Some user" <sip:[email protected] <sip%[email protected]>>
to: From: sip:[email protected] <sip%[email protected]> We don't need info inside quotation marks, and quotation marks themselves. And my regullar expression does not cut something like "tag=..." and so on, because it does not contain "^" and "$". As I think, it pretty harmless. 2009/11/2 Iñaki Baz Castillo <[email protected]> > El Lunes, 2 de Noviembre de 2009, Alexander escribió: > > subst("/^From: \".+\" (<sip: *[a-za-z0-9_\....@.*>)/From: \1/ig"); > > I don't like it as a From URI could be a TEL or SIPS URI, and the username > part can contain other characters as ;. > Also, using < > is NOT required in a FROM URI, so this would fail if From > is > like: > > From: sip:[email protected] <sip%[email protected]>;tag=qweqweqweqwe > > And the space after "From:" is not required so it could also fail. > > I would do: > > subst("/^From:(.*)/f: \1/ig"); > > > -- > Iñaki Baz Castillo <[email protected]> > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
