[OpenSIPS-Users] Pass calls to another realm via gateway

Alexander goal81 at gmail.com
Mon Nov 2 14:16:34 CET 2009

  Thanks for advice, but I want to change something like this:

  From: "Some user" <sip:xxxxxx at domain.com <sip%3Axxxxxx at domain.com>>


  From: sip:xxxxxx at domain.com <sip%3Axxxxxx at domain.com>

  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 <ibc at aliax.net>

> El Lunes, 2 de Noviembre de 2009, Alexander escribió:
> > subst("/^From: \".+\" (<sip: *[a-zA-Z0-9_\.-]+ at .*>)/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:alice at domain.org <sip%3Aalice at domain.org>;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 <ibc at aliax.net>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20091102/d5cfbd41/attachment.htm 

More information about the Users mailing list