<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#0070C0;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US">Hi, Luis<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US">Looking&nbsp; the FS source code, it will return an “ungreedy” match if you are using a regex and it is your and only bind_digit_action.&nbsp;
 If this matches your scenario, try adding a 2<sup>nd</sup> &nbsp;bind_digit_action - it doesn’t matter what it is and it doesn’t need to be a regex (it just needs to be something which won’t interfere with anything else).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US">So, for example, you could try this:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US">bind_digit_action(my_domain,'~^\*(\d&#43;)$',exec:execute_extension,MY_EXTENSION XML my_context,both,self)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US">bind_digit_action(my_domain,'##',exec:execute_extension,MY_DO_NOTHING_EXTENSION XML my_context,both,self)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US">I’ve spent quite some time looking at that part of the FS code, so I hope this is helpful.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#0070C0;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Luis Azedo [mailto:luis.azedo@factorlusitano.com]
<br>
<b>Sent:</b> 05 July 2016 12:52<br>
<b>To:</b> freeswitch-users@lists.freeswitch.org<br>
<b>Subject:</b> Re: [Freeswitch-users] bind_digits_action regexp<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hi David,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">i'm not trying to capture to any variable, i'm using last_matching_digits variable in MY_EXTENSION handling. This works if i add '#' to the end of the regexp. i am trying to get the same result without the need for '#' at the end.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt">---------- Forwarded message ----------<br>
From:&nbsp;David Ponzone &lt;<a href="mailto:david.ponzone@gmail.com">david.ponzone@gmail.com</a>&gt;<br>
To:&nbsp;FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
Cc:&nbsp;<br>
Date:&nbsp;Tue, 28 Jun 2016 23:09:19 &#43;0200<br>
Subject:&nbsp;Re: [Freeswitch-users] bind_digits_action regexp<br>
According the wiki page, it cannot be used for capture.<br>
<br>
David Ponzone<br>
<br>
<br>
<br>
&gt; Le 28 juin 2016 à 20:06, Luis Azedo &lt;<a href="mailto:luis.azedo@factorlusitano.com">luis.azedo@factorlusitano.com</a>&gt; a écrit :<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; i'm trying to collect as many digits as possible but only getting the first.<br>
&gt;<br>
&gt; bind_digit_action(my_domain,'~^\*(\d&#43;)$',exec:execute_extension,MY_EXTENSION XML my_context,both,self)<br>
&gt; if i press *8754, MY_EXTENSION is executed as soon as i type the 8. i guess the regexp is true, but shouldn't it try to capture the rest of the digits ?<br>
&gt;<br>
&gt; also tried<br>
&gt; <span style="color:#0070C0">[Freeswitch-users] bind_digits_action regexp</span><br>
&gt; when i press *123456789, MY_EXTENSION is executed as soon as i type the 5<br>
&gt;<br>
&gt; also used 'set(bind_digit_input_timeout=15000)' with no luck<br>
&gt; is there a way to capture until bind_digit_input_timeout ?<br>
&gt;<br>
&gt; Thanks<o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>