Both modes can send command and receive events. Which mode is more scalable? And pros vs cons of each mode.
The modes are both "event socket" and therefore quite scalable. The primary difference is in how the connection gets started. With outbound event socket, there is always a call involved. A call comes in to FreeSWITCH and somewhere in the dialplan there is a call to the socket application. At that point FreeSWITCH makes an "outbound" connection to your application which is listening for connections on the IP:Port in question. With inbound event socket, FreeSWITCH is the one sitting there waiting for your application to connect, i.e. an "inbound" socket connection from your program. Once your program is connected it can do pretty much whatever you want: show channels to see what's going on, originate to create new channels, fifo list, conference list, etc. etc. BTW, fs_cli is a great example of an inbound event socket application. fs_cli literally connects to FS via event socket. Hope this helps. -MC On Tue, Nov 8, 2011 at 10:53 AM, envelopes envelopes <sunwood360@gmail.com>wrote:
Both modes can send command and receive events. Which mode is more scalable? And pros vs cons of each mode.
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 http://www.freeswitch.org
What is the best way to implement such server, using threads or fork? Thanks in advance Luis Jimenez -----Original Message----- From: Michael Collins <msc@freeswitch.org> Sender: freeswitch-users-bounces@lists.freeswitch.org Date: Tue, 8 Nov 2011 10:59:04 To: FreeSWITCH Users Help<freeswitch-users@lists.freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Fs event socket inbound or outbound? 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 http://www.freeswitch.org
Michael, great detailed response. If I need to monitor FS heartbeat, it seems I could only do it with inbound mode since no call is associated yet. On Nov 8, 2011 11:02 AM, "Michael Collins" <msc@freeswitch.org> wrote:
The modes are both "event socket" and therefore quite scalable. The primary difference is in how the connection gets started.
With outbound event socket, there is always a call involved. A call comes in to FreeSWITCH and somewhere in the dialplan there is a call to the socket application. At that point FreeSWITCH makes an "outbound" connection to your application which is listening for connections on the IP:Port in question.
With inbound event socket, FreeSWITCH is the one sitting there waiting for your application to connect, i.e. an "inbound" socket connection from your program. Once your program is connected it can do pretty much whatever you want: show channels to see what's going on, originate to create new channels, fifo list, conference list, etc. etc. BTW, fs_cli is a great example of an inbound event socket application. fs_cli literally connects to FS via event socket.
Hope this helps.
-MC
On Tue, Nov 8, 2011 at 10:53 AM, envelopes envelopes <sunwood360@gmail.com
wrote:
Both modes can send command and receive events. Which mode is more scalable? And pros vs cons of each mode.
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 http://www.freeswitch.org
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 http://www.freeswitch.org
participants (3)
-
envelopes envelopes
-
Luis Jimenez
-
Michael Collins