I did read your emails, and I thought the Lua script idea was nice.  The ESL was more complicated, but also good.  But, you didn&#39;t accept either.  So, I was wondering, is this &quot;bind_long_DTMF&quot; something that allows you to capture DTMF during the full length of the call, i.e. even after bridge?  Is that what you wished to accomplish?<div>

<br></div><div>Regards</div><div>HASSAN</div><div><br></div><div><br><br><div class="gmail_quote">On Fri, Aug 27, 2010 at 15:03, Tihomir Culjaga <span dir="ltr">&lt;<a href="mailto:tculjaga@gmail.com">tculjaga@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">as usual we are alone here ...<br>I just lost my patience and did it directly in code!<br><br><br>Once rewriting according to FS requirements done , will provide a patch if anyone interested.<br>

<br><br><br>-----------------&lt;-snip-&gt;-----------------------<br>
        /*it&#39;s hardcoded but who cares at that point :))*/<br>        if (dtmf-&gt;digit == &#39;#&#39;) {<br>              int ok = 0;<br>              *digit = dtmf-&gt;digit;<br>              dval = atoi(digit);<br>


              dval=0; /* temporary fake the bind key */<br>              if (direction == SWITCH_DTMF_RECV &amp;&amp; (md-&gt;sr[direction].map[dval].bind_flags &amp; SBF_DIAL_ALEG)) {<br>                                ok = 1;<br>


              } else if (direction == SWITCH_DTMF_SEND &amp;&amp; (md-&gt;sr[direction].map[dval].bind_flags &amp; SBF_DIAL_BLEG)) {<br>                                ok = 1;<br>                        }<br><br>                        if (ok &amp;&amp; md-&gt;sr[direction].map[dval].app) {<br>


                                uint32_t flags = md-&gt;sr[direction].map[dval].flags;<br><br>                                if ((md-&gt;sr[direction].map[dval].bind_flags &amp; <br>                                SBF_EXEC_OPPOSITE)) { if (direction == <br>


                                SWITCH_DTMF_SEND) { flags |= SMF_ECHO_ALEG; } <br>                                else { flags |= SMF_ECHO_BLEG; } } else if ((md-<br>                                &gt;sr[direction].map[dval].bind_flags &amp; <br>


                                SBF_EXEC_SAME)) { if (direction == <br>                                SWITCH_DTMF_SEND) { flags |= SMF_ECHO_BLEG; } <br>                                else { flags |= SMF_ECHO_ALEG; } } else if ((md-<br>


                                &gt;sr[direction].map[dval].bind_flags &amp; <br>                                SBF_EXEC_ALEG)) { flags |= SMF_ECHO_ALEG; } else <br>                                if ((md-&gt;sr[direction].map[dval].bind_flags &amp; <br>


                                SBF_EXEC_BLEG)) { flags |= SMF_ECHO_BLEG; } else <br>                                { flags |= SMF_ECHO_ALEG; }<br><br>                                if ((md-&gt;sr[direction].map[dval].bind_flags &amp; SBF_EXEC_INLINE)) {<br>


                                        flags |= SMF_EXEC_INLINE;<br>                                }<br><br>                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;%s Processing meta digit &#39;%c&#39; [%s]\n&quot;,<br>


                                                                  switch_channel_get_name(channel), dtmf-&gt;digit, md-&gt;sr[direction].map[dval].app);<br><br>                                if (switch_channel_test_flag(channel, CF_PROXY_MODE)) {<br>


                                        broadcast_in_thread(session, md-&gt;sr[direction].map[dval].app, flags | SMF_REBRIDGE);<br>                                } else {<br>                                        switch_ivr_broadcast(switch_core_session_get_uuid(session), md-&gt;sr[direction].map[dval].app, flags);<br>


                                }<br>                                if ((md-&gt;sr[direction].map[dval].bind_flags &amp; SBF_ONCE)) {<br>                                        memset(&amp;md-&gt;sr[direction].map[dval], 0, sizeof(md-&gt;sr[direction].map[dval]));<br>


                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;%s Unbinding meta digit &#39;%c&#39;\n&quot;,<br>                                                                          switch_channel_get_name(channel), dtmf-&gt;digit);<br>


                                }<br>                        } else {<br>                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;%s Ignoring meta digit &#39;%c&#39; not mapped\n&quot;,<br>


                                                                  switch_channel_get_name(channel), dtmf-&gt;digit);<br>                        }<br>        <br>                                             <br>/*                        return SWITCH_STATUS_SUCCESS; */<br>


                        return SWITCH_STATUS_FALSE;<br><br>        }<br>        <br><br><br>-----------------&lt;-snip-&gt;-----------------------<br><br><br><br>usage in DP:<br><br>&lt;action application=&quot;bind_long_dtmf&quot; data=&quot;0 a s transfer::myExtension XML myContext&quot;/&gt;<br>


<br><br><br>in myExtension you do your stuff!<div><div></div><div class="h5"><br><br><br><br><br><br><br><br><br><br><div class="gmail_quote">On Wed, Aug 25, 2010 at 10:14 PM, Tihomir Culjaga <span dir="ltr">&lt;<a href="mailto:tculjaga@gmail.com" target="_blank">tculjaga@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><br><br><div class="gmail_quote">On Wed, Aug 25, 2010 at 7:47 PM, Nigel Kent <span dir="ltr">&lt;<a href="mailto:ktngl@yahoo.co.uk" target="_blank">ktngl@yahoo.co.uk</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit" valign="top">Have you tried using the event socket library <a href="http://wiki.freeswitch.org/wiki/Esl" target="_blank">http://wiki.freeswitch.org/wiki/Esl</a> <br>



<br></td></tr></tbody></table></blockquote></div><br></div>well, i could have used esl from the start but thats and external application controling FS... and its totally a different approach from where im now:(.<br>I have everything up &amp; running except this feature ..<br>



<br>so is there any chance to run a lua script in background (by allowing the normal callflow to go on) to collect a special DTMF event ?<br><br>something like this:<div><br>&lt;action application=&quot;set&quot; data=&quot;api_result=${lua(script.lua)}&quot;/&gt;<br>



<br></div>?<br><font color="#888888"><br>T.<br><div><br><br></div><br>
</font></blockquote></div><br>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>