Discussion:
[Freeswitch-dev] mod_event_socket or mod_xml_rpc?
canuck15
2014-01-15 18:32:37 UTC
Permalink
I am trying to update an old abandoned app (WikiPBX) which is written using
Django Python and uses mod_event_socket and mod_xml_curl to talk with
Freeswitch.



I've got most things working except the most important part which is
mod_event_socket. Now I found mod_xml_rpc which seems like a better way to
go.



Just wanted to get some opinions which is the better api interface before I
get too far into trying to get mod_even_socket working properly. So far
it's been quite the headache. I am currently looking at fusionpbx and
bluebox code to see what they are doing.
Arnaldo de Moraes Pereira
2014-01-15 18:37:24 UTC
Permalink
Go for mod_event_socket. If you care to add twisted as a dependency to your
project, take a look at https://github.com/fiorix/eventsocket

--
Arnaldo de Moraes Pereira
Post by canuck15
I am trying to update an old abandoned app (WikiPBX) which is written
using Django Python and uses mod_event_socket and mod_xml_curl to talk with
Freeswitch.
I’ve got most things working except the most important part which is
mod_event_socket. Now I found mod_xml_rpc which seems like a better way to
go.
Just wanted to get some opinions which is the better api interface before
I get too far into trying to get mod_even_socket working properly. So far
it’s been quite the headache. I am currently looking at fusionpbx and
bluebox code to see what they are doing.
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
João Mesquita
2014-01-15 18:51:29 UTC
Permalink
Arnaldo, we eventually have to work together to create a native
(non-swigged) version of the Python wrapper of ESL. Won't it make sense?
Well, I always have the intention of doing that I just never find the time
to... Dammit. ;)

João Mesquita
FreeSWITCH™ Solutions


On Wed, Jan 15, 2014 at 3:37 PM, Arnaldo de Moraes Pereira <
Post by Arnaldo de Moraes Pereira
Go for mod_event_socket. If you care to add twisted as a dependency to
your project, take a look at https://github.com/fiorix/eventsocket
--
Arnaldo de Moraes Pereira
Post by canuck15
I am trying to update an old abandoned app (WikiPBX) which is written
using Django Python and uses mod_event_socket and mod_xml_curl to talk with
Freeswitch.
I’ve got most things working except the most important part which is
mod_event_socket. Now I found mod_xml_rpc which seems like a better way to
go.
Just wanted to get some opinions which is the better api interface before
I get too far into trying to get mod_even_socket working properly. So far
it’s been quite the headache. I am currently looking at fusionpbx and
bluebox code to see what they are doing.
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
Arnaldo de Moraes Pereira
2014-01-15 18:55:43 UTC
Permalink
For sure - eventsocket.py doesn't use swig btw

--
Arnaldo de Moraes Pereira
Post by João Mesquita
Arnaldo, we eventually have to work together to create a native
(non-swigged) version of the Python wrapper of ESL. Won't it make sense?
Well, I always have the intention of doing that I just never find the time
to... Dammit. ;)
João Mesquita
FreeSWITCH™ Solutions
On Wed, Jan 15, 2014 at 3:37 PM, Arnaldo de Moraes Pereira <
Post by Arnaldo de Moraes Pereira
Go for mod_event_socket. If you care to add twisted as a dependency to
your project, take a look at https://github.com/fiorix/eventsocket
--
Arnaldo de Moraes Pereira
Post by canuck15
I am trying to update an old abandoned app (WikiPBX) which is written
using Django Python and uses mod_event_socket and mod_xml_curl to talk with
Freeswitch.
I’ve got most things working except the most important part which is
mod_event_socket. Now I found mod_xml_rpc which seems like a better way to
go.
Just wanted to get some opinions which is the better api interface
before I get too far into trying to get mod_even_socket working properly.
So far it’s been quite the headache. I am currently looking at fusionpbx
and bluebox code to see what they are doing.
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
João Mesquita
2014-01-15 19:01:14 UTC
Permalink
Yeah, but it does add the quite heavy dependency of twisted. Not for
everyone.. Also, I like the idea of making wrappers of the officially
maintained lib, don't you? Btw, I've used the twisted version for some
things before. Kudos for that, didn't mean to minimize the merit of it.

João Mesquita
FreeSWITCH™ Solutions


On Wed, Jan 15, 2014 at 3:55 PM, Arnaldo de Moraes Pereira <
Post by Arnaldo de Moraes Pereira
For sure - eventsocket.py doesn't use swig btw
--
Arnaldo de Moraes Pereira
Post by João Mesquita
Arnaldo, we eventually have to work together to create a native
(non-swigged) version of the Python wrapper of ESL. Won't it make sense?
Well, I always have the intention of doing that I just never find the time
to... Dammit. ;)
João Mesquita
FreeSWITCH™ Solutions
On Wed, Jan 15, 2014 at 3:37 PM, Arnaldo de Moraes Pereira <
Post by Arnaldo de Moraes Pereira
Go for mod_event_socket. If you care to add twisted as a dependency to
your project, take a look at https://github.com/fiorix/eventsocket
--
Arnaldo de Moraes Pereira
Post by canuck15
I am trying to update an old abandoned app (WikiPBX) which is written
using Django Python and uses mod_event_socket and mod_xml_curl to talk with
Freeswitch.
I’ve got most things working except the most important part which is
mod_event_socket. Now I found mod_xml_rpc which seems like a better way to
go.
Just wanted to get some opinions which is the better api interface
before I get too far into trying to get mod_even_socket working properly.
So far it’s been quite the headache. I am currently looking at fusionpbx
and bluebox code to see what they are doing.
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
Michael Jerris
2014-01-15 19:17:17 UTC
Permalink
They are completely different tools for different jobs, not a one or the other situation.
I am trying to update an old abandoned app (WikiPBX) which is written using Django Python and uses mod_event_socket and mod_xml_curl to talk with Freeswitch.
I’ve got most things working except the most important part which is mod_event_socket. Now I found mod_xml_rpc which seems like a better way to go.
Just wanted to get some opinions which is the better api interface before I get too far into trying to get mod_even_socket working properly. So far it’s been quite the headache. I am currently looking at fusionpbx and bluebox code to see what they are doing.
canuck15
2014-01-16 00:10:52 UTC
Permalink
I sort of figured someone would say that. Actually mod_xml_rpc seems to be
similar to mod_xml_curl. Since I already have that mod_xml_curl fetches from
my app working well I don't think I will switch that. Also just read that
fs_cli uses ESL so that has sold me on sticking with it. I just want to
make sure I am not using features that are a bit on the fringe where it's
not very active, well tested, and fixes don't come along very often.



From: freeswitch-dev-***@lists.freeswitch.org
[mailto:freeswitch-dev-***@lists.freeswitch.org] On Behalf Of Michael
Jerris
Sent: Wednesday, January 15, 2014 11:17 AM
To: freeswitch-***@lists.freeswitch.org
Subject: Re: [Freeswitch-dev] mod_event_socket or mod_xml_rpc?



They are completely different tools for different jobs, not a one or the
other situation.



On Jan 15, 2014, at 1:32 PM, canuck15 <***@hotmail.com
<mailto:***@hotmail.com> > wrote:





I am trying to update an old abandoned app (WikiPBX) which is written using
Django Python and uses mod_event_socket and mod_xml_curl to talk with
Freeswitch.



I've got most things working except the most important part which is
mod_event_socket. Now I found mod_xml_rpc which seems like a better way to
go.



Just wanted to get some opinions which is the better api interface before I
get too far into trying to get mod_even_socket working properly. So far
it's been quite the headache. I am currently looking at fusionpbx and
bluebox code to see what they are doing.
Anthony Minessale
2014-01-16 00:30:35 UTC
Permalink
Why would you want to make a non-swig version of the ESL lib? The whole
point is to make sure you get a reliable client.
Everyone who tries to make their own runs into one of many challenges that
are hard to overcome in a script lang. This is why you have the benefit of
the wrapped C lib.

xml_rpc has a bit less capability and is for sure less stable and scalable
when put head to head with ESL.
I wrote both of them myself so I'm not driven by affinity to one or the
other. AFAIK xml_rpc is stable but the lib used is not so hot and I always
wanted to use something better.
Post by canuck15
I sort of figured someone would say that. Actually mod_xml_rpc seems to
be similar to mod_xml_curl. Since I already have that mod_xml_curl fetches
from my app working well I don’t think I will switch that. Also just read
that fs_cli uses ESL so that has sold me on sticking with it. I just want
to make sure I am not using features that are a bit on the fringe where
it’s not very active, well tested, and fixes don’t come along very often.
*Sent:* Wednesday, January 15, 2014 11:17 AM
*Subject:* Re: [Freeswitch-dev] mod_event_socket or mod_xml_rpc?
They are completely different tools for different jobs, not a one or the other situation.
I am trying to update an old abandoned app (WikiPBX) which is written
using Django Python and uses mod_event_socket and mod_xml_curl to talk with
Freeswitch.
I’ve got most things working except the most important part which is
mod_event_socket. Now I found mod_xml_rpc which seems like a better way to
go.
Just wanted to get some opinions which is the better api interface before
I get too far into trying to get mod_even_socket working properly. So far
it’s been quite the headache. I am currently looking at fusionpbx and
bluebox code to see what they are doing.
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
--
Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬

☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞
http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
<http://freeswitch.org/g+>*

ClueCon Weekly Development Call
☎ sip:***@conference.freeswitch.org ☎ +19193869900
João Mesquita
2014-01-16 00:37:31 UTC
Permalink
Tony, the swigged version of ESL python module is not at all pythonic. As an example the use of get header for events that could use a more pythonic syntax like dicts do. I didn't mean to say that I wanted to no use the ESL C implementation as base at all, I just meant that the wrapper could be done using a tool that would make the python module more pythonic but still keeping the underlying implementation in C intact. Maybe that is doable using swig an if that's the case please ignore my own stupidity.

Sent from my iPhone
Why would you want to make a non-swig version of the ESL lib? The whole point is to make sure you get a reliable client.
Everyone who tries to make their own runs into one of many challenges that are hard to overcome in a script lang. This is why you have the benefit of the wrapped C lib.
xml_rpc has a bit less capability and is for sure less stable and scalable when put head to head with ESL.
I wrote both of them myself so I'm not driven by affinity to one or the other. AFAIK xml_rpc is stable but the lib used is not so hot and I always wanted to use something better.
I sort of figured someone would say that. Actually mod_xml_rpc seems to be similar to mod_xml_curl. Since I already have that mod_xml_curl fetches from my app working well I don’t think I will switch that. Also just read that fs_cli uses ESL so that has sold me on sticking with it. I just want to make sure I am not using features that are a bit on the fringe where it’s not very active, well tested, and fixes don’t come along very often.
Sent: Wednesday, January 15, 2014 11:17 AM
Subject: Re: [Freeswitch-dev] mod_event_socket or mod_xml_rpc?
They are completely different tools for different jobs, not a one or the other situation.
I am trying to update an old abandoned app (WikiPBX) which is written using Django Python and uses mod_event_socket and mod_xml_curl to talk with Freeswitch.
I’ve got most things working except the most important part which is mod_event_socket. Now I found mod_xml_rpc which seems like a better way to go.
Just wanted to get some opinions which is the better api interface before I get too far into trying to get mod_even_socket working properly. So far it’s been quite the headache. I am currently looking at fusionpbx and bluebox code to see what they are doing.
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
--
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ http://freeswitch.org/g+
ClueCon Weekly Development Call
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
Seven Du
2014-01-16 01:56:03 UTC
Permalink
I use the erlang way, but I played some of the ESL while I'm writing a book about FreeSWITCH, and I did even write a subset of a pure ruby version of ESL since it's not easy to get the swigged version work on Mac in the old days, so I know the detail of the ESL protocol and challenge of write a new ESL implementation.

But it's true that nearly all lang has a none-swig ESL. One reason I think maybe because some language has async or other versions of socket implementation that is not compatible to the swigged-ESL. e.g. gevent in Python, event machine in ruby, Netty for Java etc.

I had briefly tested the ESL performance before, looks like the mod_event_socket version has some bottle necks since the erlang dispatcher mechanism which use a fair dispatching model and the socket is controlled by a single erlang process that has some bottle necks on load which causes lost events. The mod_kazoo version improved that by start a new raw socket along side the socket between the erlang nodes, and more over it can add filter to events to filter out unused header, so it performs better. I also made a patch for mod_kazoo that replaced the for-i-in-all-headers loop to a hash based compare and it got some performance improvement.

I also compares with the C ESL, by manually generate a large number of events that has 1000+ headers (normal events would have 100+ and a typical CHANNEL_HANGUP_COMPLETE might be around 500 I don't remember exactly), looks like the bottleneck is at the ESL client which must decode all the headers from plain text to a linked list. But I'm not 100% sure since on the FS side it has to serialize 1000 headers from a linked list to string. So if we can use a binary body to avoid the serialization/deserialization it might help get better performance, but since the event is linked list it might need serialize anyway.

But for sure you only can get the bottle neck if you are runing pressure test or with very busy traffic, and ESL is better for performance. xml_rpc based on an old version of abyss (the new version is not open now) and if has new lib we can use I'm happy to replace that. btw, I extended xml_rpc to support websocket and it's been used in FreeSWITCH-Portal.
Post by João Mesquita
Tony, the swigged version of ESL python module is not at all pythonic. As an example the use of get header for events that could use a more pythonic syntax like dicts do. I didn't mean to say that I wanted to no use the ESL C implementation as base at all, I just meant that the wrapper could be done using a tool that would make the python module more pythonic but still keeping the underlying implementation in C intact. Maybe that is doable using swig an if that's the case please ignore my own stupidity.
Sent from my iPhone
Why would you want to make a non-swig version of the ESL lib? The whole point is to make sure you get a reliable client.
Everyone who tries to make their own runs into one of many challenges that are hard to overcome in a script lang. This is why you have the benefit of the wrapped C lib.
xml_rpc has a bit less capability and is for sure less stable and scalable when put head to head with ESL.
I wrote both of them myself so I'm not driven by affinity to one or the other. AFAIK xml_rpc is stable but the lib used is not so hot and I always wanted to use something better.
I sort of figured someone would say that. Actually mod_xml_rpc seems to be similar to mod_xml_curl. Since I already have that mod_xml_curl fetches from my app working well I don’t think I will switch that. Also just read that fs_cli uses ESL so that has sold me on sticking with it. I just want to make sure I am not using features that are a bit on the fringe where it’s not very active, well tested, and fixes don’t come along very often.
Sent: Wednesday, January 15, 2014 11:17 AM
Subject: Re: [Freeswitch-dev] mod_event_socket or mod_xml_rpc?
They are completely different tools for different jobs, not a one or the other situation.
I am trying to update an old abandoned app (WikiPBX) which is written using Django Python and uses mod_event_socket and mod_xml_curl to talk with Freeswitch.
I’ve got most things working except the most important part which is mod_event_socket. Now I found mod_xml_rpc which seems like a better way to go.
Just wanted to get some opinions which is the better api interface before I get too far into trying to get mod_even_socket working properly. So far it’s been quite the headache. I am currently looking at fusionpbx and bluebox code to see what they are doing.
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
--
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH
☞ irc.freenode.net (http://irc.freenode.net) #freeswitch ☞ http://freeswitch.org/g+
ClueCon Weekly Development Call
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
Anthony Minessale
2014-01-16 02:38:31 UTC
Permalink
Post by João Mesquita
Tony, the swigged version of ESL python module is not at all pythonic. As
an example the use of get header for events that could use a more pythonic
syntax like dicts do. I didn't mean to say that I wanted to no use the ESL
C implementation as base at all, I just meant that the wrapper could be
done using a tool that would make the python module more pythonic but still
keeping the underlying implementation in C intact. Maybe that is doable
using swig an if that's the case please ignore my own stupidity.
Sent from my iPhone
"pythonic" ? I'll pretend you didn't say that lol....
Post by João Mesquita
On Jan 15, 2014, at 9:30 PM, Anthony Minessale <
Why would you want to make a non-swig version of the ESL lib? The whole
point is to make sure you get a reliable client.
Everyone who tries to make their own runs into one of many challenges that
are hard to overcome in a script lang. This is why you have the benefit of
the wrapped C lib.
xml_rpc has a bit less capability and is for sure less stable and scalable
when put head to head with ESL.
I wrote both of them myself so I'm not driven by affinity to one or the
other. AFAIK xml_rpc is stable but the lib used is not so hot and I always
wanted to use something better.
Post by canuck15
I sort of figured someone would say that. Actually mod_xml_rpc seems to
be similar to mod_xml_curl. Since I already have that mod_xml_curl fetches
from my app working well I don’t think I will switch that. Also just read
that fs_cli uses ESL so that has sold me on sticking with it. I just want
to make sure I am not using features that are a bit on the fringe where
it’s not very active, well tested, and fixes don’t come along very often.
*Sent:* Wednesday, January 15, 2014 11:17 AM
*Subject:* Re: [Freeswitch-dev] mod_event_socket or mod_xml_rpc?
They are completely different tools for different jobs, not a one or the other situation.
I am trying to update an old abandoned app (WikiPBX) which is written
using Django Python and uses mod_event_socket and mod_xml_curl to talk with
Freeswitch.
I’ve got most things working except the most important part which is
mod_event_socket. Now I found mod_xml_rpc which seems like a better way to
go.
Just wanted to get some opinions which is the better api interface before
I get too far into trying to get mod_even_socket working properly. So far
it’s been quite the headache. I am currently looking at fusionpbx and
bluebox code to see what they are doing.
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
--
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞
http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
<http://freeswitch.org/g+>*
ClueCon Weekly Development Call
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
--
Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬

☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞
http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
<http://freeswitch.org/g+>*

ClueCon Weekly Development Call
☎ sip:***@conference.freeswitch.org ☎ +19193869900
João Mesquita
2014-01-16 14:18:07 UTC
Permalink
"A common neologism <http://en.wikipedia.org/wiki/Neologism> in the Python
community is *pythonic*, which can have a wide range of meanings related to
program style. To say that code is pythonic is to say that it uses Python
idioms well, that it is natural or shows fluency in the language, that it
conforms with Python's minimalist philosophy and emphasis on readability."

Source: http://en.wikipedia.org/wiki/Python_(programming_language)


João Mesquita
FreeSWITCH™ Solutions


On Wed, Jan 15, 2014 at 11:38 PM, Anthony Minessale <
Post by Anthony Minessale
Post by João Mesquita
Tony, the swigged version of ESL python module is not at all pythonic. As
an example the use of get header for events that could use a more pythonic
syntax like dicts do. I didn't mean to say that I wanted to no use the ESL
C implementation as base at all, I just meant that the wrapper could be
done using a tool that would make the python module more pythonic but still
keeping the underlying implementation in C intact. Maybe that is doable
using swig an if that's the case please ignore my own stupidity.
Sent from my iPhone
"pythonic" ? I'll pretend you didn't say that lol....
Post by João Mesquita
On Jan 15, 2014, at 9:30 PM, Anthony Minessale <
Why would you want to make a non-swig version of the ESL lib? The whole
point is to make sure you get a reliable client.
Everyone who tries to make their own runs into one of many challenges
that are hard to overcome in a script lang. This is why you have the
benefit of the wrapped C lib.
xml_rpc has a bit less capability and is for sure less stable and
scalable when put head to head with ESL.
I wrote both of them myself so I'm not driven by affinity to one or the
other. AFAIK xml_rpc is stable but the lib used is not so hot and I always
wanted to use something better.
Post by canuck15
I sort of figured someone would say that. Actually mod_xml_rpc seems to
be similar to mod_xml_curl. Since I already have that mod_xml_curl fetches
from my app working well I don’t think I will switch that. Also just read
that fs_cli uses ESL so that has sold me on sticking with it. I just want
to make sure I am not using features that are a bit on the fringe where
it’s not very active, well tested, and fixes don’t come along very often.
*Sent:* Wednesday, January 15, 2014 11:17 AM
*Subject:* Re: [Freeswitch-dev] mod_event_socket or mod_xml_rpc?
They are completely different tools for different jobs, not a one or the
other situation.
I am trying to update an old abandoned app (WikiPBX) which is written
using Django Python and uses mod_event_socket and mod_xml_curl to talk with
Freeswitch.
I’ve got most things working except the most important part which is
mod_event_socket. Now I found mod_xml_rpc which seems like a better way to
go.
Just wanted to get some opinions which is the better api interface
before I get too far into trying to get mod_even_socket working properly.
So far it’s been quite the headache. I am currently looking at fusionpbx
and bluebox code to see what they are doing.
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
--
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞
http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
<http://freeswitch.org/g+>*
ClueCon Weekly Development Call
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
--
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞
http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
<http://freeswitch.org/g+>*
ClueCon Weekly Development Call
_________________________________________________________________________
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
canuck15
2014-01-16 01:51:36 UTC
Permalink
That is exactly the sort of information I was looking for. Thanks so much. Yes I am using swig files in /libs/esl. Compiled it on swig v1.3(? whatever the version that is rpm installable on CE6) and now I tried it with v2.x. I think both are working fine and it’s a problem with the code on my end. I have a pretty good idea how to fix it. There aren’t any good Python examples but there are good PHP and Perl examples. So I think I can figure it out.



From: freeswitch-dev-***@lists.freeswitch.org [mailto:freeswitch-dev-***@lists.freeswitch.org] On Behalf Of Anthony Minessale
Sent: Wednesday, January 15, 2014 4:31 PM
To: freeswitch-***@lists.freeswitch.org
Subject: Re: [Freeswitch-dev] mod_event_socket or mod_xml_rpc?



Why would you want to make a non-swig version of the ESL lib? The whole point is to make sure you get a reliable client.

Everyone who tries to make their own runs into one of many challenges that are hard to overcome in a script lang. This is why you have the benefit of the wrapped C lib.



xml_rpc has a bit less capability and is for sure less stable and scalable when put head to head with ESL.

I wrote both of them myself so I'm not driven by affinity to one or the other. AFAIK xml_rpc is stable but the lib used is not so hot and I always wanted to use something better.

















On Wed, Jan 15, 2014 at 6:10 PM, canuck15 <***@hotmail.com <mailto:***@hotmail.com> > wrote:

I sort of figured someone would say that. Actually mod_xml_rpc seems to be similar to mod_xml_curl. Since I already have that mod_xml_curl fetches from my app working well I don’t think I will switch that. Also just read that fs_cli uses ESL so that has sold me on sticking with it. I just want to make sure I am not using features that are a bit on the fringe where it’s not very active, well tested, and fixes don’t come along very often.



From: freeswitch-dev-***@lists.freeswitch.org <mailto:freeswitch-dev-***@lists.freeswitch.org> [mailto:freeswitch-dev-***@lists.freeswitch.org <mailto:freeswitch-dev-***@lists.freeswitch.org> ] On Behalf Of Michael Jerris
Sent: Wednesday, January 15, 2014 11:17 AM
To: freeswitch-***@lists.freeswitch.org <mailto:freeswitch-***@lists.freeswitch.org>
Subject: Re: [Freeswitch-dev] mod_event_socket or mod_xml_rpc?



They are completely different tools for different jobs, not a one or the other situation.



On Jan 15, 2014, at 1:32 PM, canuck15 <***@hotmail.com <mailto:***@hotmail.com> > wrote:



I am trying to update an old abandoned app (WikiPBX) which is written using Django Python and uses mod_event_socket and mod_xml_curl to talk with Freeswitch.



I’ve got most things working except the most important part which is mod_event_socket. Now I found mod_xml_rpc which seems like a better way to go.



Just wanted to get some opinions which is the better api interface before I get too far into trying to get mod_even_socket working properly. So far it’s been quite the headache. I am currently looking at fusionpbx and bluebox code to see what they are doing.




_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
***@freeswitch.org <mailto:***@freeswitch.org>
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-dev mailing list
FreeSWITCH-***@lists.freeswitch.org <mailto:FreeSWITCH-***@lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
--
Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬



☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH

☞ irc.freenode.net <http://irc.freenode.net> #freeswitch ☞ http://freeswitch.org/g+

ClueCon Weekly Development Call

☎ sip:***@conference.freeswitch.org <mailto:sip%***@conference.freeswitch.org> ☎ +19193869900
Loading...