[Freeswitch-users] JAVA ISSUE

Freeswitch user freeswitch940 at gmail.com
Fri Sep 15 16:29:18 UTC 2017


How can I do that I didn't get any example over freeswitch wiki... it would
be really for me if you can suggest me or give me a demo script.

On Fri, 15 Sep 2017 at 9:38 PM, Anthony Minessale <
anthony.minessale at gmail.com> wrote:

>  session = new JavaSession(sessionUuid); is not returning a valid session
> so then session.answer() will not work because the session is not
> initialized.
>
>
> On Thu, Sep 14, 2017 at 7:37 AM, Freeswitch user <freeswitch940 at gmail.com>
> wrote:
>
>> Hello Everyone,
>>
>> Sorry to disturb you.I'm getting an error while i'm trying to call java
>> file from dialplan.
>>
>> Error:-  [ERR] switch_cpp.cpp:683 object is not initalized
>>
>> i have compiled mod_java successfully. there was no error during make and
>> make install.  but it's showing error in below java code.
>>
>> -------------------------------------------
>>
>> import org.freeswitch.*;
>> import org.freeswitch.swig.*;
>>
>> public class PhoneTest implements FreeswitchScript, DTMFCallback,
>> HangupHook
>> {
>>     public PhoneTest()
>>     {
>>     }
>>
>>     public String onDTMF(Object object, int i, String arg)
>>     {
>>         if (object instanceof String)
>>             freeswitch.console_log("notice", "DTMF: " + (String)object +
>> " ARG: " + arg + "\n");
>>         else
>>             freeswitch.console_log("notice", "WOW GOT AN EVENT: " +
>> object.toString());
>>         return "true";
>>     }
>>
>>     public void onHangup()
>>     {
>>         freeswitch.console_log("notice", "HANGUP!\n");
>>     }
>>
>>     public void run(String sessionUuid, String args)
>>     {
>>         freeswitch.console_log("notice", "UUID: " + sessionUuid + " ARGS:
>> " + args + "\n");
>>         JavaSession session = null;
>>         try
>>             {
>>
>> {
>>                 session = new JavaSession(sessionUuid);
>>                session.answer();  // getting Error in This Line
>>                 freeswitch.console_log("INFO","\nHIII\n");
>>             }catch(Exception
>> ee){freeswitch.console_log("error",ee.getMessage());}
>>         finally
>>             {
>>                 if (session != null)
>>                     session.delete();
>>             }
>>     }
>> }
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
>
> --
> Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬
>
>http://freeswitch.org/http://cluecon.com/> http://twitter.com/FreeSWITCH
> ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
> <http://freeswitch.org/g+>*
>
> ClueCon Weekly Development Call
> ☎ sip:888 at conference.freeswitch.org  ☎ +19193869900
>
> https://www.youtube.com/watch?v=oAxXgyx5jUw
> https://www.youtube.com/watch?v=9XXgW34t40s
> https://www.youtube.com/watch?v=NLaDpGQuZDA
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170915/6dbe54ed/attachment.html>


More information about the FreeSWITCH-users mailing list