<div dir="ltr">Hi<div>this is my simple dial plan to run an outbound esl application:</div><div><br></div><div>
<div class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-html-tag"><extension<span class="gmail-html-attribute"><span> </span><span class="gmail-html-attribute-name">name</span>="<span class="gmail-html-attribute-value">intelligent</span>"</span>></span></div><div class="gmail-collapsible-content" style="margin-left:1em;color:rgb(0,0,0);font-family:monospace;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-text"></span><div class="gmail-collapsible" id="gmail-collapsible185"><div class="expanded"><div class="gmail-line"><span class="gmail-button gmail-collapse-button" style="display:inline-block;width:10px;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:initial;vertical-align:bottom;height:10px"></span><span class="gmail-html-tag"><condition<span class="gmail-html-attribute"><span> </span><span class="gmail-html-attribute-name">field</span>="<span class="gmail-html-attribute-value">destination_number</span>"</span><span class="gmail-html-attribute"><span> </span><span class="gmail-html-attribute-name">expression</span>="<span class="gmail-html-attribute-value">.*$</span>"</span>></span></div><div class="gmail-collapsible-content" style="margin-left:1em"><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag"><action<span class="gmail-html-attribute"><span> </span><span class="gmail-html-attribute-name">application</span>="<span class="gmail-html-attribute-value">sleep</span>"</span><span class="gmail-html-attribute"><span> </span><span class="gmail-html-attribute-name">data</span>="<span class="gmail-html-attribute-value">200</span>"</span>/></span></div><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag"><action<span class="gmail-html-attribute"><span> </span><span class="gmail-html-attribute-name">application</span>="<span class="gmail-html-attribute-value">socket</span>"</span><span class="gmail-html-attribute"><span> </span><span class="gmail-html-attribute-name">data</span>="<span class="gmail-html-attribute-value"><a href="http://127.0.0.1:3003">127.0.0.1:3003</a> async full</span>"</span>/></span></div><span class="gmail-text"></span></div><div class="gmail-line"><span class="gmail-html-tag"></condition></span></div></div></div><span class="gmail-text"></span></div><div class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-html-tag"></extension></span></div><div class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-html-tag"><br></span></div><div class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">the application is a nodejs process which answers the call and plays some files and then bridges the call to a user. As you can see in my dialplan all calls are handled in this same way using esl. Problem occurs when a bridged call is transferred to another number. at this point there will be two socket connections for the same call,if I close the first socket the call is hanged up with this message on logs:</div><div class="gmail-line" style="text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial"><font color="#000000" face="monospace">"... has executed the last dialplan instruction, hanging up"</font><br></div><div class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"> and after this the second socket will close too. Is this expected or I'm doing something wrong?</div><div class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">thanks</div>
<br></div></div>