<br><br><div class="gmail_quote">On Wed, Apr 9, 2008 at 3:00 PM, Damjan Jovanovic <<a href="mailto:damjan@ecntelecoms.com">damjan@ecntelecoms.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
X-ECN Telecoms-MailScanner-Information: Contact ECN Telecoms<br>
X-ECN Telecoms-MailScanner: Found to be clean<br>
X-ECN Telecoms-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,<br>
score=-103.715, required 6, autolearn=not spam, ALL_TRUSTED -1.80,<br>
AWL 0.68, BAYES_00 -2.60, USER_IN_WHITELIST -100.00)<br>
X-ECN Telecoms-MailScanner-From: <a href="mailto:damjan@ecntelecoms.com">damjan@ecntelecoms.com</a><br>
X-Spam-Status: No<br>
<br>
<br>
On Fri, 2008-04-04 at 18:08 -0500, Anthony Minessale wrote:<br>
> I fixed this issue in tree in latest trunk<br>
><br>
> damjan I have a few suggestions for you:<br>
><br>
> 1) in the scripts you have to say......<br>
><br>
> session = new JavaSession(sessionUuid);<br>
><br>
> maybe you can do this automatically when the script is invoked as an<br>
> application.<br>
<br>
Maybe.<br>
<br>
><br>
> 2) you should add an api interface like spidermonkey and python have<br>
> caled "java_run"<br>
> then you could use the cli, xml-rpc and the event_socket to invoke<br>
> standalone scripts in their own thread.<br>
<br>
'Scripts' are for scripting languages...<br>
</blockquote><div><br>OK, i mean 'application' then?<br>The point was it's a small function you can implement to register an api call so you can<br>run a java application from the console at startup or whatever that can stay active in it's own thread<br>
and spawn calls, listen on the web, whatever.<br><br>such as <br>> java run myclass<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
> 3) The DTMF / event stuff is not fully exposed.<br>
<br>
Yes I'll try to get that done too.<br>
<br>
> When you set an event callback you can get an event or a DTMF obj<br>
><br>
> When you get a DTMF the obj supplies duration as well as the digit<br>
> that was dialed.<br>
> When you get an event it's a structure similar to an email, jabber<br>
> message etc with a type, headers and a body.<br>
><br>
> so you should build a class around the switch_event_t.<br>
><br>
> That way, you can parse, create and fire events.<br>
><br>
> maybe we will make a c++ wrapper for that too so swig will do it for<br>
> us.<br>
<br>
I'm thinking of ditching swig. I don't know what it's like for other<br>
languages, but for Java it's a disaster. I spent most of the time<br>
writing mod_java just coercing swig to get it to generate working code,<br>
and the Java -> Freeswitch interface still looks very foreign.<br>
</blockquote><div><br>Yes, swig is not pretty.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
The application interface that runs an interpret for a given script<br>
doesn't really work for languages like Java anyway. The current<br>
implementation loads classes from disk on every call, and since each<br>
class is loaded with a different classloader, classes won't share their<br>
static data between invocations. I prefer what mod_mono did, that is, a<br>
way to write native freeswitch modules in Java. That would also provide<br>
a nice way to control object lifetimes, which mod_java currently doesn't<br>
have.<br>
<br>
</blockquote><div><br>That would be a useful feature, if you are up to it, we will do our best to help out.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Regards<br>
Damjan<br>
<br>
<br>
><br>
><br>
> On Fri, Apr 4, 2008 at 12:26 PM, jonathan augenstine<br>
> <<a href="mailto:jaugenstine@gmail.com">jaugenstine@gmail.com</a>> wrote:<br>
> Damjan,<br>
><br>
> What I am trying to do is to implement a script that plays a<br>
> prompt and collects digits. I am able to use streamFile and<br>
> getDigits to accomplish this task but it produces an<br>
> unacceptable experience, in that if experienced people use the<br>
> system they want to start entering digits before the prompt<br>
> completes and streamFile/getDigits will not support this<br>
> behavior. I have tried using playAndGetDigits but that method<br>
> crashes freeswitch on the older version. When I tried<br>
> updating freeswitch I encountered the error noted below. If<br>
> you can give me some guidance I will help trouble shoot the<br>
> initialization problem. Thank you.<br>
><br>
> Jonathan<br>
><br>
> On Fri, Apr 4, 2008 at 5:54 AM, Damjan Jovanovic<br>
> <<a href="mailto:damjan@ecntelecoms.com">damjan@ecntelecoms.com</a>> wrote:<br>
><br>
><br>
> X-ECN Telecoms-MailScanner-Information: Contact ECN<br>
> Telecoms<br>
> X-ECN Telecoms-MailScanner: Found to be clean<br>
> X-ECN Telecoms-MailScanner-SpamCheck: not spam,<br>
> SpamAssassin (not cached,<br>
> score=-102.277, required 6, autolearn=not spam,<br>
> ALL_TRUSTED -1.80,<br>
> AWL -0.48, USER_IN_WHITELIST -100.00)<br>
> X-ECN Telecoms-MailScanner-From:<br>
> <a href="mailto:damjan@ecntelecoms.com">damjan@ecntelecoms.com</a><br>
> X-Spam-Status: No<br>
><br>
><br>
> On Fri, 2008-04-04 at 00:38 -0700, jonathan augenstine<br>
> wrote:<br>
> > I have a mod-java script that is encountering an<br>
> error on the latest<br>
> > version from svn.<br>
> ><br>
> > The script runs successfully on build: FreeSwitch<br>
> Version 1.0.pre3<br>
> > (7616M)<br>
> ><br>
> > When I retrieve the latest version from svn (8019) I<br>
> get the following<br>
> > output from the console:<br>
> ><br>
> > 2008-04-04 02:03:15 [ERR] switch_cpp.cpp:146<br>
> getVariable() session is<br>
> > not initalized<br>
> > 2008-04-04 02:03:15 [ERR] switch_cpp.cpp:146<br>
> getVariable() session is<br>
> > not initalized<br>
> > 2008-04-04 02:03:15 [ERR] switch_cpp.cpp:153<br>
> execute() session is not<br>
> > initalized<br>
> > 2008-04-04 02:03:15 [DEBUG] switch_cpp.cpp:98<br>
> ~CoreSession()<br>
> > CoreSession::~CoreSession desctructor<br>
><br>
><br>
><br>
> Make sure the UUID is valid.<br>
><br>
> Otherwise, whoever changed the semantics of the<br>
> session API should also<br>
> patch mod_java.<br>
><br>
><br>
> > Java code that works on 7616 but fails on 8019:<br>
> ><br>
> > public void run(String sessionUuid, String args)<br>
> > {<br>
> > freeswitch.console_log("notice", "INBOUND<br>
> UUID: " +<br>
> > sessionUuid + " ARGS: " + args + "\n");<br>
> > JavaSession session = null;<br>
> ><br>
> > try<br>
> > {<br>
> > session = new JavaSession(sessionUuid);<br>
> ><br>
> > session.setAutoHangup(false);<br>
> ><br>
> > String raw_dnis =<br>
> > session.getVariable("originate_caller_id_number");<br>
> > String raw_ani =<br>
> session.getVariable("caller_id_number");<br>
> ><br>
> > Has something changed on the Java module. Do I need<br>
> any new<br>
> > additional initialization?<br>
> ><br>
> > Jonathan<br>
> ><br>
><br>
> > _______________________________________________<br>
> > Freeswitch-dev mailing list<br>
> > <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
> ><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> ><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
> Bye<br>
> Damjan<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Anthony Minessale II<br>
><br>
> FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
> ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
><br>
> AIM: anthm<br>
> <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
> GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
> IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
><br>
> FreeSWITCH Developer Conference<br>
> <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
> <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
> <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
> pstn:213-799-1400<br>
> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400