[Spce-user] Rewrite rules

Dejan Kurel dkurel at cryptotel.com
Wed Apr 27 13:29:19 EDT 2011


try this:

Match exp: ^46([1-9][0-9]\d+)$  Replace with: 0\1

That should do the trick.

Dejan



On 04/27/2011 09:39 AM, VoiceTech | Oskar Krigh wrote:
> Hi
> I have a problem with rewriting outgoing from headers. Hope this make sense.
>
> ----
>
> The log shows me this:
> INFO:<script>: First caller CLI '46470590190' found
> INFO:<script>: Applying caller-out domain rewrite rules to first caller CLI using dpid '3'
> INFO:<script>: No matching rewrite rules for '46470590190' found
> INFO:<script>: Set caller CLI '46470590190<sip:46470590190 at sip.something.se>'
>
> ----
>
> The rule with dpid 3 looks like this:
> +----+------+----+----------+-------------------+-----------+-------------------+----------+-------+
> | id | dpid | pr | match_op | match_exp         | match_len | subst_exp         | repl_exp | attrs |
> +----+------+----+----------+-------------------+-----------+-------------------+----------+-------+
> | 15 |    3 | 50 |        1 | ^46([1-9][0-9]+)$ |         0 | ^46([1-9][0-9]+)$ | 0\1      |       |
> | 16 |    3 | 51 |        1 | ^([1-9][0-9]+)$   |         0 | ^([1-9][0-9]+)$   | 00\1     |       |
> +----+------+----+----------+-------------------+-----------+-------------------+----------+-------+
>
> ----
>
> What i want to do is to rewrite the from header, and take away 46 and replace it with a 0. The rules are taken from the handbook.
>
> I have tried alot of other rules too, but it seems like none of them are applied.
> Do i have to enalbe something that is not enabled out of the box to make this work?
>
>
> /Oskar
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user





More information about the Spce-user mailing list