<div dir="ltr">Nevermind, it won't match on the 6 digit part and will on the 4-17 part.<div><br></div><div>Your regex is fine and matches that string. So the problem is likely elsewhere. How isĀ curl_response_data set? Is it set before the hunting phase? If you're fetching it during the execution of the dialplan then it won't work, you'll need to transfer to trigger a new dialplan hunt.</div><div><br></div><div>You can see what the string it's comparing to the regex is in the DEBUG-level logs, where you'll see it evaluating the extensions/conditions in the dialplan.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 October 2015 at 21:31, Steven Ayre <span dir="ltr"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">971234567 is 9 digits but you're matching 10-23 digits in that section.<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 15 October 2015 at 17:54, Ximo Peral <span dir="ltr"><<a href="mailto:ximop_22@hotmail.com" target="_blank">ximop_22@hotmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div><div dir="ltr"><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:19.5px;background-color:rgb(255,255,255)">I have this condition on a dialplan:</p><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)"><condition</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">field</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"${curl_response_data}"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">expression</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"^(\+)?(\d{6})?(\d{4,15}|anonymous),(\d{6})?(\d{4,17}),(\d{3,5}),(\d{3,5}),(NP\d{3}|RG\d{4,8}|OP\d{6}|CUB\d{6}|CF\d{1}|ANF\d{3}|TLSIOS),?(NP\d{3}|OP\d{6}|CUB\d{6}|CF\d{1}|ANF\d{3})?,?(NP\d{3}|OP\d{6}|CUB\d{6}|CF\d{1}|ANF\d{3})?,?(NP\d{3}|OP\d{6}|CUB\d{6}|CF\d{1}|ANF\d{3})?,?(NP\d{3}|OP\d{6}|CUB\d{6}|CF\d{1}|ANF\d{3})?$"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">break</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"on-true"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)"><action</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">application</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"set"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">inline</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"true"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">data</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"auto_hunt=true"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">/></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)"><action</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">application</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"transfer"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">data</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"${num_dest} XML routing.Saliente"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">/></span></code></pre><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:19.5px;background-color:rgb(255,255,255)"></p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:19.5px;background-color:rgb(255,255,255)">And this curl response:</p><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">+</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">34987654321</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">971234567</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">000</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">00001</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">CUB281281</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">CUB301993</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">OP024000</span></code></pre><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:19.5px;background-color:rgb(255,255,255)">But I do not get the transfer, the regular expression is not working.</p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:19.5px;background-color:rgb(255,255,255)">I tried this and if it works:</p><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)"><condition</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">field</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"${curl_response_data}"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">expression</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"^(\+)?(\d{6})?(\d{4,15}|anonymous),(\d{6})?(\d{9}),(\d{3,5}),(\d{3,5})(,(\w*))*$"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">break</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"on-true"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)"><action</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">application</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"set"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">inline</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"true"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">data</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"auto_hunt=true"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">/></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)"><action</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">application</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"transfer"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(255,0,0)">data</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,255)">"${num_dest} XML routing.Saliente"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">/></span></code></pre><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:19.5px;background-color:rgb(255,255,255)"></p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:19.5px;background-color:rgb(255,255,255)">The problem is from the fourth comma</p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:19.5px;background-color:rgb(255,255,255)"><br></p><p style="margin-bottom:1em;border:0px;clear:both;background-color:rgb(255,255,255)"><font color="#222222" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:15px;line-height:19.5px">Desperate, I tried it with this conditions and does not work!</span></font></p><p style="margin-bottom:1em;border:0px;clear:both;background-color:rgb(255,255,255)"><font color="#222222" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:15px;line-height:19.5px"><br></span></font></p><p style="margin-bottom:1em;border:0px;clear:both;background-color:rgb(255,255,255)"><font color="#222222" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:15px;line-height:19.5px"><i><condition field="${curl_response_data}" expression="^(\+)?(\d{6})?(\d{4,15}|anonymous),(\d{6})?(\d{9}),(\d{3,5}),(\d{3,5}),CUB281281,CUB301993,OP024000$" break="on-true"></i></span></font></p><p style="margin-bottom:1em;border:0px;clear:both;background-color:rgb(255,255,255)"><font color="#222222" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:15px;line-height:19.5px"><br></span></font></p><p style="margin-bottom:1em;border:0px;clear:both;background-color:rgb(255,255,255)"><font color="#222222" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:15px;line-height:19.5px">and</span></font></p><p style="margin-bottom:1em;border:0px;clear:both;background-color:rgb(255,255,255)"><font color="#222222" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:15px;line-height:19.5px"><br></span></font></p><p style="margin-bottom:1em;border:0px;clear:both;background-color:rgb(255,255,255)"><font color="#222222" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:15px;line-height:19.5px"><i><condition field="${curl_response_data}" expression="^(\+)?(\d{6})?(\d{4,15}|anonymous),(\d{6})?(\d{9}),(\d{3,5}),(\d{3,5}),(CUB281281),(CUB301993),(OP024000)$" break="on-true"></i></span></font></p><p style="margin-bottom:1em;border:0px;clear:both;background-color:rgb(255,255,255)"><font color="#222222" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:15px;line-height:19.5px"><br></span></font></p><p style="margin-bottom:1em;border:0px;clear:both;background-color:rgb(255,255,255)"><font color="#222222" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:15px;line-height:19.5px">Any ideas??</span></font></p>                                            </div></div>
<br></div></div><span class="">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></span></blockquote></div><br></div>
</blockquote></div><br></div>