<div dir="ltr"><div><div><div>Ciao FreeSWITCHers,<br><br></div><br>on FS 1.4.18:<br><br>using perl ESL outbound socket, I see FS receives DTMF 2833 only when socket is declared &quot;async&quot; in dialplan.<br><br></div><div>NB: not only the outbound socket does not receives DTMF events, is FreeSWITCH itself that does not receives DTMFs.<br></div><div><br></div>Is this correct? Is this the expected behavior?<br><br>If I delete &quot;async&quot; from dialplan, DTMFs are not received<br><br>es:  <br>&lt;action application=&quot;socket&quot; data=&quot;<a href="http://127.0.0.1:8040">127.0.0.1:8040</a> async&quot;/&gt; works, <br>while with <br>&lt;action application=&quot;socket&quot; data=&quot;<a href="http://127.0.0.1:8040">127.0.0.1:8040</a>&quot;/&gt; no DTMFs at all.<br><br>====<br><br></div><div>btw, this is an example of outbound_socket in perl ESL<br></div><br>#!/usr/bin/perl<br>require ESL;<br>use IO::Socket::INET;<br>my $ip = &quot;127.0.0.1&quot;;<br>my $sock = new IO::Socket::INET ( LocalHost =&gt; $ip,<br>                                  LocalPort =&gt; &#39;8040&#39;,<br>                                  Proto =&gt; &#39;tcp&#39;,<br>                                  Listen =&gt; 1,<br>                                  Reuse =&gt; 1 );<br>die &quot;Could not create socket: $!\n&quot; unless $sock;<br><br>for(;;) {<br>    my $new_sock = $sock-&gt;accept();<br>    my $pid = fork();<br>    if ($pid) {<br>        print &quot;New child pid $pid created...\n&quot;;<br>        close($new_sock);<br>        next;<br>    }<br><br>    my $fd = fileno($new_sock);<br>    my $con = new ESL::ESLconnection($fd);<br>    my $info = $con-&gt;getInfo();<br>    my $uuid = $info-&gt;getHeader(&quot;unique-id&quot;);<br><br>    printf &quot;Connected call %s, from %s\n&quot;, $uuid,<br>           $info-&gt;getHeader(&quot;caller-caller-id-number&quot;);<br><br>    $con-&gt;sendRecv(&quot;myevents $uuid&quot;);<br><br>    $con-&gt;setEventLock(&quot;1&quot;); # need this for forcing execution order on async, has no effect if no &quot;async&quot; in dialplan<br>    $con-&gt;execute(&quot;sleep&quot;,&quot;500&quot;);<br>    $con-&gt;execute(&quot;answer&quot;);<br>    $con-&gt;execute(&quot;sleep&quot;,&quot;500&quot;);<br>    $con-&gt;execute(&quot;playback&quot;,<br>                  &quot;ivr/ivr-welcome_to_freeswitch.wav&quot;);<br>    $con-&gt;execute(&quot;sleep&quot;,&quot;500&quot;);<br>    $con-&gt;execute(&quot;playback&quot;,<br>                  &quot;ivr/ivr-finished_pound_hash_key.wav&quot;);<br><br>    while($con-&gt;connected()) {<br>        my $e = $con-&gt;recvEvent();<br>        if ($e) {<br>            my $name = $e-&gt;getHeader(&quot;event-name&quot;);<br>            print &quot;EVENT [$name]\n&quot;;<br>            if ($name eq &quot;DTMF&quot;) {<br>                my $digit = $e-&gt;getHeader(&quot;dtmf-digit&quot;);<br>                my $duration = $e-&gt;getHeader(&quot;dtmf-duration&quot;);<br>                print &quot;DTMF digit $digit ($duration)\n&quot;;<br>                $con-&gt;execute(&quot;hangup&quot;);<br>            }<br>        }<br>    }<br>    print &quot;BYE\n&quot;;<br>    close($new_sock);<br>}<br><br><br clear="all"><div><div><div><div><br>-- <br><div class="gmail_signature">Sincerely,<br><br>Giovanni Maruzzelli<br>Cell : +39-347-2665618<br></div>
</div></div></div></div></div>