2

Hello Freswitch Geeks,

I am facing some challenge handling events with the mode event_socket. I create a socket library that implements some of the features of the mod_event_socket in-built ESL. This what I did: I connect to Freeswitch, subscribe to events via events command and execute an originate command using the socket application. When the call is answered FS connects back to a daemon app runnning and based upon this guideline https://wiki.freeswitch.org/wiki/Event_Socket_Outbound#Using_Netcat I am able to handle the call.

However the issue I am facing is some of the events are not received by the deamon app(for instance channel_hangup_complete, record_stop...) I would like to know whether I am missing something.

Thanks

Arsene
  • 1,037
  • 4
  • 20
  • 47

1 Answers1

3

from the link you posted

it's a race,

sometimes the socket connection ends before the channel

the linger socket command was added to tell FS to wait for the last channel event before ending the connection

just send the command

linger

This is an api command, so you will need to run "api linger" or something similar

Shlomi Agiv
  • 1,183
  • 7
  • 17
  • The "linger" command is only available when using the the full api. You must specify "async full" in the dialplan. – tkdkop Feb 22 '17 at 21:48