El Lunes, 2 de Noviembre de 2009, Alexander escribió:
>   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.

That's right. However I don't know why a proxy should remove the From display 
name. If you are routing the request to a PSTN gateway and you have UDP size 
issues then it's ok, but if not...


>  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.

I didn't mean that. Instead I meant that your regular expression would work 
for the following From headers:

subst("/^From: \".+\" (<sip: *[a-za-z0-9_\....@.*>)/From: \1/ig");

a) From: sip:[email protected];tag=qweqwe
b) From:<sip:[email protected]>;tag=qweqwe
c) From: <sip:user;[email protected]>;tag=qweqwe
d) From: <tel:+12345678>;tag=qweqwe

a) fails because it doesn't use < >.
b) fails because there is no space between "From:" and SIP URI.
c) fails because there are params in the username part but your regular 
expressión doesn't allow ";" in the username part. Neither other valid symbols 
as ~ are allowed.
d) fails because your regular expression doesn't allow TEL URI's.


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to