[Serusers] Cisco like translation rules in SER.

Greg Fausak lgfausak at gmail.com
Mon Aug 7 21:26:18 CEST 2006


naptr (enum_query) will handle these sorts of rewrites (I think).
it is especially suited for matching the longer patterns first.

e.g.

e164.testdomain.com, naptr record

host:
7.6.0.3.3.0.0
zone:
e164.testdomain.com
rule:
!^0033067(.*)$!sip:6700\1 at testdomain.com!

-g


On 8/6/06, Jiri Kuthan <jiri at iptel.org> wrote:
> perhaps the lcr module brings you further, but I have never tried it. -jiri
>
> At 15:08 01/08/2006, Robert Zorop wrote:
> >Hi all , I want to recall on this.
> >
> >Does anyone facing this problem? . I have to translate destination numbers based on rules (>5000).
> >
> >Every destination prefix needs to be translated in a diferent way. ie.
> >
> >0033067xxxxxxx ----> 6700xxxxxxx
> >00330543xxxxxx ----> 54300xxxxxx
> >
> >basicaly i need to country Code (00330) and replace it by Area code (wich is variable 67, or 543 in this example.) plus destination number.
> >
> >For this i was thinking storing these patterns in a DB table. But i really need some help if someone can drop me a line on how to implement such thing.
> >
> >Thanks in advance.
> >
> >
> >
> >2006/7/30, Robert Zorop <<mailto:rzorop at gmail.com>rzorop at gmail.com>:
> >Hi, i was thinking about looking up destination prefixes in a bd table, and then if the prefix matches the request uri, translate it to what a second column indicates.
> >
> >Lets say.
> >
> >Prefixes Table:
> >| Prefix  | Translated prexif |
> >| 00657 |  0034657            |
> >| 00345 |  0453455            |
> >
> >Can u drop me a line on how can someone implement this king of match/replacement for values in SER? .
> >
> >Thanks a lot.
> >
> >
> >
> >2006/7/26, Jiri Kuthan <<mailto:jiri at iptel.org>jiri at iptel.org>:
> >There is a buch of commands you can use for uri maniputlation: strip, prefix, subst_uri.
> >
> >-jiri
> >
> >At 15:52 25/07/2006, Robert Zorop wrote:
> >>Hi guys.
> >>       I'd like to hear about different methods of implementing cisco like transtation rules in SER. I was thinking about AVPs, but still couldn't find the ight way.
> >>       Is someone is doing it inside or outside ser, please shed a light on this!.   What i need is to stip some numbers, and then add some other (variables) before proxying the calls.
> >>
> >>
> >>Thanks in advance.
> >>
> >>_______________________________________________
> >>Serusers mailing list
> >><mailto:Serusers at lists.iptel.org>Serusers at lists.iptel.org
> >> http://lists.iptel.org/mailman/listinfo/serusers
> >
> >--
> >Jiri Kuthan             <http://iptel.org/~jiri/>http://iptel.org/~jiri/
> >
> >
> >
> >
> >
> >_______________________________________________
> >Serusers mailing list
> >Serusers at lists.iptel.org
> >http://lists.iptel.org/mailman/listinfo/serusers
>
> --
> Jiri Kuthan            http://iptel.org/~jiri/
>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>


-- 
Greg Fausak
greg at thursday.com



More information about the sr-users mailing list