Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] mod_managed users?

Goto page 1, 2  Next
 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
mgg at giagnocavo.net
Guest





PostPosted: Thu Jul 16, 2009 4:47 pm    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net

Thanks!
-Michael
Back to top
dftoro at yahoo.com
Guest





PostPosted: Thu Jul 16, 2009 5:03 pm    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Hey, I am here Smile I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine. I use c# application and sqlserver 2005, using FS and mod_managed. Diego--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote: From: Michael Giagnocavo <mgg@giagnocavo.net>Subject: [Freeswitch-users] mod_managed users?To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>Date: Thursday, July 16, 2009, 4:43 PM Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net Thanks! -Michael-----Inline Attachment Follows----- _______________________________________________FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
tayeb.meftah at gmail.com
Guest





PostPosted: Thu Jul 16, 2009 5:04 pm    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

hello,
yes, i'm trying to develope modules using Mod_Managed
is working very perfectly, except that i don't know how i can run it using MONO (no .Net framework)
also i'm trying to develope a EndPoint using it
thanks
Michael Giagnocavo wrote:
Quote:
<![endif]--> <![endif]-->
Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net

Thanks!
-Michael


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4251 (20090716) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Quote:


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4251 (20090716) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4251 (20090716) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
Back to top
shaheryarkh at googlem...
Guest





PostPosted: Fri Jul 17, 2009 12:11 am    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.


On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com (dftoro@yahoo.com)> wrote:
Quote:
Hey, I am here  Smile
 
I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull.  I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.
 
I use c# application and sqlserver 2005, using FS and mod_managed.
 
Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)> wrote:

Quote:

From: Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)" <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Date: Thursday, July 16, 2009, 4:43 PM


Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net

 


Thanks!
-Michael
-----Inline Attachment Follows-----

_______________________________________________
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 (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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com (shari_786pk@hotmail.com)
Email: shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)
Back to top
shaheryarkh at googlem...
Guest





PostPosted: Sat Jul 18, 2009 8:06 am    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Sorry for replying late.

I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.

It compiles correctly this time but gives following error upon "make install",

=====================================================================
making install mod_managed
make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'.  Stop.
make[4]: *** [install] Error 1
make[3]: *** [mod_managed-install] Error 1
make[2]: *** [install-recursive] Error 1

=====================================================================

Here is compilation log when executing "make", if it could of any help.

=====================================================================
making all mod_managed
Compiling freeswitch_managed.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp
Compiling freeswitch_wrap.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp
Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used
Compilation succeeded - 1 warning(s)
Compiling mod_managed.cpp...
/usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp
libtool: compile:  g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp  -fPIC -DPIC -o .libs/mod_managed.o
mod_managed.cpp: In function ‘void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())’:
mod_managed.cpp:97: warning: deprecated conversion from string constant to ‘char*’
libtool: compile:  g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1
Creating mod_managed.la...
cat: .libs/mod_managed.log: No such file or directory

=====================================================================

Thank you.


On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)> wrote:
Quote:
I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.



On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com (dftoro@yahoo.com)> wrote:
Quote:
Hey, I am here  Smile
 
I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull.  I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.
 
I use c# application and sqlserver 2005, using FS and mod_managed.
 
Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)> wrote:

Quote:

From: Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)" <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Date: Thursday, July 16, 2009, 4:43 PM


Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net

 


Thanks!
-Michael
-----Inline Attachment Follows-----

_______________________________________________
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 (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






--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com (shari_786pk@hotmail.com)
Email: shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com (shari_786pk@hotmail.com)
Email: shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)
Back to top
mgg at giagnocavo.net
Guest





PostPosted: Sat Jul 18, 2009 1:53 pm    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Thanks for this report. I’ll look into the linux build shortly and perhaps be able to help get it working.

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Muhammad Shahzad
Sent: Saturday, July 18, 2009 6:58 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?


Sorry for replying late.

I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.

It compiles correctly this time but gives following error upon "make install",

=====================================================================
making install mod_managed
make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.
make[4]: *** [install] Error 1
make[3]: *** [mod_managed-install] Error 1
make[2]: *** [install-recursive] Error 1

=====================================================================

Here is compilation log when executing "make", if it could of any help.

=====================================================================
making all mod_managed
Compiling freeswitch_managed.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp
Compiling freeswitch_wrap.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp
Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used
Compilation succeeded - 1 warning(s)
Compiling mod_managed.cpp...
/usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.o
mod_managed.cpp: In function ‘void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())’:
mod_managed.cpp:97: warning: deprecated conversion from string constant to ‘char*’
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1
Creating mod_managed.la...
cat: .libs/mod_managed.log: No such file or directory

=====================================================================

Thank you.


On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)> wrote:
I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.



On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com (dftoro@yahoo.com)> wrote:
Hey, I am here Smile



I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.



I use c# application and sqlserver 2005, using FS and mod_managed.



Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)> wrote:
Quote:


From: Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)" <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Date: Thursday, July 16, 2009, 4:43 PM

Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net




Thanks!
-Michael
-----Inline Attachment Follows-----

_______________________________________________
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 (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





--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com (shari_786pk@hotmail.com)
Email: shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com (shari_786pk@hotmail.com)
Email: shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)
Back to top
mgg at giagnocavo.net
Guest





PostPosted: Sun Jul 26, 2009 2:29 am    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Hello,

                I just checked in a new mod_managed. It breaks backwards compatibility, but adds scripting and reloading support.

                I tested it on CentOS 5.3 x64 with Mono 2.4.2.2. Just make & make install seemed to take care of everything.

                Let me know if you have better luck with this version.

Thanks,
Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Muhammad Shahzad
Sent: Saturday, July 18, 2009 6:58 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?


Sorry for replying late.

I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.

It compiles correctly this time but gives following error upon "make install",

=====================================================================
making install mod_managed
make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.
make[4]: *** [install] Error 1
make[3]: *** [mod_managed-install] Error 1
make[2]: *** [install-recursive] Error 1

=====================================================================

Here is compilation log when executing "make", if it could of any help.

=====================================================================
making all mod_managed
Compiling freeswitch_managed.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp
Compiling freeswitch_wrap.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp
Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used
Compilation succeeded - 1 warning(s)
Compiling mod_managed.cpp...
/usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.o
mod_managed.cpp: In function ‘void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())’:
mod_managed.cpp:97: warning: deprecated conversion from string constant to ‘char*’
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1
Creating mod_managed.la...
cat: .libs/mod_managed.log: No such file or directory

=====================================================================

Thank you.


On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)> wrote:
I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.



On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com (dftoro@yahoo.com)> wrote:
Hey, I am here Smile



I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.



I use c# application and sqlserver 2005, using FS and mod_managed.



Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)> wrote:
Quote:


From: Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)" <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Date: Thursday, July 16, 2009, 4:43 PM

Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net




Thanks!
-Michael
-----Inline Attachment Follows-----

_______________________________________________
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 (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





--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com (shari_786pk@hotmail.com)
Email: shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com (shari_786pk@hotmail.com)
Email: shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)
Back to top
dftoro at yahoo.com
Guest





PostPosted: Sun Jul 26, 2009 10:00 am    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Hi Michael, Thank you for your job with mod_managed, I get lastest version with mod_managed but the files PluginInterfaces.cs, PluginManager.cs and ScriptPluginManager.cs were not downloaded. Diego --- On Sun, 7/26/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote: From: Michael Giagnocavo <mgg@giagnocavo.net>Subject: Re: [Freeswitch-users] mod_managed users?To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>Date: Sunday, July 26, 2009, 2:18 AM Hello, I just checked in a new mod_managed. It breaks backwards compatibility, but adds scripting and reloading support. I tested it on CentOS 5.3 x64 with Mono 2.4.2.2. Just make & make install seemed to take care of everything. Let me know if you have better luck with this version. Thanks, Michael From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Muhammad ShahzadSent: Saturday, July 18, 2009 6:58 AMTo: freeswitch-users@lists.freeswitch.orgSubject: Re: [Freeswitch-users] mod_managed users? Sorry for replying late.I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.It compiles correctly this time but gives following error upon "make install",=====================================================================making install mod_managedmake[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.make[4]: *** [install] Error 1make[3]: *** [mod_managed-install] Error 1make[2]: *** [install-recursive] Error 1=====================================================================Here is compilation log when executing "make", if it could of any help.=====================================================================making all mod_managedCompiling freeswitch_managed.cpp...g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cppCompiling freeswitch_wrap.cpp...g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cppDemo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never usedCompilation succeeded - 1 warning(s)Compiling mod_managed.cpp.../usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpplibtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.omod_managed.cpp: In function ‘void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())’:mod_managed.cpp:97: warning: deprecated conversion from string constant to ‘char*’libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1Creating mod_managed.la...cat: .libs/mod_managed.log: No such file or directory=====================================================================Thank you. On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)> wrote: I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.Let me try to compile it from latest FS revision and see if it works. I will let you know the results.Thank you. On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com (dftoro@yahoo.com)> wrote: Hey, I am here Smile I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine. I use c# application and sqlserver 2005, using FS and mod_managed. Diego--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)> wrote: From: Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)>Subject: [Freeswitch-users] mod_managed users?To: "freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)" <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>Date: Thursday, July 16, 2009, 4:43 PM Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)shari_786pk@hotmail.com (shari_786pk@hotmail.com)Email: shaheryarkh@googlemail.com (shaheryarkh@googlemail.com) -- Muhammad Shahzad-----------------------------------CISCO Rich Media Communication Specialist (CRMCS)CISCO Certified Network Associate (CCNA)Cell: +92 334 422 40 88MSN: shari_786pk@hotmail.com (shari_786pk@hotmail.com)Email: shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)-----Inline Attachment Follows----- _______________________________________________FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
mgg at giagnocavo.net
Guest





PostPosted: Sun Jul 26, 2009 11:42 am    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Ah, that’s embarrassing. I added them and tried building FreeSWITCH.Managed from svn and it worked fine now. (I’ll kick off a new complete build in a minute.)

-Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Diego Toro
Sent: Sunday, July 26, 2009 8:47 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?


Hi Michael,



Thank you for your job with mod_managed, I get lastest version with mod_managed but the files PluginInterfaces.cs, PluginManager.cs and ScriptPluginManager.cs were not downloaded.



Diego



--- On Sun, 7/26/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote:
Quote:


From: Michael Giagnocavo <mgg@giagnocavo.net>
Subject: Re: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>
Date: Sunday, July 26, 2009, 2:18 AM
Hello,



I just checked in a new mod_managed. It breaks backwards compatibility, but adds scripting and reloading support.


I tested it on CentOS 5.3 x64 with Mono 2.4.2.2. Just make & make install seemed to take care of everything.

Let me know if you have better luck with this version.

Thanks,
Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Muhammad Shahzad
Sent: Saturday, July 18, 2009 6:58 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?


Sorry for replying late.

I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.

It compiles correctly this time but gives following error upon "make install",

=====================================================================
making install mod_managed
make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.
make[4]: *** [install] Error 1
make[3]: *** [mod_managed-install] Error 1
make[2]: *** [install-recursive] Error 1

=====================================================================

Here is compilation log when executing "make", if it could of any help.

=====================================================================
making all mod_managed
Compiling freeswitch_managed.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp
Compiling freeswitch_wrap.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp
Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used
Compilation succeeded - 1 warning(s)
Compiling mod_managed.cpp...
/usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.o
mod_managed.cpp: In function ‘void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())’:
mod_managed.cpp:97: warning: deprecated conversion from string constant to ‘char*’
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1
Creating mod_managed.la...
cat: .libs/mod_managed.log: No such file or directory

=====================================================================

Thank you.
On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com> wrote:

I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.


On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com> wrote:

Hey, I am here Smile



I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.



I use c# application and sqlserver 2005, using FS and mod_managed.



Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote:
Quote:


From: Michael Giagnocavo <mgg@giagnocavo.net>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>
Date: Thursday, July 16, 2009, 4:43 PM



Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net





Thanks!

-Michael
-----Inline Attachment Follows-----



_______________________________________________
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


--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com


--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com

-----Inline Attachment Follows-----
_______________________________________________
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
Back to top
lzwierko at gmail.com
Guest





PostPosted: Tue Jul 28, 2009 2:33 pm    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've just tried new mod_managed under Win32 and I get a weird behavior.
I try the example below:

public class DemoScript : IApiPlugin
{
public void Execute(ApiContext context)
{
context.Stream.Write(string.Format("DemoScripts executed with
args '{0}' and event type {1}.",
context.Arguments, context.Event == null ? "<none>" :
context.Event.GetEventType()));
}

public void ExecuteBackground(ApiBackgroundContext context)
{
Log.WriteLine(LogLevel.Notice, "DemoScripts on a background
thread #({0}), with args '{1}'.",
System.Threading.Thread.CurrentThread.ManagedThreadId,
context.Arguments);
}
}

It's just like the ApiDemo from Demo.cs

So When I copy DemoScript.csx to managed dir the console log is:

"
freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx from
domain DemoScripts.csx_3
2009-07-28 20:57:16.710000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 There were 1 errors
compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx.
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 CS5001: Program
'c:\Users\Zwierko\AppData\Local\Temp\fc8jnlir.exe' does not contain a
static 'Main' method
suitable for an entry point
"

Adding

"
public static void Main()
{
}
"

solves the issue. Is this how it's supposed to work?

Another strange thing is that when I compile this class to DLL (release)
it does not work at all...

freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\FSScripts.dll from
domain FSScripts.dll_5


freeswitch@Zwierko-laptop>

freeswitch@Zwierko-laptop> managed DemoScript 111
API CALL [managed(DemoScript 111)] output:

2009-07-28 21:13:03.542000 [ERR] switch_cpp.cpp:1130 API plugin
DemoScript not found.
2009-07-28 21:13:03.542000 [ERR] mod_managed.cpp:393 Execute failed for
DemoScript 111 (unknown module or exception).

And another issue with scripts. I use script code as example:

"
public class ScriptDemo
{
static void Main()
{
switch (FreeSWITCH.Script.ContextType)
{
case ScriptContextType.Api:
{
var ctx = FreeSWITCH.Script.GetApiContext();
ctx.Stream.Write("Script executing as API with args:
" + ctx.Arguments);
break;
}
case ScriptContextType.ApiBackground:
{
var ctx = FreeSWITCH.Script.GetApiBackgroundContext();
Log.WriteLine(LogLevel.Notice, "Executing as
APIBackground with args: " + ctx.Arguments);
break;
}
case ScriptContextType.App:
{
var ctx = FreeSWITCH.Script.GetAppContext();
Log.WriteLine(LogLevel.Notice, "Executing as App
with args: " + ctx.Arguments);
break;
}
}

}
}
"


console log is as follows:


freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx from
domain Script.csx_8
2009-07-28 21:19:36.289000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx
2009-07-28 21:19:36.438000 [INFO] switch_cpp.cpp:1130 File
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx compiled
successfully.
2009-07-28 21:19:36.451000 [ERR] switch_cpp.cpp:1130 Entry point:
ScriptDemo.Main is not public. This may cause errors with Mono.
2009-07-28 21:19:36.458000 [NOTICE] switch_cpp.cpp:1130 Loaded App
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [NOTICE] switch_cpp.cpp:1130 Loaded Api
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [INFO] switch_cpp.cpp:1130 Finished loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx into
domain Script.csx_8.
managed ScriptDemo 111
2009-07-28 21:19:53.452000 [ERR] switch_cpp.cpp:1130 API plugin
ScriptDemo not found.
API CALL [managed(ScriptDemo 111)] output:

2009-07-28 21:19:53.452000 [ERR] mod_managed.cpp:393 Execute failed for
ScriptDemo 111 (unknown module or exception).


Again, am I doing something wrong in here?

Thanks, for any feedback

Lukasz Zwierko





Michael Giagnocavo wrote:
Quote:
Ah, that’s embarrassing. I added them and tried building FreeSWITCH.Managed from svn and it worked fine now. (I’ll kick off a new complete build in a minute.)

-Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Diego Toro
Sent: Sunday, July 26, 2009 8:47 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Hi Michael,

Thank you for your job with mod_managed, I get lastest version with mod_managed but the files PluginInterfaces.cs, PluginManager.cs and ScriptPluginManager.cs were not downloaded.

Diego


--- On Sun, 7/26/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net>
Subject: Re: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>
Date: Sunday, July 26, 2009, 2:18 AM
Hello,

I just checked in a new mod_managed. It breaks backwards compatibility, but adds scripting and reloading support.

I tested it on CentOS 5.3 x64 with Mono 2.4.2.2. Just make & make install seemed to take care of everything.

Let me know if you have better luck with this version.

Thanks,
Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Muhammad Shahzad
Sent: Saturday, July 18, 2009 6:58 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Sorry for replying late.

I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.

It compiles correctly this time but gives following error upon "make install",

=====================================================================
making install mod_managed
make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.
make[4]: *** [install] Error 1
make[3]: *** [mod_managed-install] Error 1
make[2]: *** [install-recursive] Error 1

=====================================================================

Here is compilation log when executing "make", if it could of any help.

=====================================================================
making all mod_managed
Compiling freeswitch_managed.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp
Compiling freeswitch_wrap.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp
Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used
Compilation succeeded - 1 warning(s)
Compiling mod_managed.cpp...
/usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.o
mod_managed.cpp: In function ‘void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())’:
mod_managed.cpp:97: warning: deprecated conversion from string constant to ‘char*’
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1
Creating mod_managed.la...
cat: .libs/mod_managed.log: No such file or directory

=====================================================================

Thank you.
On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>> wrote:
I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.

On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com<http://us.mc335.mail.yahoo.com/mc/compose?to=dftoro@yahoo.com>> wrote:
Hey, I am here :)

I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.

I use c# application and sqlserver 2005, using FS and mod_managed.

Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>" <freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>>
Date: Thursday, July 16, 2009, 4:43 PM

Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net<http://giagnocavo.net/>

Thanks!
-Michael
-----Inline Attachment Follows-----

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>


--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>

-----Inline Attachment Follows-----
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJKb1CvAAoJED7LBosr0F2u6E4H/i0SVOJDrh4+3ex6nEDnVJQl
mLjTPpyoAyP3cEp37YmQbrk2DAqfmQgysygaiKP6yxdFsyDsPmphMV1biWGi8DgM
pwTiGQACFdWWiWiYk/J09ZbRJR24S8zHxuETQK93/7fy53tgqW6o35hLxb3arOaH
VOAUDHQkMX7Q/PFaorWk/bhYDbq6+XxwkBCQHeMk3zErZT1rl+haxVtBXN1N0h8+
k5t3C5bJpPNjpTmm4m0BEOdA7WfU2iFIJeOH9ZoHih01n68COnb52pl349Ah2fV8
cVVouTbOtjGsRpyq9OYh7XhIFzH/QUZQykL/BMlR3Df3g8KRJ8Q8p/zj5bNRDlA=
=LgK4
-----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
Back to top
mgg at giagnocavo.net
Guest





PostPosted: Tue Jul 28, 2009 4:14 pm    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Hello Lukasz,

Thanks for testing mod_managed. I apologize for the problems you've encountered, and I'll try to sort them out for you.

A few things first:

- Scripting support: This is made to allow "true" scripts, as invoked as an EXE - similar to the Lua and spidermonkey support. So, without a Main(), it won't compile as an EXE. If you aren't using it as a script, then an empty Main method will work fine.

- Entry points must be public for Mono. I'll update the demo code to make sure that Main is public. This is a bug in Mono's lightweight code generation -- it won't skip the JIT access checks.

As to the main problem of your DLL not working, can you send me the full source code, or all the logging output from loading it? Try "managedreload my.dll" to reload the DLL and see how it is registering them. It should output something like "Registering API FullName with Aliases fullname, shortname".

Thanks,
Michael

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Lukasz Zwierko
Sent: Tuesday, July 28, 2009 1:26 PM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've just tried new mod_managed under Win32 and I get a weird behavior.
I try the example below:

public class DemoScript : IApiPlugin
{
public void Execute(ApiContext context)
{
context.Stream.Write(string.Format("DemoScripts executed with
args '{0}' and event type {1}.",
context.Arguments, context.Event == null ? "<none>" :
context.Event.GetEventType()));
}

public void ExecuteBackground(ApiBackgroundContext context)
{
Log.WriteLine(LogLevel.Notice, "DemoScripts on a background
thread #({0}), with args '{1}'.",
System.Threading.Thread.CurrentThread.ManagedThreadId,
context.Arguments);
}
}

It's just like the ApiDemo from Demo.cs

So When I copy DemoScript.csx to managed dir the console log is:

"
freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx from
domain DemoScripts.csx_3
2009-07-28 20:57:16.710000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 There were 1 errors
compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx.
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 CS5001: Program
'c:\Users\Zwierko\AppData\Local\Temp\fc8jnlir.exe' does not contain a
static 'Main' method
suitable for an entry point
"

Adding

"
public static void Main()
{
}
"

solves the issue. Is this how it's supposed to work?

Another strange thing is that when I compile this class to DLL (release)
it does not work at all...

freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\FSScripts.dll from
domain FSScripts.dll_5


freeswitch@Zwierko-laptop>

freeswitch@Zwierko-laptop> managed DemoScript 111
API CALL [managed(DemoScript 111)] output:

2009-07-28 21:13:03.542000 [ERR] switch_cpp.cpp:1130 API plugin
DemoScript not found.
2009-07-28 21:13:03.542000 [ERR] mod_managed.cpp:393 Execute failed for
DemoScript 111 (unknown module or exception).

And another issue with scripts. I use script code as example:

"
public class ScriptDemo
{
static void Main()
{
switch (FreeSWITCH.Script.ContextType)
{
case ScriptContextType.Api:
{
var ctx = FreeSWITCH.Script.GetApiContext();
ctx.Stream.Write("Script executing as API with args:
" + ctx.Arguments);
break;
}
case ScriptContextType.ApiBackground:
{
var ctx = FreeSWITCH.Script.GetApiBackgroundContext();
Log.WriteLine(LogLevel.Notice, "Executing as
APIBackground with args: " + ctx.Arguments);
break;
}
case ScriptContextType.App:
{
var ctx = FreeSWITCH.Script.GetAppContext();
Log.WriteLine(LogLevel.Notice, "Executing as App
with args: " + ctx.Arguments);
break;
}
}

}
}
"


console log is as follows:


freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx from
domain Script.csx_8
2009-07-28 21:19:36.289000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx
2009-07-28 21:19:36.438000 [INFO] switch_cpp.cpp:1130 File
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx compiled
successfully.
2009-07-28 21:19:36.451000 [ERR] switch_cpp.cpp:1130 Entry point:
ScriptDemo.Main is not public. This may cause errors with Mono.
2009-07-28 21:19:36.458000 [NOTICE] switch_cpp.cpp:1130 Loaded App
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [NOTICE] switch_cpp.cpp:1130 Loaded Api
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [INFO] switch_cpp.cpp:1130 Finished loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx into
domain Script.csx_8.
managed ScriptDemo 111
2009-07-28 21:19:53.452000 [ERR] switch_cpp.cpp:1130 API plugin
ScriptDemo not found.
API CALL [managed(ScriptDemo 111)] output:

2009-07-28 21:19:53.452000 [ERR] mod_managed.cpp:393 Execute failed for
ScriptDemo 111 (unknown module or exception).


Again, am I doing something wrong in here?

Thanks, for any feedback

Lukasz Zwierko





Michael Giagnocavo wrote:
Quote:
Ah, that’s embarrassing. I added them and tried building FreeSWITCH.Managed from svn and it worked fine now. (I’ll kick off a new complete build in a minute.)

-Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Diego Toro
Sent: Sunday, July 26, 2009 8:47 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Hi Michael,

Thank you for your job with mod_managed, I get lastest version with mod_managed but the files PluginInterfaces.cs, PluginManager.cs and ScriptPluginManager.cs were not downloaded.

Diego


--- On Sun, 7/26/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net>
Subject: Re: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>
Date: Sunday, July 26, 2009, 2:18 AM
Hello,

I just checked in a new mod_managed. It breaks backwards compatibility, but adds scripting and reloading support.

I tested it on CentOS 5.3 x64 with Mono 2.4.2.2. Just make & make install seemed to take care of everything.

Let me know if you have better luck with this version.

Thanks,
Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Muhammad Shahzad
Sent: Saturday, July 18, 2009 6:58 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Sorry for replying late.

I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.

It compiles correctly this time but gives following error upon "make install",

=====================================================================
making install mod_managed
make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.
make[4]: *** [install] Error 1
make[3]: *** [mod_managed-install] Error 1
make[2]: *** [install-recursive] Error 1

=====================================================================

Here is compilation log when executing "make", if it could of any help.

=====================================================================
making all mod_managed
Compiling freeswitch_managed.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp
Compiling freeswitch_wrap.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp
Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used
Compilation succeeded - 1 warning(s)
Compiling mod_managed.cpp...
/usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.o
mod_managed.cpp: In function ‘void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())’:
mod_managed.cpp:97: warning: deprecated conversion from string constant to ‘char*’
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1
Creating mod_managed.la...
cat: .libs/mod_managed.log: No such file or directory

=====================================================================

Thank you.
On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>> wrote:
I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.

On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com<http://us.mc335.mail.yahoo.com/mc/compose?to=dftoro@yahoo.com>> wrote:
Hey, I am here Smile

I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.

I use c# application and sqlserver 2005, using FS and mod_managed.

Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>" <freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>>
Date: Thursday, July 16, 2009, 4:43 PM

Hey, if there are any mod_managed users on this list, I’d love it if you were able to let me know. I’d like to get feedback, positive or negative, on what worked, what didn’t, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net<http://giagnocavo.net/>

Thanks!
-Michael
-----Inline Attachment Follows-----

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>


--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>

-----Inline Attachment Follows-----
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJKb1CvAAoJED7LBosr0F2u6E4H/i0SVOJDrh4+3ex6nEDnVJQl
mLjTPpyoAyP3cEp37YmQbrk2DAqfmQgysygaiKP6yxdFsyDsPmphMV1biWGi8DgM
pwTiGQACFdWWiWiYk/J09ZbRJR24S8zHxuETQK93/7fy53tgqW6o35hLxb3arOaH
VOAUDHQkMX7Q/PFaorWk/bhYDbq6+XxwkBCQHeMk3zErZT1rl+haxVtBXN1N0h8+
k5t3C5bJpPNjpTmm4m0BEOdA7WfU2iFIJeOH9ZoHih01n68COnb52pl349Ah2fV8
cVVouTbOtjGsRpyq9OYh7XhIFzH/QUZQykL/BMlR3Df3g8KRJ8Q8p/zj5bNRDlA=
=LgK4
-----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
_______________________________________________
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
Back to top
lzwierko at gmail.com
Guest





PostPosted: Wed Jul 29, 2009 1:24 am    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Hi Michael ,

thanks a lot for support on this.

Quote:
As to the main problem of your DLL not working, can you send me the full source code, or all the logging output from loading it? Try "managedreload my.dll" to reload the DLL and see how it is registering them. It should output something like "Registering API FullName with Aliases fullname, shortname".


I'm just using the Demo.cs example, I compile it to dll undef VC#, not
mono, maybe that is the difference?
The output from the log is just as you stated "Registering API
FullName with Aliases fullname, shortname". The difference between
loading dll and csx is that, when loading csx all api and app classes
are listed as registered, while with dll nothing is listed..

Anyway, I have another question regarding usage of the CoreSession and
ManagedSession object.
Basically in my script I want to start new session and originate a call.
So what I do is

ManageSession session = new ManagedSession();
session.Originate(session,"sofia/default/1000",10);

And it works but I have some doubts. First thing is, why the first
param of the Originate method is the CoreSession object? Can't it just
use 'this'? Or is there more to it?

Second thing is the third parameter - timeout in seconds. Can't the
call be started in non-blocking mode? I can start in a different
thread of course, is that the intended behavior?

Thanks for help,

ukasz


2009/7/28 Michael Giagnocavo <mgg@giagnocavo.net>:
Quote:
Hello Lukasz,

Thanks for testing mod_managed. I apologize for the problems you've encountered, and I'll try to sort them out for you.

A few things first:

- Scripting support: This is made to allow "true" scripts, as invoked as an EXE - similar to the Lua and spidermonkey support. So, without a Main(), it won't compile as an EXE. If you aren't using it as a script, then an empty Main method will work fine.

- Entry points must be public for Mono. I'll update the demo code to make sure that Main is public. This is a bug in Mono's lightweight code generation -- it won't skip the JIT access checks.

As to the main problem of your DLL not working, can you send me the full source code, or all the logging output from loading it? Try "managedreload my.dll" to reload the DLL and see how it is registering them. It should output something like "Registering API FullName with Aliases fullname, shortname".

Thanks,
Michael

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Lukasz Zwierko
Sent: Tuesday, July 28, 2009 1:26 PM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've just tried new mod_managed under Win32 and I get a weird behavior.
I try the example below:

public class DemoScript : IApiPlugin
{
public void Execute(ApiContext context)
{
context.Stream.Write(string.Format("DemoScripts executed with
args '{0}' and event type {1}.",
context.Arguments, context.Event == null ? "<none>" :
context.Event.GetEventType()));
}

public void ExecuteBackground(ApiBackgroundContext context)
{
Log.WriteLine(LogLevel.Notice, "DemoScripts on a background
thread #({0}), with args '{1}'.",
System.Threading.Thread.CurrentThread.ManagedThreadId,
context.Arguments);
}
}

It's just like the ApiDemo from Demo.cs

So When I copy DemoScript.csx to managed dir the console log is:

"
freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx from
domain DemoScripts.csx_3
2009-07-28 20:57:16.710000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 There were 1 errors
compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx.
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 CS5001: Program
'c:\Users\Zwierko\AppData\Local\Temp\fc8jnlir.exe' does not contain a
static 'Main' method
suitable for an entry point
"

Adding

"
public static void Main()
{
}
"

solves the issue. Is this how it's supposed to work?

Another strange thing is that when I compile this class to DLL (release)
it does not work at all...

freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\FSScripts.dll from
domain FSScripts.dll_5


freeswitch@Zwierko-laptop>

freeswitch@Zwierko-laptop> managed DemoScript 111
API CALL [managed(DemoScript 111)] output:

2009-07-28 21:13:03.542000 [ERR] switch_cpp.cpp:1130 API plugin
DemoScript not found.
2009-07-28 21:13:03.542000 [ERR] mod_managed.cpp:393 Execute failed for
DemoScript 111 (unknown module or exception).

And another issue with scripts. I use script code as example:

"
public class ScriptDemo
{
static void Main()
{
switch (FreeSWITCH.Script.ContextType)
{
case ScriptContextType.Api:
{
var ctx = FreeSWITCH.Script.GetApiContext();
ctx.Stream.Write("Script executing as API with args:
" + ctx.Arguments);
break;
}
case ScriptContextType.ApiBackground:
{
var ctx = FreeSWITCH.Script.GetApiBackgroundContext();
Log.WriteLine(LogLevel.Notice, "Executing as
APIBackground with args: " + ctx.Arguments);
break;
}
case ScriptContextType.App:
{
var ctx = FreeSWITCH.Script.GetAppContext();
Log.WriteLine(LogLevel.Notice, "Executing as App
with args: " + ctx.Arguments);
break;
}
}

}
}
"


console log is as follows:


freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx from
domain Script.csx_8
2009-07-28 21:19:36.289000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx
2009-07-28 21:19:36.438000 [INFO] switch_cpp.cpp:1130 File
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx compiled
successfully.
2009-07-28 21:19:36.451000 [ERR] switch_cpp.cpp:1130 Entry point:
ScriptDemo.Main is not public. This may cause errors with Mono.
2009-07-28 21:19:36.458000 [NOTICE] switch_cpp.cpp:1130 Loaded App
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [NOTICE] switch_cpp.cpp:1130 Loaded Api
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [INFO] switch_cpp.cpp:1130 Finished loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx into
domain Script.csx_8.
managed ScriptDemo 111
2009-07-28 21:19:53.452000 [ERR] switch_cpp.cpp:1130 API plugin
ScriptDemo not found.
API CALL [managed(ScriptDemo 111)] output:

2009-07-28 21:19:53.452000 [ERR] mod_managed.cpp:393 Execute failed for
ScriptDemo 111 (unknown module or exception).


Again, am I doing something wrong in here?

Thanks, for any feedback

Lukasz Zwierko





Michael Giagnocavo wrote:
Quote:
Ah, that's embarrassing. I added them and tried building FreeSWITCH.Managed from svn and it worked fine now. (I'll kick off a new complete build in a minute.)

-Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Diego Toro
Sent: Sunday, July 26, 2009 8:47 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Hi Michael,

Thank you for your job with mod_managed, I get lastest version with mod_managed but the files PluginInterfaces.cs, PluginManager.cs and ScriptPluginManager.cs were not downloaded.

Diego


--- On Sun, 7/26/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net>
Subject: Re: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>
Date: Sunday, July 26, 2009, 2:18 AM
Hello,

I just checked in a new mod_managed. It breaks backwards compatibility, but adds scripting and reloading support.

I tested it on CentOS 5.3 x64 with Mono 2.4.2.2. Just make & make install seemed to take care of everything.

Let me know if you have better luck with this version.

Thanks,
Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Muhammad Shahzad
Sent: Saturday, July 18, 2009 6:58 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Sorry for replying late.

I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.

It compiles correctly this time but gives following error upon "make install",

=====================================================================
making install mod_managed
make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.
make[4]: *** [install] Error 1
make[3]: *** [mod_managed-install] Error 1
make[2]: *** [install-recursive] Error 1

=====================================================================

Here is compilation log when executing "make", if it could of any help.

=====================================================================
making all mod_managed
Compiling freeswitch_managed.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp
Compiling freeswitch_wrap.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp
Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used
Compilation succeeded - 1 warning(s)
Compiling mod_managed.cpp...
/usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.o
mod_managed.cpp: In function 'void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())':
mod_managed.cpp:97: warning: deprecated conversion from string constant to 'char*'
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1
Creating mod_managed.la...
cat: .libs/mod_managed.log: No such file or directory

=====================================================================

Thank you.
On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>> wrote:
I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.

On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com<http://us.mc335.mail.yahoo.com/mc/compose?to=dftoro@yahoo.com>> wrote:
Hey, I am here Smile

I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.

I use c# application and sqlserver 2005, using FS and mod_managed.

Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>" <freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>>
Date: Thursday, July 16, 2009, 4:43 PM

Hey, if there are any mod_managed users on this list, I'd love it if you were able to let me know. I'd like to get feedback, positive or negative, on what worked, what didn't, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net<http://giagnocavo.net/>

Thanks!
-Michael
-----Inline Attachment Follows-----

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>


--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>

-----Inline Attachment Follows-----
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJKb1CvAAoJED7LBosr0F2u6E4H/i0SVOJDrh4+3ex6nEDnVJQl
mLjTPpyoAyP3cEp37YmQbrk2DAqfmQgysygaiKP6yxdFsyDsPmphMV1biWGi8DgM
pwTiGQACFdWWiWiYk/J09ZbRJR24S8zHxuETQK93/7fy53tgqW6o35hLxb3arOaH
VOAUDHQkMX7Q/PFaorWk/bhYDbq6+XxwkBCQHeMk3zErZT1rl+haxVtBXN1N0h8+
k5t3C5bJpPNjpTmm4m0BEOdA7WfU2iFIJeOH9ZoHih01n68COnb52pl349Ah2fV8
cVVouTbOtjGsRpyq9OYh7XhIFzH/QUZQykL/BMlR3Df3g8KRJ8Q8p/zj5bNRDlA=
=LgK4
-----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
_______________________________________________
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
Back to top
mgg at giagnocavo.net
Guest





PostPosted: Wed Jul 29, 2009 1:55 am    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Hi ukasz,

Would you please send me the DLL offlist and I'll figure it out?

The new session you create is the b-leg. The parameter it takes in originate is the a-leg. So you'd do:

var session = new ManagedSession();
session.Originate(context.Session, "sofia/default/1000",10);

As to non-blocking, I'm quite sure it's possible, but I don't recall offhand which functions. This should be the same as in any other language for FreeSWITCH -- these functions are just passthrough from the FS C++ API.

-Michael

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Lukasz Zwierko
Sent: Wednesday, July 29, 2009 12:13 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Hi Michael ,

thanks a lot for support on this.

Quote:
As to the main problem of your DLL not working, can you send me the full source code, or all the logging output from loading it? Try "managedreload my.dll" to reload the DLL and see how it is registering them. It should output something like "Registering API FullName with Aliases fullname, shortname".


I'm just using the Demo.cs example, I compile it to dll undef VC#, not
mono, maybe that is the difference?
The output from the log is just as you stated "Registering API
FullName with Aliases fullname, shortname". The difference between
loading dll and csx is that, when loading csx all api and app classes
are listed as registered, while with dll nothing is listed..

Anyway, I have another question regarding usage of the CoreSession and
ManagedSession object.
Basically in my script I want to start new session and originate a call.
So what I do is

ManageSession session = new ManagedSession();
session.Originate(session,"sofia/default/1000",10);

And it works but I have some doubts. First thing is, why the first
param of the Originate method is the CoreSession object? Can't it just
use 'this'? Or is there more to it?

Second thing is the third parameter - timeout in seconds. Can't the
call be started in non-blocking mode? I can start in a different
thread of course, is that the intended behavior?

Thanks for help,

ukasz


2009/7/28 Michael Giagnocavo <mgg@giagnocavo.net>:
Quote:
Hello Lukasz,

Thanks for testing mod_managed. I apologize for the problems you've encountered, and I'll try to sort them out for you.

A few things first:

- Scripting support: This is made to allow "true" scripts, as invoked as an EXE - similar to the Lua and spidermonkey support. So, without a Main(), it won't compile as an EXE. If you aren't using it as a script, then an empty Main method will work fine.

- Entry points must be public for Mono. I'll update the demo code to make sure that Main is public. This is a bug in Mono's lightweight code generation -- it won't skip the JIT access checks.

As to the main problem of your DLL not working, can you send me the full source code, or all the logging output from loading it? Try "managedreload my.dll" to reload the DLL and see how it is registering them. It should output something like "Registering API FullName with Aliases fullname, shortname".

Thanks,
Michael

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Lukasz Zwierko
Sent: Tuesday, July 28, 2009 1:26 PM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've just tried new mod_managed under Win32 and I get a weird behavior.
I try the example below:

public class DemoScript : IApiPlugin
{
public void Execute(ApiContext context)
{
context.Stream.Write(string.Format("DemoScripts executed with
args '{0}' and event type {1}.",
context.Arguments, context.Event == null ? "<none>" :
context.Event.GetEventType()));
}

public void ExecuteBackground(ApiBackgroundContext context)
{
Log.WriteLine(LogLevel.Notice, "DemoScripts on a background
thread #({0}), with args '{1}'.",
System.Threading.Thread.CurrentThread.ManagedThreadId,
context.Arguments);
}
}

It's just like the ApiDemo from Demo.cs

So When I copy DemoScript.csx to managed dir the console log is:

"
freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx from
domain DemoScripts.csx_3
2009-07-28 20:57:16.710000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 There were 1 errors
compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx.
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 CS5001: Program
'c:\Users\Zwierko\AppData\Local\Temp\fc8jnlir.exe' does not contain a
static 'Main' method
suitable for an entry point
"

Adding

"
public static void Main()
{
}
"

solves the issue. Is this how it's supposed to work?

Another strange thing is that when I compile this class to DLL (release)
it does not work at all...

freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\FSScripts.dll from
domain FSScripts.dll_5


freeswitch@Zwierko-laptop>

freeswitch@Zwierko-laptop> managed DemoScript 111
API CALL [managed(DemoScript 111)] output:

2009-07-28 21:13:03.542000 [ERR] switch_cpp.cpp:1130 API plugin
DemoScript not found.
2009-07-28 21:13:03.542000 [ERR] mod_managed.cpp:393 Execute failed for
DemoScript 111 (unknown module or exception).

And another issue with scripts. I use script code as example:

"
public class ScriptDemo
{
static void Main()
{
switch (FreeSWITCH.Script.ContextType)
{
case ScriptContextType.Api:
{
var ctx = FreeSWITCH.Script.GetApiContext();
ctx.Stream.Write("Script executing as API with args:
" + ctx.Arguments);
break;
}
case ScriptContextType.ApiBackground:
{
var ctx = FreeSWITCH.Script.GetApiBackgroundContext();
Log.WriteLine(LogLevel.Notice, "Executing as
APIBackground with args: " + ctx.Arguments);
break;
}
case ScriptContextType.App:
{
var ctx = FreeSWITCH.Script.GetAppContext();
Log.WriteLine(LogLevel.Notice, "Executing as App
with args: " + ctx.Arguments);
break;
}
}

}
}
"


console log is as follows:


freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx from
domain Script.csx_8
2009-07-28 21:19:36.289000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx
2009-07-28 21:19:36.438000 [INFO] switch_cpp.cpp:1130 File
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx compiled
successfully.
2009-07-28 21:19:36.451000 [ERR] switch_cpp.cpp:1130 Entry point:
ScriptDemo.Main is not public. This may cause errors with Mono.
2009-07-28 21:19:36.458000 [NOTICE] switch_cpp.cpp:1130 Loaded App
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [NOTICE] switch_cpp.cpp:1130 Loaded Api
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [INFO] switch_cpp.cpp:1130 Finished loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx into
domain Script.csx_8.
managed ScriptDemo 111
2009-07-28 21:19:53.452000 [ERR] switch_cpp.cpp:1130 API plugin
ScriptDemo not found.
API CALL [managed(ScriptDemo 111)] output:

2009-07-28 21:19:53.452000 [ERR] mod_managed.cpp:393 Execute failed for
ScriptDemo 111 (unknown module or exception).


Again, am I doing something wrong in here?

Thanks, for any feedback

Lukasz Zwierko





Michael Giagnocavo wrote:
Quote:
Ah, that's embarrassing. I added them and tried building FreeSWITCH.Managed from svn and it worked fine now. (I'll kick off a new complete build in a minute.)

-Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Diego Toro
Sent: Sunday, July 26, 2009 8:47 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Hi Michael,

Thank you for your job with mod_managed, I get lastest version with mod_managed but the files PluginInterfaces.cs, PluginManager.cs and ScriptPluginManager.cs were not downloaded.

Diego


--- On Sun, 7/26/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net>
Subject: Re: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>
Date: Sunday, July 26, 2009, 2:18 AM
Hello,

I just checked in a new mod_managed. It breaks backwards compatibility, but adds scripting and reloading support.

I tested it on CentOS 5.3 x64 with Mono 2.4.2.2. Just make & make install seemed to take care of everything.

Let me know if you have better luck with this version.

Thanks,
Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Muhammad Shahzad
Sent: Saturday, July 18, 2009 6:58 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Sorry for replying late.

I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.

It compiles correctly this time but gives following error upon "make install",

=====================================================================
making install mod_managed
make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.
make[4]: *** [install] Error 1
make[3]: *** [mod_managed-install] Error 1
make[2]: *** [install-recursive] Error 1

=====================================================================

Here is compilation log when executing "make", if it could of any help.

=====================================================================
making all mod_managed
Compiling freeswitch_managed.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp
Compiling freeswitch_wrap.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp
Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used
Compilation succeeded - 1 warning(s)
Compiling mod_managed.cpp...
/usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.o
mod_managed.cpp: In function 'void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())':
mod_managed.cpp:97: warning: deprecated conversion from string constant to 'char*'
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1
Creating mod_managed.la...
cat: .libs/mod_managed.log: No such file or directory

=====================================================================

Thank you.
On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>> wrote:
I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.

On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com<http://us.mc335.mail.yahoo.com/mc/compose?to=dftoro@yahoo.com>> wrote:
Hey, I am here Smile

I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.

I use c# application and sqlserver 2005, using FS and mod_managed.

Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>" <freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>>
Date: Thursday, July 16, 2009, 4:43 PM

Hey, if there are any mod_managed users on this list, I'd love it if you were able to let me know. I'd like to get feedback, positive or negative, on what worked, what didn't, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net<http://giagnocavo.net/>

Thanks!
-Michael
-----Inline Attachment Follows-----

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>


--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>

-----Inline Attachment Follows-----
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJKb1CvAAoJED7LBosr0F2u6E4H/i0SVOJDrh4+3ex6nEDnVJQl
mLjTPpyoAyP3cEp37YmQbrk2DAqfmQgysygaiKP6yxdFsyDsPmphMV1biWGi8DgM
pwTiGQACFdWWiWiYk/J09ZbRJR24S8zHxuETQK93/7fy53tgqW6o35hLxb3arOaH
VOAUDHQkMX7Q/PFaorWk/bhYDbq6+XxwkBCQHeMk3zErZT1rl+haxVtBXN1N0h8+
k5t3C5bJpPNjpTmm4m0BEOdA7WfU2iFIJeOH9ZoHih01n68COnb52pl349Ah2fV8
cVVouTbOtjGsRpyq9OYh7XhIFzH/QUZQykL/BMlR3Df3g8KRJ8Q8p/zj5bNRDlA=
=LgK4
-----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
_______________________________________________
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

_______________________________________________
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
Back to top
dftoro at yahoo.com
Guest





PostPosted: Wed Jul 29, 2009 1:51 pm    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

Hi Michael, I am working with lastest managed module, I have assemblies wich dependen of others assemblies (dll's), the past version it works fine, but I have now next the error message: EXECUTE sofia/internal/10510@192.168.27.10 ([email]sofia/internal/10510@192.168.27.10[/email]) managed(CIV_BPFSProcess)2009-07-29 13:31:27.718750 [DEBUG] switch_cpp.cpp:1130 FreeSWITCH.Managed: attempting to run application 'CIV_BPFSProcess'.2009-07-29 13:31:27.718750 [ERR] switch_cpp.cpp:1130 App plugin CIV_BPFSProcess not found.2009-07-29 13:31:27.718750 [ERR] mod_managed.cpp:405 Application run failed for CIV_BPFSProcess (unknown module or exception). My declaration class is:public class CIV_BPFSProcess : FreeSWITCH.IAppPlugin It has public method: public void Run(AppContext context). I have VS2008 on WindowsThanks Diego--- On Wed, 7/29/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote: From: Michael Giagnocavo <mgg@giagnocavo.net>Subject: Re: [Freeswitch-users] mod_managed users?To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>Date: Wednesday, July 29, 2009, 1:46 AM Hi Łukasz, Would you please send me the DLL offlist and I'll figure it out? The new session you create is the b-leg. The parameter it takes in originate is the a-leg. So you'd do:var session = new ManagedSession();session.Originate(context.Session, "sofia/default/1000",10); As to non-blocking, I'm quite sure it's possible, but I don't recall offhand which functions. This should be the same as in any other language for FreeSWITCH -- these functions are just passthrough from the FS C++ API.-Michael-----Original Message-----From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Lukasz ZwierkoSent: Wednesday, July 29, 2009 12:13 AMTo: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)Subject: Re: [Freeswitch-users] mod_managed users?Hi Michael ,thanks a lot for support on this.> As to the main problem of your DLL not working, can you send me the full source code, or all the logging output from loading it? Try "managedreload my.dll" to reload the DLL and see how it is registering them. It should output something like "Registering API FullName with Aliases fullname, shortname".>I'm just using the Demo.cs example, I compile it to dll undef VC#, notmono, maybe that is the difference?The output from the log is just as you stated "Registering APIFullName with Aliases fullname, shortname". The difference betweenloading dll and csx is that, when loading csx all api and app classesare listed as registered, while with dll nothing is listed..Anyway, I have another question regarding usage of the CoreSession andManagedSession object.Basically in my script I want to start new session and originate a call.So what I do isManageSession session = new ManagedSession();session.Originate(session,"sofia/default/1000",10);And it works but I have some doubts. First thing is, why the firstparam of the Originate method is the CoreSession object? Can't it justuse 'this'? Or is there more to it?Second thing is the third parameter - timeout in seconds. Can't thecall be started in non-blocking mode? I can start in a differentthread of course, is that the intended behavior?Thanks for help,Łukasz2009/7/28 Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)>:> Hello Lukasz,>> Thanks for testing mod_managed. I apologize for the problems you've encountered, and I'll try to sort them out for you.>> A few things first:>> - Scripting support: This is made to allow "true" scripts, as invoked as an EXE - similar to the Lua and spidermonkey support. So, without a Main(), it won't compile as an EXE. If you aren't using it as a script, then an empty Main method will work fine.>> - Entry points must be public for Mono. I'll update the demo code to make sure that Main is public. This is a bug in Mono's lightweight code generation -- it won't skip the JIT access checks.>> As to the main problem of your DLL not working, can you send me the full source code, or all the logging output from loading it? Try "managedreload my.dll" to reload the DLL and see how it is registering them. It should output something like "Registering API FullName with Aliases fullname, shortname".>> Thanks,> Michael>> -----Original Message-----> From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Lukasz Zwierko> Sent: Tuesday, July 28, 2009 1:26 PM> To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)> Subject: Re: [Freeswitch-users] mod_managed users?>> -----BEGIN PGP SIGNED MESSAGE-----> Hash: SHA1>> Hi,>> I've just tried new mod_managed under Win32 and I get a weird behavior.> I try the example below:>> public class DemoScript : IApiPlugin> {> public void Execute(ApiContext context)> {> context.Stream.Write(string.Format("DemoScripts executed with> args '{0}' and event type {1}.",> context.Arguments, context.Event == null ? "<none>" :> context.Event.GetEventType()));> }>> public void ExecuteBackground(ApiBackgroundContext context)> {> Log.WriteLine(LogLevel.Notice, "DemoScripts on a background> thread #({0}), with args '{1}'.",> System.Threading.Thread.CurrentThread.ManagedThreadId,> context.Arguments);> }> }>> It's just like the ApiDemo from Demo.cs>> So When I copy DemoScript.csx to managed dir the console log is:>> "> freeswitch@Zwierko-laptop> Loading> c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx from> domain DemoScripts.csx_3> 2009-07-28 20:57:16.710000 [INFO] switch_cpp.cpp:1130 Compiling> c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx> 2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 There were 1 errors> compiling> c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx.> 2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 CS5001: Program> 'c:\Users\Zwierko\AppData\Local\Temp\fc8jnlir.exe' does not contain a> static 'Main' method> suitable for an entry point> ">> Adding>> "> public static void Main()> {> }> ">> solves the issue. Is this how it's supposed to work?>> Another strange thing is that when I compile this class to DLL (release)> it does not work at all...>> freeswitch@Zwierko-laptop> Loading> c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\FSScripts.dll from> domain FSScripts.dll_5>>> freeswitch@Zwierko-laptop>>> freeswitch@Zwierko-laptop> managed DemoScript 111> API CALL [managed(DemoScript 111)] output:>> 2009-07-28 21:13:03.542000 [ERR] switch_cpp.cpp:1130 API plugin> DemoScript not found.> 2009-07-28 21:13:03.542000 [ERR] mod_managed.cpp:393 Execute failed for> DemoScript 111 (unknown module or exception).>> And another issue with scripts. I use script code as example:>> "> public class ScriptDemo> {> static void Main()> {> switch (FreeSWITCH.Script.ContextType)> {> case ScriptContextType.Api:> {> var ctx = FreeSWITCH.Script.GetApiContext();> ctx.Stream.Write("Script executing as API with args:> " + ctx.Arguments);> break;> }> case ScriptContextType.ApiBackground:> {> var ctx = FreeSWITCH.Script.GetApiBackgroundContext();> Log.WriteLine(LogLevel.Notice, "Executing as> APIBackground with args: " + ctx.Arguments);> break;> }> case ScriptContextType.App:> {> var ctx = FreeSWITCH.Script.GetAppContext();> Log.WriteLine(LogLevel.Notice, "Executing as App> with args: " + ctx.Arguments);> break;> }> }>> }> }> ">>> console log is as follows:>>> freeswitch@Zwierko-laptop> Loading> c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx from> domain Script.csx_8> 2009-07-28 21:19:36.289000 [INFO] switch_cpp.cpp:1130 Compiling> c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx> 2009-07-28 21:19:36.438000 [INFO] switch_cpp.cpp:1130 File> c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx compiled> successfully.> 2009-07-28 21:19:36.451000 [ERR] switch_cpp.cpp:1130 Entry point:> ScriptDemo.Main is not public. This may cause errors with Mono.> 2009-07-28 21:19:36.458000 [NOTICE] switch_cpp.cpp:1130 Loaded App> Script.csx, aliases 'Script.csx', into domain Script.csx_8.> 2009-07-28 21:19:36.459000 [NOTICE] switch_cpp.cpp:1130 Loaded Api> Script.csx, aliases 'Script.csx', into domain Script.csx_8.> 2009-07-28 21:19:36.459000 [INFO] switch_cpp.cpp:1130 Finished loading> c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx into> domain Script.csx_8.> managed ScriptDemo 111> 2009-07-28 21:19:53.452000 [ERR] switch_cpp.cpp:1130 API plugin> ScriptDemo not found.> API CALL [managed(ScriptDemo 111)] output:>> 2009-07-28 21:19:53.452000 [ERR] mod_managed.cpp:393 Execute failed for> ScriptDemo 111 (unknown module or exception).>>> Again, am I doing something wrong in here?>> Thanks, for any feedback>> Lukasz Zwierko>>>>>> Michael Giagnocavo wrote:>> Ah, that's embarrassing. I added them and tried building FreeSWITCH.Managed from svn and it worked fine now. (I'll kick off a new complete build in a minute.)>>>> -Michael>>>> From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Diego Toro>> Sent: Sunday, July 26, 2009 8:47 AM>> To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>> Subject: Re: [Freeswitch-users] mod_managed users?>>>> Hi Michael,>>>> Thank you for your job with mod_managed, I get lastest version with mod_managed but the files PluginInterfaces.cs, PluginManager.cs and ScriptPluginManager.cs were not downloaded.>>>> Diego>>>>>> --- On Sun, 7/26/09, Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)> wrote:>>>> From: Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)>>> Subject: Re: [Freeswitch-users] mod_managed users?>> To: "freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)" <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>>> Date: Sunday, July 26, 2009, 2:18 AM>> Hello,>>>> I just checked in a new mod_managed. It breaks backwards compatibility, but adds scripting and reloading support.>>>> I tested it on CentOS 5.3 x64 with Mono 2.4.2.2. Just make & make install seemed to take care of everything.>>>> Let me know if you have better luck with this version.>>>> Thanks,>> Michael>>>> From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Muhammad Shahzad>> Sent: Saturday, July 18, 2009 6:58 AM>> To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>> Subject: Re: [Freeswitch-users] mod_managed users?>>>> Sorry for replying late.>>>> I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.>>>> It compiles correctly this time but gives following error upon "make install",>>>> =====================================================================>> making install mod_managed>> make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.>> make[4]: *** [install] Error 1>> make[3]: *** [mod_managed-install] Error 1>> make[2]: *** [install-recursive] Error 1>>>> =====================================================================>>>> Here is compilation log when executing "make", if it could of any help.>>>> =====================================================================>> making all mod_managed>> Compiling freeswitch_managed.cpp...>> g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp>> Compiling freeswitch_wrap.cpp...>> g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp>> Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used>> Compilation succeeded - 1 warning(s)>> Compiling mod_managed.cpp...>> /usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp>> libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.o>> mod_managed.cpp: In function 'void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())':>> mod_managed.cpp:97: warning: deprecated conversion from string constant to 'char*'>> libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1>> Creating mod_managed.la...>> cat: .libs/mod_managed.log: No such file or directory>>>> =====================================================================>>>> Thank you.>> On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)<dftoro@yahoo.com (dftoro@yahoo.com)<mgg@giagnocavo.net (mgg@giagnocavo.net)<mgg@giagnocavo.net (mgg@giagnocavo.net)<freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)<freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)<FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)<FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)<shari_786pk@hotmail.com (shari_786pk@hotmail.com)<shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)<shari_786pk@hotmail.com (shari_786pk@hotmail.com)<shaheryarkh@googlemail.com (shaheryarkh@googlemail.com)<FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)<FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)>> FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)> FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)> FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
mgg at giagnocavo.net
Guest





PostPosted: Wed Jul 29, 2009 2:44 pm    Post subject: [Freeswitch-users] mod_managed users? Reply with quote

The error is that it just doesn’t find that alias to call the plugin. Assuming everything is spelled correctly, this probably means the DLL did not load.

I just checked in a fix for dlls that don’t have both Api and App interfaces – it would not load them at all. Try with it now and see if that’s the problem. If it is, I apologize.

If it still doesn’t, paste the full log of when it loads your file.

Thanks,
Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Diego Toro
Sent: Wednesday, July 29, 2009 12:44 PM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?


Hi Michael,



I am working with lastest managed module, I have assemblies wich dependen of others assemblies (dll's), the past version it works fine, but I have now next the error message:



EXECUTE sofia/internal/10510@192.168.27.10 ([email]sofia/internal/10510@192.168.27.10[/email]) managed(CIV_BPFSProcess)
2009-07-29 13:31:27.718750 [DEBUG] switch_cpp.cpp:1130 FreeSWITCH.Managed: attempting to run application 'CIV_BPFSProcess'.
2009-07-29 13:31:27.718750 [ERR] switch_cpp.cpp:1130 App plugin CIV_BPFSProcess not found.
2009-07-29 13:31:27.718750 [ERR] mod_managed.cpp:405 Application run failed for CIV_BPFSProcess (unknown module or exception).



My declaration class is:
public class CIV_BPFSProcess : FreeSWITCH.IAppPlugin

It has public method:
public void Run(AppContext context).



I have VS2008 on Windows

Thanks



Diego

--- On Wed, 7/29/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote:
Quote:


From: Michael Giagnocavo <mgg@giagnocavo.net>
Subject: Re: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>
Date: Wednesday, July 29, 2009, 1:46 AM
Hi Łukasz,

Would you please send me the DLL offlist and I'll figure it out?

The new session you create is the b-leg. The parameter it takes in originate is the a-leg. So you'd do:

var session = new ManagedSession();
session.Originate(context.Session, "sofia/default/1000",10);

As to non-blocking, I'm quite sure it's possible, but I don't recall offhand which functions. This should be the same as in any other language for FreeSWITCH -- these functions are just passthrough from the FS C++ API.

-Michael

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Lukasz Zwierko
Sent: Wednesday, July 29, 2009 12:13 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Hi Michael ,

thanks a lot for support on this.

Quote:
As to the main problem of your DLL not working, can you send me the full source code, or all the logging output from loading it? Try "managedreload my.dll" to reload the DLL and see how it is registering them. It should output something like "Registering API FullName with Aliases fullname, shortname".


I'm just using the Demo.cs example, I compile it to dll undef VC#, not
mono, maybe that is the difference?
The output from the log is just as you stated "Registering API
FullName with Aliases fullname, shortname". The difference between
loading dll and csx is that, when loading csx all api and app classes
are listed as registered, while with dll nothing is listed..

Anyway, I have another question regarding usage of the CoreSession and
ManagedSession object.
Basically in my script I want to start new session and originate a call.
So what I do is

ManageSession session = new ManagedSession();
session.Originate(session,"sofia/default/1000",10);

And it works but I have some doubts. First thing is, why the first
param of the Originate method is the CoreSession object? Can't it just
use 'this'? Or is there more to it?

Second thing is the third parameter - timeout in seconds. Can't the
call be started in non-blocking mode? I can start in a different
thread of course, is that the intended behavior?

Thanks for help,

Łukasz


2009/7/28 Michael Giagnocavo <mgg@giagnocavo.net>:
Quote:
Hello Lukasz,

Thanks for testing mod_managed. I apologize for the problems you've encountered, and I'll try to sort them out for you.

A few things first:

- Scripting support: This is made to allow "true" scripts, as invoked as an EXE - similar to the Lua and spidermonkey support. So, without a Main(), it won't compile as an EXE. If you aren't using it as a script, then an empty Main method will work fine.

- Entry points must be public for Mono. I'll update the demo code to make sure that Main is public. This is a bug in Mono's lightweight code generation -- it won't skip the JIT access checks.

As to the main problem of your DLL not working, can you send me the full source code, or all the logging output from loading it? Try "managedreload my.dll" to reload the DLL and see how it is registering them. It should output something like "Registering API FullName with Aliases fullname, shortname".

Thanks,
Michael

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Lukasz Zwierko
Sent: Tuesday, July 28, 2009 1:26 PM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've just tried new mod_managed under Win32 and I get a weird behavior.
I try the example below:

public class DemoScript : IApiPlugin
{
public void Execute(ApiContext context)
{
context.Stream.Write(string.Format("DemoScripts executed with
args '{0}' and event type {1}.",
context.Arguments, context.Event == null ? "<none>" :
context.Event.GetEventType()));
}

public void ExecuteBackground(ApiBackgroundContext context)
{
Log.WriteLine(LogLevel.Notice, "DemoScripts on a background
thread #({0}), with args '{1}'.",
System.Threading.Thread.CurrentThread.ManagedThreadId,
context.Arguments);
}
}

It's just like the ApiDemo from Demo.cs

So When I copy DemoScript.csx to managed dir the console log is:

"
freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx from
domain DemoScripts.csx_3
2009-07-28 20:57:16.710000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 There were 1 errors
compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\DemoScripts.csx.
2009-07-28 20:57:16.970000 [ERR] switch_cpp.cpp:1130 CS5001: Program
'c:\Users\Zwierko\AppData\Local\Temp\fc8jnlir.exe' does not contain a
static 'Main' method
suitable for an entry point
"

Adding

"
public static void Main()
{
}
"

solves the issue. Is this how it's supposed to work?

Another strange thing is that when I compile this class to DLL (release)
it does not work at all...

freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\FSScripts.dll from
domain FSScripts.dll_5


freeswitch@Zwierko-laptop>

freeswitch@Zwierko-laptop> managed DemoScript 111
API CALL [managed(DemoScript 111)] output:

2009-07-28 21:13:03.542000 [ERR] switch_cpp.cpp:1130 API plugin
DemoScript not found.
2009-07-28 21:13:03.542000 [ERR] mod_managed.cpp:393 Execute failed for
DemoScript 111 (unknown module or exception).

And another issue with scripts. I use script code as example:

"
public class ScriptDemo
{
static void Main()
{
switch (FreeSWITCH.Script.ContextType)
{
case ScriptContextType.Api:
{
var ctx = FreeSWITCH.Script.GetApiContext();
ctx.Stream.Write("Script executing as API with args:
" + ctx.Arguments);
break;
}
case ScriptContextType.ApiBackground:
{
var ctx = FreeSWITCH.Script.GetApiBackgroundContext();
Log.WriteLine(LogLevel.Notice, "Executing as
APIBackground with args: " + ctx.Arguments);
break;
}
case ScriptContextType.App:
{
var ctx = FreeSWITCH.Script.GetAppContext();
Log.WriteLine(LogLevel.Notice, "Executing as App
with args: " + ctx.Arguments);
break;
}
}

}
}
"


console log is as follows:


freeswitch@Zwierko-laptop> Loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx from
domain Script.csx_8
2009-07-28 21:19:36.289000 [INFO] switch_cpp.cpp:1130 Compiling
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx
2009-07-28 21:19:36.438000 [INFO] switch_cpp.cpp:1130 File
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx compiled
successfully.
2009-07-28 21:19:36.451000 [ERR] switch_cpp.cpp:1130 Entry point:
ScriptDemo.Main is not public. This may cause errors with Mono.
2009-07-28 21:19:36.458000 [NOTICE] switch_cpp.cpp:1130 Loaded App
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [NOTICE] switch_cpp.cpp:1130 Loaded Api
Script.csx, aliases 'Script.csx', into domain Script.csx_8.
2009-07-28 21:19:36.459000 [INFO] switch_cpp.cpp:1130 Finished loading
c:\Users\Zwierko\Projects\fs\svn\Debug\mod\managed\Script.csx into
domain Script.csx_8.
managed ScriptDemo 111
2009-07-28 21:19:53.452000 [ERR] switch_cpp.cpp:1130 API plugin
ScriptDemo not found.
API CALL [managed(ScriptDemo 111)] output:

2009-07-28 21:19:53.452000 [ERR] mod_managed.cpp:393 Execute failed for
ScriptDemo 111 (unknown module or exception).


Again, am I doing something wrong in here?

Thanks, for any feedback

Lukasz Zwierko





Michael Giagnocavo wrote:
Quote:
Ah, that's embarrassing. I added them and tried building FreeSWITCH.Managed from svn and it worked fine now. (I'll kick off a new complete build in a minute.)

-Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Diego Toro
Sent: Sunday, July 26, 2009 8:47 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Hi Michael,

Thank you for your job with mod_managed, I get lastest version with mod_managed but the files PluginInterfaces.cs, PluginManager.cs and ScriptPluginManager.cs were not downloaded.

Diego


--- On Sun, 7/26/09, Michael Giagnocavo <mgg@giagnocavo.net> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net>
Subject: Re: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>
Date: Sunday, July 26, 2009, 2:18 AM
Hello,

I just checked in a new mod_managed. It breaks backwards compatibility, but adds scripting and reloading support.

I tested it on CentOS 5.3 x64 with Mono 2.4.2.2. Just make & make install seemed to take care of everything.

Let me know if you have better luck with this version.

Thanks,
Michael

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Muhammad Shahzad
Sent: Saturday, July 18, 2009 6:58 AM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] mod_managed users?

Sorry for replying late.

I have tried mod_managed again on same machine (Lenovo 3000 N200), same OS (Ubuntu-9.04) and Mono version 2.0.1 but with latest FS revision 14249.

It compiles correctly this time but gives following error upon "make install",

=====================================================================
making install mod_managed
make[5]: *** No rule to make target `/usr/local/freeswitch/mod/mod_managed.so', needed by `local_install'. Stop.
make[4]: *** [install] Error 1
make[3]: *** [mod_managed-install] Error 1
make[2]: *** [install-recursive] Error 1

=====================================================================

Here is compilation log when executing "make", if it could of any help.

=====================================================================
making all mod_managed
Compiling freeswitch_managed.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_managed.o freeswitch_managed.cpp
Compiling freeswitch_wrap.cpp...
g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o freeswitch_wrap.o freeswitch_wrap.cpp
Demo.cs(58,14): warning CS0169: The private method `FreeSWITCH.Demo.AppDemo.hangupHook()' is never used
Compilation succeeded - 1 warning(s)
Compiling mod_managed.cpp...
/usr/src/svn-src/freeswitch/libtool --mode=compile --tag=CXX g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c -o mod_managed.lo mod_managed.cpp
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -fPIC -DPIC -o .libs/mod_managed.o
mod_managed.cpp: In function 'void InitManagedSession(ManagedSession*, char* (*)(void*, switch_input_type_t), void (*)())':
mod_managed.cpp:97: warning: deprecated conversion from string constant to 'char*'
libtool: compile: g++ -I/usr/src/svn-src/freeswitch/src/include -I/usr/src/svn-src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -D_REENTRANT -pthread -I/usr/include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_CONFIG_H -c mod_managed.cpp -o mod_managed.o >/dev/null 2>&1
Creating mod_managed.la...
cat: .libs/mod_managed.log: No such file or directory

=====================================================================

Thank you.
On Fri, Jul 17, 2009 at 10:59 AM, Muhammad Shahzad <shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>> wrote:
I tried to install mod_managed on ubuntu-9.04, mono framework version 2.0. It gave me a lots of errors in Loader.cs, which seems to be SWIG related. Since i am not a expert in SWIG so i disabled this module. This happend long ago, i think FS svn revision 136xx.

Let me try to compile it from latest FS revision and see if it works. I will let you know the results.

Thank you.

On Fri, Jul 17, 2009 at 3:54 AM, Diego Toro <dftoro@yahoo.com<http://us.mc335.mail.yahoo.com/mc/compose?to=dftoro@yahoo.com>> wrote:
Hey, I am here Smile

I am working with mod_managed on Windows 2003 and Windows Vista with sucessfull. I noted on user list the issue with LoadFile on Loader.cs when a assembly had reference to others assemblies, I change LoadFile by LoadFrom and the load is made fine.

I use c# application and sqlserver 2005, using FS and mod_managed.

Diego

--- On Thu, 7/16/09, Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>> wrote:

From: Michael Giagnocavo <mgg@giagnocavo.net<http://us.mc335.mail.yahoo.com/mc/compose?to=mgg@giagnocavo.net>>
Subject: [Freeswitch-users] mod_managed users?
To: "freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>" <freeswitch-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=freeswitch-users@lists.freeswitch.org>>
Date: Thursday, July 16, 2009, 4:43 PM

Hey, if there are any mod_managed users on this list, I'd love it if you were able to let me know. I'd like to get feedback, positive or negative, on what worked, what didn't, and how mod_managed can improve for you. Feel free to write on list or directly to me: mgg at giagnocavo.net<http://giagnocavo.net/>

Thanks!
-Michael
-----Inline Attachment Follows-----

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<http://www.freeswitch.org/>


--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: shari_786pk@hotmail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shari_786pk@hotmail.com>
Email: shaheryarkh@googlemail.com<http://us.mc335.mail.yahoo.com/mc/compose?to=shaheryarkh@googlemail.com>

-----Inline Attachment Follows-----
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org<http://us.mc335.mail.yahoo.com/mc/compose?to=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<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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJKb1CvAAoJED7LBosr0F2u6E4H/i0SVOJDrh4+3ex6nEDnVJQl
mLjTPpyoAyP3cEp37YmQbrk2DAqfmQgysygaiKP6yxdFsyDsPmphMV1biWGi8DgM
pwTiGQACFdWWiWiYk/J09ZbRJR24S8zHxuETQK93/7fy53tgqW6o35hLxb3arOaH
VOAUDHQkMX7Q/PFaorWk/bhYDbq6+XxwkBCQHeMk3zErZT1rl+haxVtBXN1N0h8+
k5t3C5bJpPNjpTmm4m0BEOdA7WfU2iFIJeOH9ZoHih01n68COnb52pl349Ah2fV8
cVVouTbOtjGsRpyq9OYh7XhIFzH/QUZQykL/BMlR3Df3g8KRJ8Q8p/zj5bNRDlA=
=LgK4
-----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
_______________________________________________
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

_______________________________________________
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services