<div dir="ltr">Ha ha! As soon as I ask for help, I figured it out. The answer was here:<div><br></div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket">https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket</a><br></div><div><br></div><div>"<span style="color:rgb(23,43,77);font-family:-apple-system,system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">If you would like to handle incoming calls using inbound mode, you should add the <b>park</b> command to your dialplan. Otherwise the dialplan might complete executing before your client can send commands to the event socket.</span>"</div><div><br></div><div>Thanks anyway and sorry to bother you.</div><div><br></div><div>All the best,</div><div><br></div><div>Euan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 27, 2019 at 9:43 AM Euan Millar <<a href="mailto:euan@ensemblepourladifference.org">euan@ensemblepourladifference.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello kind Freeswitch mailing group!<div><br></div><div>I am using ESL to control my calls entirely from a Node application.</div><div><br></div><div>I am using the '<a href="https://github.com/englercj/node-esl" target="_blank">modesl</a>' package to create an ESL connection and listen to the FS <a href="https://freeswitch.org/confluence/display/FREESWITCH/Event+List" target="_blank">events</a> and then answer a call if the number matches a dialplan I want to control using the mod_command "uuid_answer."</div><div><br></div><div>However, when my script answers a call, the music on hold plays in the background, even if I control the channel and am able to play other IVR audio in the call. As soon as my desired IVR commands complete, the music on hold returns in between, and it is quite annoying to hear small snippets of music. Eventually the call hangs up.</div><div><br></div><div>I am thinking that maybe the call has not actually been answered properly and that FS thinks that it is in fact on hold, and eventually hangs up on it, even though my script appears to have "answered" the call.</div><div><br></div><div>Can anyone shed any light on this? I think that I am doing something wrong. I had tried to get an <a href="https://freeswitch.org/confluence/display/FREESWITCH/Event+Socket+Outbound" target="_blank">Outbound</a> connection to my Node script but it was receiving no events so didn't know when to answer. The only way I could detect and answer the call was by using the Inbound approach to listen to events.</div><div><br></div><div>I would be very grateful if anyone could give me some advice on this if you recognise my issue.</div><div><br></div><div>Kind regards,</div><div><br></div><div>Euan</div><div><br></div><div><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Euan Millar<div><br></div><div><a href="http://www.ensemblepourladifference.org" target="_blank">Ensemble Pour La Difference</a></div><div><div>c/o Mindspace 4th Floor </div><div>114 Whitechapel High Street</div><div>London</div><div>E1 7PT</div><div>United Kingdom</div></div><div>Mobile: +44 (0)7557 394986</div></div></div></div></div>