[OpenSIPS-Users] opensips dialplan regex

Johan De Clercq Johan at democon.be
Tue Feb 2 16:58:49 EST 2021


if your expression means : any number of digits, then try something like
below:

try ([0-9]*)([A-Z]*)([0-9]*)

replace with \1\3.

Op di 2 feb. 2021 om 17:45 schreef volga629 via Users <
users at lists.opensips.org>:

> Hello Everyone,
> Here are some test result
>
> Feb  3 00:38:46 voice-proxy /usr/sbin/opensips[1337808]: [REQ_ROUTE]
> [INVITE] got incorrect 1506855JMGTJ4566 adjusting...
> Feb  3 00:38:46 voice-proxy /usr/sbin/opensips[1337808]: [REQ_ROUTE]
> [INVITE] new username -> [1506855JMGTJ4566] ~> 1506855
>
> As you see digits on the end got lost.
>
> volga629.
>
> On 2/2/21 11:47 AM, volga629 via Users wrote:
>
> Hello Everyone,
> I am trying clean up with dialplan  any characters from $rU except digits.
> I tried regex rule
>
> Matching Regular Expression
>  ([0-9]*)
>
> Substitution Regular Expression
> ([0-9]*)
>
> Replacement Expression
> \1
>
>
> Example:
> fhgg592199477719hh#
>
> I see that rule match regex, but rewrite is not happening.
>
> Any help thank you.
>
> volga629.
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> 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/20210202/7d950899/attachment-0001.html>


More information about the Users mailing list