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

Matthias Hohl matthias.hohl at telematica.at
Tue Sep 26 08:43:07 EDT 2017


Hello Barry,

 

can you explain your workarround more?

Is this a valid method to do this?

How does sipwise themself handle this problem? 

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

 

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 <mailto: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 <mailto: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/pipermail/spce-user_lists.sipwise.com/attachments/20170926/8aece78d/attachment-0001.html>


More information about the Spce-user mailing list