Deepika,

I don't think this is the issue as we've had this pattern of code for years and only recently (after upgrading to v1.8) have we seen ESL connection instability. Note we took this pattern from Newfies which does exact same thing. Areski hasn't responded yet but I believe he would say this is not an issue.

We've adjusted our code to abort the attempt and retry if ev=None, but there remains a portion of calls for which ev returns success but there is actually no call originated and no trace of it in FS logs or in CDR.

Any other ideas?


On Mon, Apr 22, 2019 at 9:51 PM Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Hi Neil, 

Just a guess, shouldn't you put a significant sleep before "c.disconnect()". Since the previous command starts background api, it would be appropriate to introduce some time gap before disconnecting ESL.

Regards,
Deepika
PhD Scholar
IIIT Delhi, India
Webpage: https://deepikay.wixsite.com/deepika

On Mon, Apr 22, 2019 at 9:37 PM Neil Patel <neilp@cs.stanford.edu> wrote:
Hi Brian,

Sorry, I didn't give enough context.

The code below is for the origination of calls, which we are doing through ESL and where the connection is being unexpectedly dropped, or even if not dropped, no record of the origination appears in either FS logs or CDR. 

CDRs are being generated to sqlite and we are reading them from there asynchronously.

Also forgot to link the documentation that suggests building from source is the way, it's here

On Mon, Apr 22, 2019 at 6:25 PM Brian West <brian@freeswitch.com> wrote:
You're doing the CDR collection inline or what are you speaking of exactly?

On Mon, Apr 22, 2019 at 2:29 AM Neil Patel <neilp@cs.stanford.edu> wrote:
Hi all, I have a fresh server running FS 1.8 from package on Debian 9. It runs a python app connecting to FS using ESL that executes this code per call attempt:

c = ESLconnection(str(settings.ESL_HOSTNAME), str(settings.ESL_PORT), str(settings.ESL_PASSWORD))
if not c.connected():
    abort()
dial_command = "originate …"
ev = c.api("bgapi", str(dial_command))
c.disconnect()
if ev:
    result = ev.serialize()
    logger.debug('API result = {}'.format(result))

When we ran 350K call test, 70K calls got to this code and failed the final if condition, meaning ev was None. No CDR generated.

This is totally an unexpected error case for us after tens of millions of calls over last 3 years on our other servers. Any idea why this is happening? The only difference I can see is we’ve not seen this issue on FS 1.6 (built from source), so maybe it’s introduced in 1.8 (run from package)? FYI we've built pyESL from source, which is what's recommended here. Any chance there is an incompatibility between pyESL built from source and FS 1.8 installed from package?

Thanks,
Neil

This question reproduced from Slack where I didn't get a response

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com


--

Brian West | Co-founder and Developer

Need Commercial support? email sales@freeswitch.com

FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045

Email: brian@freeswitch.com

Mobile: 918-424-9378

Website: https://www.FreeSWITCH.com

https://www.facebook.com/signalwireinc?src=email https://twitter.com/freeswitch

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com


--
Regards,
Deepika
PhD Scholar
IIIT Delhi, India
_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com