<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 26 September 2017 at 07:44, Matthias Hohl <span dir="ltr"><<a href="mailto:matthias.hohl@telematica.at" target="_blank">matthias.hohl@telematica.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div></div><div>Hello...</div><div><br></div><div>Has anyone an idea, how to solve this?</div><div><br></div><div>Thank you</div><div><br>Am 13.09.2017 um 15:52 schrieb Matthias Hohl <<a href="mailto:matthias.hohl@telematica.at" target="_blank">matthias.hohl@telematica.at</a>>:<br><br></div><blockquote type="cite"><div><div class="gmail-m_6062096323920451751WordSection1"><p class="MsoNormal">Hello,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">we have sometimes the problem, that customers dial a number with letters or characters like „.“ Or „-„ or „/“ in it.<u></u><u></u></p><p class="MsoNormal">This stops rate-o-mat, so we need to rewrite the dialed number to strip out this characters.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><pre style="background:white none repeat scroll 0% 0%">Like: <span style="font-size:9pt;font-family:Consolas;color:rgb(51,51,51)">[^</span><span style="font-size:9pt;font-family:Consolas;color:rgb(173,81,0)">0</span><span style="font-size:9pt;font-family:Consolas;color:rgb(51,51,51)">-</span><span style="font-size:9pt;font-family:Consolas;color:rgb(173,81,0)">9</span><span style="font-size:9pt;font-family:Consolas;color:rgb(51,51,51)">]  =>  „“<u></u><u></u></span></pre><p class="MsoNormal"><u></u></p></div></div></blockquote></div></blockquote><div><br></div><div>You could use something like:</div><div><br></div><div>        if(is_method("INVITE"))<br>        {<br>                $rU = $(rU{re.subst,/^(\+)?[:blank:]?\(?([0-9]*)\)?[ -.]?\(?([0-9]*)\)?[ -.]?\(?([0-9]*)\)?[ -.]?\(?([0-9]*)\)?[ -.]?\(?([0-9]*)\)?$/\1\2\3\4\5\6/});<br>                xlog("L_NOTICE", "Consume spec chars in RURI - '$rU' - [% logreq_init -%]\n");<br>        }<br></div><div><br></div><div><br></div><div>..in your templates/etc/kamailio/proxy/kamailio.cfg.customtt.tt2</div><div><br></div><div>Hope this helps.</div><div><br></div><div>-Barry Flanagan</div><br></div><br></div></div>