<div dir="ltr">It is not ESl but a python script only which is called from a XML extension. The code is as follows:<div><br></div><div><br></div><div>def initial_greeting(session, phone_number, channel_uuid):<br></div><div><br></div><div><div> sangoshthi_greeting = "/usr/local/freeswitch/sounds/sangoshthi_ivr_audios/Sangoshthi_greeting.wav"</div><div> invalid_digit = "/usr/local/freeswitch/sounds/sangoshthi_ivr_audios/Invalid_entry.wav"</div></div><div><br></div><div> topic = str(session.playAndGetDigits(1, 1, 5, 5000,"", sangoshthi_greeting, invalid_digit, "[12345*]"))</div><div><br></div><div> ivr_handler(topic, session, phone_number, channel_uuid)</div><div><br></div><div><br></div><div>def handler(session, args): </div><div><blockquote type="cite" style="font-size:12.8px"><span class="gmail-im"><div dir="ltr"><div><div> session.setHangupHook(hangup_<wbr>hook)</div><div> session.setInputCallback(<wbr>input_callback)</div><div><br></div><div> print('session object value is ', str(session))</div><div><br></div></div><div><div> callerid = session.getVariable('caller_<wbr>id_number')</div><div> call_uuid = session.getVariable('uuid')</div><div><br></div><div> phone_number = callerid[len(callerid)-10:]</div><div><br></div><div> initial_greeting(session, phone_number, call_uuid)</div></div><div><br></div><div><br></div><div><br></div></div></span></blockquote></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 14, 2017 at 10:08 PM, Freeswitch user <span dir="ltr"><<a href="mailto:freeswitch940@gmail.com" target="_blank">freeswitch940@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="auto">Hello Deepika, </div></div></div><div dir="auto"><br></div><div dir="auto">As per my experience playandGetDigits is channel variable so we can use it with session only. I don't think it will work with ESL. You can use mod_perl for same..</div><div><div><br><div class="gmail_quote"><div><div class="h5"><div>On Thu, 14 Sep 2017 at 9:10 PM, Deepika Yadav <<a href="mailto:deepikay@iiitd.ac.in" target="_blank">deepikay@iiitd.ac.in</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div>Hi<div><br></div><div>I need to originate calls to Indian mobile numbers from my python ESL script. I used to use service from a company for sending calls from Freeswitch to GSM network for which I set up external SIP profile. </div><div><br></div><div>But recently I bought my own GOIP hardware, though I am able to make calls but DTMF events are not getting captured on Freeswitch, API like playandGetDigits does not work and there are no logs on Freeswitch console.</div><div><div><br></div>-- <br><div class="m_3970177832272800396m_3250473976330713455m_-1413858457262105425gmail_signature" data-smartmail="gmail_signature"><div>Regards,<div>Deepika</div><div><a href="https://deepikay.wixsite.com/deepika" target="_blank">https://deepikay.wixsite.com/<wbr>deepika</a><br></div></div></div>
</div></div></div></div>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote></div></div></div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Deepika</div><div><a href="https://deepikay.wixsite.com/deepika" target="_blank">https://deepikay.wixsite.com/deepika</a><br></div></div></div>
</div>