-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, is there a way in freeswitch to do a mysql query from the dialplan? regards helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkRvoEACgkQ4tZeNddg3dySWQCfZ/nTLgmwg4LaYipZDGKo3eUO /KgAmwVuYn/55f5nePEcbXhx6gmUnCkp =6ahU -----END PGP SIGNATURE-----
You can use JS and ODBC to access mysql... pick lua, perl, java, python, mono/c#.... /b PS: Your milage will vary depending on what is available per language. On Nov 5, 2008, at 9:40 AM, Helmut Kuper wrote:
Hello,
is there a way in freeswitch to do a mysql query from the dialplan?
regards helmut
If your mysql is in any way connected to a web front end, you could consider xml_curl.conf The dialplan will post a (huge) number of parameters to the URL (gateway-url). This way you can dynamically created you xml dialplan. That's how we mostly generate our dialplans: RoR with mysql or XSQL/XSL with Oracle. Cheers, Birgit On 05/11/08 15:49, Brian West wrote:
You can use JS and ODBC to access mysql... pick lua, perl, java, python, mono/c#....
/b PS: Your milage will vary depending on what is available per language.
On Nov 5, 2008, at 9:40 AM, Helmut Kuper wrote:
Hello,
is there a way in freeswitch to do a mysql query from the dialplan?
regards helmut
-- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- <URL: http://www.westhawk.co.uk>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, what is the performance penalty for FS using one of those languages? regards helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkRxWMACgkQ4tZeNddg3dzg9QCfdDufIOMgR3gkcNOACT67YtN4 fmsAoMH3AgQRopXNaqnAJPx1LybOaqJ0 =bHYw -----END PGP SIGNATURE-----
With mod_managed, you should get "near native" performance. (Depending on which platform, version of the runtime Win/Linux,32/64.) Mono 2.2 has some JIT improvements, MS CLR 3.5 SP1 does too. The overhead is a few MB of RAM for the runtime, but that's mostly fixed. I.e., after you load and run your code once, it'll be calling native x86/64 code. You don't have much/any per-call overhead. Compared to certain interpreted scripting languages, the difference can be 10-50x or more. On the other hand, you need to actually have a performance goal in mind; I'd guess most bottlenecks in system performance are gonna be related to networking, transcoding, accessing the database, etc, and not the few lines that send a few commands to FreeSWITCH. For let's say you use F# and download some HTML and parse it, then read it back to the user. The parsing is probably going to be so fast that it your performance is totally dominated by the downloading of the HTML. So the fact that it takes, say, 1ms in F# versus 10ms in "other language" is probably not relevant. -Michael -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Helmut Kuper Sent: Wednesday, November 05, 2008 9:10 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] FS and MySQL -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, what is the performance penalty for FS using one of those languages? regards helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkRxWMACgkQ4tZeNddg3dzg9QCfdDufIOMgR3gkcNOACT67YtN4 fmsAoMH3AgQRopXNaqnAJPx1LybOaqJ0 =bHYw -----END PGP SIGNATURE----- _______________________________________________ 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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Michael, I tried to compile mod_managed on centos 5.2/32bit, mono 1.2.4 and mono-devel files. I get this error: making all mod_managed Loader.cs(63,58): error CS1026: Expecting ')' Loader.cs(63,67): error CS1002: Expecting `;' Loader.cs(69,14): error CS1518: Expected `class', `delegate', `enum', `interface', or `struct' Loader.cs(81,28): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(105,41): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(106,51): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(107,37): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(108,46): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(111,28): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(114,38): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(120,21): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(152,27): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(171,28): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(189,21): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(201,45): error CS1031: Type expected Demo.cs(48,46): error CS1026: Expecting ')' Demo.cs(48,51): error CS1002: Expecting `;' Demo.cs(51,14): error CS1518: Expected `class', `delegate', `enum', `interface', or `struct' Demo.cs(58,14): error CS0116: A namespace can only contain types and namespace declarations Compilation failed: 19 error(s), 0 warnings make[5]: *** [mod_managed_lib.dll] Fehler 1 make[4]: *** [local_depend] Fehler 2 make[3]: *** [all] Fehler 1 make[2]: *** [mod_managed-all] Fehler 1 make[1]: *** [mod_managed] Fehler 2 make: *** [mod_managed] Fehler 2 regards Helmut Michael Giagnocavo schrieb:
With mod_managed, you should get "near native" performance. (Depending on which platform, version of the runtime Win/Linux,32/64.) Mono 2.2 has some JIT improvements, MS CLR 3.5 SP1 does too.
The overhead is a few MB of RAM for the runtime, but that's mostly fixed. I.e., after you load and run your code once, it'll be calling native x86/64 code. You don't have much/any per-call overhead.
Compared to certain interpreted scripting languages, the difference can be 10-50x or more.
On the other hand, you need to actually have a performance goal in mind; I'd guess most bottlenecks in system performance are gonna be related to networking, transcoding, accessing the database, etc, and not the few lines that send a few commands to FreeSWITCH. For let's say you use F# and download some HTML and parse it, then read it back to the user. The parsing is probably going to be so fast that it your performance is totally dominated by the downloading of the HTML. So the fact that it takes, say, 1ms in F# versus 10ms in "other language" is probably not relevant.
-Michael
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkSszQACgkQ4tZeNddg3dxXUgCeNoIY871Yuk7xB/TX1DqCs+qB JtcAoLxN7OwVUGTXjIu50v0zQIFLzsOF =yiBA -----END PGP SIGNATURE-----
You need Mono 2.0 or later. My guess is that these particular errors are caused by not using a C# 3.0 compiler. -Michael -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Helmut Kuper Sent: Thursday, November 06, 2008 2:05 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] FS and MySQL -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Michael, I tried to compile mod_managed on centos 5.2/32bit, mono 1.2.4 and mono-devel files. I get this error: making all mod_managed Loader.cs(63,58): error CS1026: Expecting ')' Loader.cs(63,67): error CS1002: Expecting `;' Loader.cs(69,14): error CS1518: Expected `class', `delegate', `enum', `interface', or `struct' Loader.cs(81,28): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(105,41): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(106,51): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(107,37): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(108,46): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(111,28): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(114,38): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(120,21): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(152,27): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(171,28): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(189,21): error CS0116: A namespace can only contain types and namespace declarations Loader.cs(201,45): error CS1031: Type expected Demo.cs(48,46): error CS1026: Expecting ')' Demo.cs(48,51): error CS1002: Expecting `;' Demo.cs(51,14): error CS1518: Expected `class', `delegate', `enum', `interface', or `struct' Demo.cs(58,14): error CS0116: A namespace can only contain types and namespace declarations Compilation failed: 19 error(s), 0 warnings make[5]: *** [mod_managed_lib.dll] Fehler 1 make[4]: *** [local_depend] Fehler 2 make[3]: *** [all] Fehler 1 make[2]: *** [mod_managed-all] Fehler 1 make[1]: *** [mod_managed] Fehler 2 make: *** [mod_managed] Fehler 2 regards Helmut Michael Giagnocavo schrieb:
With mod_managed, you should get "near native" performance. (Depending on which platform, version of the runtime Win/Linux,32/64.) Mono 2.2 has some JIT improvements, MS CLR 3.5 SP1 does too.
The overhead is a few MB of RAM for the runtime, but that's mostly fixed. I.e., after you load and run your code once, it'll be calling native x86/64 code. You don't have much/any per-call overhead.
Compared to certain interpreted scripting languages, the difference can be 10-50x or more.
On the other hand, you need to actually have a performance goal in mind; I'd guess most bottlenecks in system performance are gonna be related to networking, transcoding, accessing the database, etc, and not the few lines that send a few commands to FreeSWITCH. For let's say you use F# and download some HTML and parse it, then read it back to the user. The parsing is probably going to be so fast that it your performance is totally dominated by the downloading of the HTML. So the fact that it takes, say, 1ms in F# versus 10ms in "other language" is probably not relevant.
-Michael
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkSszQACgkQ4tZeNddg3dxXUgCeNoIY871Yuk7xB/TX1DqCs+qB JtcAoLxN7OwVUGTXjIu50v0zQIFLzsOF =yiBA -----END PGP SIGNATURE----- _______________________________________________ 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 (4)
-
Birgit Arkesteijn
-
Brian West
-
Helmut Kuper
-
Michael Giagnocavo