[Spce-user] Inbound Rewrite Rule for Callee - strip characters in dialed numbers

Barry Flanagan barry at flanagan.ie
Tue Sep 26 08:54:15 EDT 2017


 On 26 September 2017 at 13:43, Matthias Hohl <matthias.hohl at telematica.at>
wrote:

> Hello Barry,
>
>
>
> can you explain your workarround more?
>

It basically strips out any strange characters from the request user, which
is what you asked for.


> Is this a valid method to do this?
>

Valid, in that it works.

How does sipwise themself handle this problem?
>

They don't which is why you have the problem you do. Generally this would
get done on the UA side.

Is this maybe also fixed in the new LTS mr5 release?
>

I really don't know, sorry.

-Barry


>
> Thank you.
>
>
>
> *Von:* Barry Flanagan [mailto:barry at flanagan.ie]
> *Gesendet:* Dienstag, 26. September 2017 10:12
> *An:* Matthias Hohl <matthias.hohl at telematica.at>
> *Cc:* Spce-user <Spce-user at lists.sipwise.com>
> *Betreff:* Re: [Spce-user] Inbound Rewrite Rule for Callee - strip
> characters in dialed numbers
>
>
>
> On 26 September 2017 at 07:44, Matthias Hohl <matthias.hohl at telematica.at>
> wrote:
>
> Hello...
>
>
>
> Has anyone an idea, how to solve this?
>
>
>
> Thank you
>
>
> Am 13.09.2017 um 15:52 schrieb Matthias Hohl <matthias.hohl at telematica.at
> >:
>
> Hello,
>
>
>
> we have sometimes the problem, that customers dial a number with letters
> or characters like „.“ Or „-„ or „/“ in it.
>
> This stops rate-o-mat, so we need to rewrite the dialed number to strip
> out this characters.
>
>
>
> Like: [^0-9]  =>  „“
>
>
>
> You could use something like:
>
>
>
>         if(is_method("INVITE"))
>         {
>                 $rU = $(rU{re.subst,/^(\+)?[:blank:]?\(?([0-9]*)\)?[
> -.]?\(?([0-9]*)\)?[ -.]?\(?([0-9]*)\)?[ -.]?\(?([0-9]*)\)?[
> -.]?\(?([0-9]*)\)?$/\1\2\3\4\5\6/});
>                 xlog("L_NOTICE", "Consume spec chars in RURI - '$rU' - [%
> logreq_init -%]\n");
>         }
>
>
>
>
>
> ..in your templates/etc/kamailio/proxy/kamailio.cfg.customtt.tt2
>
>
>
> Hope this helps.
>
>
>
> -Barry Flanagan
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20170926/3b50fffd/attachment.html>


More information about the Spce-user mailing list