Hi Steve,

I put install the jdk 64 bit now, i don't get that error but PhoneTest.java does not working

i compile PhoneTest.java without error and freeswitch.log i see that trying to PhoneTest but it did not work.
do you know why it is not working?

this is the freeswitch.log:
Dialplan: sofia/internal/6472585272@64.34.222.221 Regex (PASS) [public_did] destination_number(4166289121) =~ /^4166289121$/ break=on-false
Dialplan: sofia/internal/6472585272@64.34.222.221 Action java(/usr/local/freeswitch/scripts/PhoneTest)
2010-06-29 11:48:50.496128 [DEBUG] switch_core_state_machine.c:119 (sofia/internal/6472585272@64.34.222.221) State Change CS_ROUTING -> CS_EXECUTE
2010-06-29 11:48:50.496128 [DEBUG] switch_core_session.c:1021 Send signal sofia/internal/6472585272@64.34.222.221 [BREAK]
2010-06-29 11:48:50.496128 [DEBUG] switch_core_state_machine.c:341 (sofia/internal/6472585272@64.34.222.221) State ROUTING going to sleep
2010-06-29 11:48:50.496128 [DEBUG] switch_core_state_machine.c:314 (sofia/internal/6472585272@64.34.222.221) Running State Change CS_EXECUTE
2010-06-29 11:48:50.496128 [DEBUG] switch_core_state_machine.c:348 (sofia/internal/6472585272@64.34.222.221) State EXECUTE
2010-06-29 11:48:50.496128 [DEBUG] mod_sofia.c:226 sofia/internal/6472585272@64.34.222.221 SOFIA EXECUTE
2010-06-29 11:48:50.496128 [DEBUG] switch_core_state_machine.c:157 sofia/internal/6472585272@64.34.222.221 Standard EXECUTE
EXECUTE sofia/internal/6472585272@64.34.222.221 set(outside_call=true)
2010-06-29 11:48:50.496128 [DEBUG] mod_dptools.c:816 sofia/internal/6472585272@64.34.222.221 SET [outside_call]=[true]
EXECUTE sofia/internal/6472585272@64.34.222.221 java(/usr/local/freeswitch/scripts/PhoneTest)
2010-06-29 11:48:50.496128 [NOTICE] switch_core_state_machine.c:185 sofia/internal/6472585272@64.34.222.221 has executed the last dialplan instruction, hanging up.
2010-06-29 11:48:50.496128 [NOTICE] switch_core_state_machine.c:187 Hangup sofia/internal/6472585272@64.34.222.221 [CS_EXECUTE] [NORMAL_CLEARING]
2010-06-29 11:48:50.496128 [DEBUG] switch_channel.c:2102 Send signal sofia/internal/6472585272@64.34.222.221 [KILL]
2010-06-29 11:48:50.496128 [DEBUG] switch_core_session.c:1021 Send signal sofia/internal/6472585272@64.34.222.221 [BREAK]
2010-06-29 11:48:50.496128 [DEBUG] switch_core_state_machine.c:348 (sofia/internal/6472585272@64.34.222.221) State EXECUTE going to sleep
2010-06-29 11:48:50.496128 [DEBUG] switch_core_state_machine.c:314 (sofia/internal/6472585272@64.34.222.221) Running State Change CS_HANGUP
2010-06-29 11:48:50.496128 [DEBUG] switch_core_state_machine.c:499 (sofia/internal/6472585272@64.34.222.221) State HANGUP
2010-06-29 11:48:50.496128 [DEBUG] mod_sofia.c:414 Channel sofia/internal/6472585272@64.34.222.221 hanging up, cause: NORMAL_CLEARING
2010-06-29 11:48:50.498209 [DEBUG] mod_sofia.c:476 Responding to INVITE with: 480
2010-06-29 11:48:50.498209 [DEBUG] switch_core_state_machine.c:46 sofia/internal/6472585272@64.34.222.221 Standard HANGUP, cause: NORMAL_CLEARING
2010-06-29 11:48:50.498209 [DEBUG] switch_core_state_machine.c:499 (sofia/internal/6472585272@64.34.222.221) State HANGUP going to sleep
2010-06-29 11:48:50.498209 [DEBUG] switch_core_state_machine.c:333 (sofia/internal/6472585272@64.34.222.221) State Change CS_HANGUP -> CS_REPORTING
2010-06-29 11:48:50.500137 [DEBUG] switch_core_session.c:1021 Send signal sofia/internal/6472585272@64.34.222.221 [BREAK]
2010-06-29 11:48:50.500138 [DEBUG] switch_core_state_machine.c:314 (sofia/internal/6472585272@64.34.222.221) Running State Change CS_REPORTING
2010-06-29 11:48:50.500138 [DEBUG] switch_core_state_machine.c:590 (sofia/internal/6472585272@64.34.222.221) State REPORTING
2010-06-29 11:48:50.500138 [DEBUG] switch_core_state_machine.c:53 sofia/internal/6472585272@64.34.222.221 Standard REPORTING, cause: NORMAL_CLEARING
2010-06-29 11:48:50.500138 [DEBUG] switch_core_state_machine.c:590 (sofia/internal/6472585272@64.34.222.221) State REPORTING going to sleep
2010-06-29 11:48:50.500138 [DEBUG] switch_core_state_machine.c:327 (sofia/internal/6472585272@64.34.222.221) State Change CS_REPORTING -> CS_DESTROY
2010-06-29 11:48:50.500138 [DEBUG] switch_core_session.c:1021 Send signal sofia/internal/6472585272@64.34.222.221 [BREAK]
2010-06-29 11:48:50.500138 [DEBUG] switch_core_session.c:1164 Session 7 (sofia/internal/6472585272@64.34.222.221) Locked, Waiting on external entities
2010-06-29 11:48:50.500138 [NOTICE] switch_core_session.c:1182 Session 7 (sofia/internal/6472585272@64.34.222.221) Ended
2010-06-29 11:48:50.500138 [NOTICE] switch_core_session.c:1184 Close Channel sofia/internal/6472585272@64.34.222.221 [CS_DESTROY]
2010-06-29 11:48:50.500138 [DEBUG] switch_core_state_machine.c:428 (sofia/internal/6472585272@64.34.222.221) Running State Change CS_DESTROY
2010-06-29 11:48:50.500138 [DEBUG] switch_core_state_machine.c:439 (sofia/internal/6472585272@64.34.222.221) State DESTROY
2010-06-29 11:48:50.500138 [DEBUG] mod_sofia.c:341 sofia/internal/6472585272@64.34.222.221 SOFIA DESTROY
2010-06-29 11:48:50.500138 [DEBUG] switch_core_state_machine.c:60 sofia/internal/6472585272@64.34.222.221 Standard DESTROY
2010-06-29 11:48:50.500138 [DEBUG] switch_core_state_machine.c:439 (sofia/internal/6472585272@64.34.222.221) State DESTROY going to sleep

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;
        String FileName = "/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-please_try_again.wav";
        try
            {
                session = new JavaSession(sessionUuid);
                session.setDTMFCallback(this, "TEST");
                session.setHangupHook(this);
                System.out.println("++++++++++++++++++++++++++++++++");
                freeswitch.console_log("notice", "++++++++++Before Answer: +++++++++++++");
                session.answer();
                freeswitch.console_log("notice", "++++++++++After Answer: +++++++++++++");
                //session.streamFile(FileName, 0);
                session.streamFile(FileName);
                freeswitch.console_log("notice", "++++++++++After play file: +++++++++++++" + FileName);
                session.recordFile("ravi.wav", 12000, 3000);
                session.hangup("");
            }
        finally
            {
                if (session != null)
                    session.delete();
            }
    }
}


- Ravi
On Fri, Jun 25, 2010 at 10:36 PM, <freeswitch-users-request@lists.freeswitch.org> wrote:
Send FreeSWITCH-users mailing list submissions to
       freeswitch-users@lists.freeswitch.org

To subscribe or unsubscribe via the World Wide Web, visit
       http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
or, via email, send a message with subject or body 'help' to
       freeswitch-users-request@lists.freeswitch.org

You can reach the person managing the list at
       freeswitch-users-owner@lists.freeswitch.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of FreeSWITCH-users digest..."

Today's Topics:

  1. Re: FreeSwitch Configuration : Help in SIP        provider & gateway
     configuration (Rupa Schomaker)
  2. Re: try to run mod_java but loading issue (Steven Ayre)
  3. Re: event-lock in mod_erlang_event (Andrew Thompson)
  4. Re: mod_erlang_event problem (Andrew Thompson)
  5. Re: Question about max-members (Michael Collins)
  6. ringback answer vs preanswer (Stephen Cattaneo)
  7. Re: ringback answer vs preanswer (Michael Collins)
  8. Re: Erlang Examples (Anthony Minessale)


---------- Forwarded message ----------
From: Rupa Schomaker <rupa@rupa.com>
To: freeswitch-users <freeswitch-users@lists.freeswitch.org>
Date: Fri, 25 Jun 2010 08:49:19 -0500
Subject: Re: [Freeswitch-users] FreeSwitch Configuration : Help in SIP provider & gateway configuration
I'm a little confused.  You say that you will be running without SIP (cards + PRI) but then ask about setting up SIP.  Which configuration are you trying to do?

On Fri, Jun 25, 2010 at 2:12 AM, Chaitanya Bhatt // Viva <chaitanya@vivainfomedia.com> wrote:
Hey

I have installed FreeSwitch successfully but not getting how to use it. I want to use FreeSwitch in Inbound/Outbound IVRS application.
We will be using FreeSwitch with Sangoma Card & PRIs. In configuration section i am not getting SIP provider & gateway configuration.
I am newbie in FreeSwitch, Can you please guide how to proceed with SIP provider & gateway configuration ? 

Incase of any further queries, Please feel free to mail me or contact me on the numbers provided below.

Thanks & Regards,
Chaitanya Bhatt
Software Engineer.

Viva Infomedia Pvt. Ltd.
242, Oshiwara Industrial Centre,
New Link Road, Opp. Oshiwara Bus Depot,
Goregaon West, Mumbai 400104.

Direct: +91.22.40310356
Board: +91.22.40310310
Email : chaitanya@vivainfomedia.com

Viva Infomedia: Awarded as Best SME (E-Commerce) at CNBC Emerging India Awards 2009


_______________________________________________
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




--
-Rupa


---------- Forwarded message ----------
From: Steven Ayre <steveayre@gmail.com>
To: freeswitch-users@lists.freeswitch.org
Date: Fri, 25 Jun 2010 15:13:41 +0100
Subject: Re: [Freeswitch-users] try to run mod_java but loading issue
2010-06-24 15:01:47.096906 [ERR] modjava.c:124 Error loading /usr/telcan/jdk1.6.0_10/jre/lib/i386/server/libjvm.so

Looks like it's a dependancy problem. Does that file exist, and are there any other errors just before that line?

Are you also on 32bit or 64bit? Looks like it's trying to load a 32bit version (i386) which might be the problem if you're on 64bit FS.

-Steve


On 24 June 2010 20:06, Ravi Kuru <ravi.kuru@callture.com> wrote:
Hi,

I try to run PhoneTest on freeswitch and I followed the instruction but I got this error on freeswitch.log file when i start the freeswitch.

2010-06-24 15:01:47.096906 [ERR] modjava.c:124 Error loading /usr/telcan/jdk1.6.0_10/jre/lib/i386/server/libjvm.so
2010-06-24 15:01:47.096942 [CRIT] switch_loadable_module.c:882 Error Loading module /usr/local/freeswitch/mod/mod_java.so
**Module load routine returned an error**

what was the issue?

Ravi



_______________________________________________
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




---------- Forwarded message ----------
From: Andrew Thompson <andrew@hijacked.us>
To: freeswitch-users@lists.freeswitch.org
Date: Fri, 25 Jun 2010 10:59:58 -0400
Subject: Re: [Freeswitch-users] event-lock in mod_erlang_event
On Fri, Jun 25, 2010 at 10:41:37AM +0800, Seven Du wrote:
> Hi,
>
> As I can see, You cannot do this in inbound erlang
>
> sendmsg(FS, uuid, playback, "1.wav");
> sendmsg(FS, uuid, playback, "2.wav");
> sendmsg(FS, uuid, transfer, "xxxxx
>
> because it's async, and it will play 2.wav immediately.
>
>
> 1) Sure if I know the length of 1.wav I can
>
> sendmsg(FS, uuid, playback, 1.wav
> sleep(3000
> sendmsg(FS, uuid, playback, 2.wav
>
> 2) Or I could wait the execute_complete event which will be a little complicated
>
>
> According to http://wiki.freeswitch.org/wiki/Event_socket_outbound
>
> Is it possible to send a event-lock param to lock the message temporarily? like
>
> sendmsg(FS, UUID, App, Args, [{"event-lock", "true"}]).
>

Yes, event-lock works from erlang too (its implemented down in the core
I think). I use it to prevent exactly this problem.

Feel free to update the wiki to note this is available.

Andrew




---------- Forwarded message ----------
From: Andrew Thompson <andrew@hijacked.us>
To: freeswitch-users@lists.freeswitch.org
Date: Fri, 25 Jun 2010 11:06:22 -0400
Subject: Re: [Freeswitch-users] mod_erlang_event problem
On Fri, Jun 25, 2010 at 09:32:44AM +0500, Timur Irmatov wrote:
> Hi, Andrew!
> That's the way it is done on my other server. And it works there fine.
> But, also, on that server I also use RPC mechanism the same way I done
> it on new one, and it works there fine too. It's just older freeswitch
> and older erlang there. Don't know if that matters, or may be RPC
> works there simply because I also use registered process and get_pid.

So you use both mechanisms on a box with older freeswitch and erlang and
both work fine? Can you narrow it down by matching versions on one side
(freeswitch might be best) and see if the bug goes away/comes back? Its
possible the new erlang releases have changed something in ei, but its
more likely that I broke something in FreeSWITCH. What are the versions
of FS/erlang on the box that works?

Andrew




---------- Forwarded message ----------
From: Michael Collins <msc@freeswitch.org>
To: freeswitch-users@lists.freeswitch.org
Date: Fri, 25 Jun 2010 10:23:49 -0700
Subject: Re: [Freeswitch-users] Question about max-members
For any conference created based in this profile it limits the total number of conference participants. So if your conference profile has max-members=5 then any conference you create based on that profile will allow only 5 people to join the conference.

-MC

On Fri, Jun 25, 2010 at 1:41 AM, Sergey Scheglov <sid@eltc.ru> wrote:

Hi All,

max-members limits members in conference room or limits members using
profile (i.e. default)?

Regards
Sergey Scheglov


_______________________________________________
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



---------- Forwarded message ----------
From: Stephen Cattaneo <stephen@mymessage.us>
To: freeswitch-users <freeswitch-users@lists.freeswitch.org>
Date: Fri, 25 Jun 2010 18:35:31 -0400
Subject: [Freeswitch-users] ringback answer vs preanswer
i am trying to understand why when i do session.preanswer ringback works when i bridge the call but when i do session.answer it does not.


Thanks,
Stephen C
-All of my email addresses go to the same place
-Save Paper, think before you print



---------- Forwarded message ----------
From: Michael Collins <msc@freeswitch.org>
To: freeswitch-users@lists.freeswitch.org
Date: Fri, 25 Jun 2010 17:45:47 -0700
Subject: Re: [Freeswitch-users] ringback answer vs preanswer
Because ringback occurs in early media. You need transfer ringback after the call is answered. See this page for more info:
http://wiki.freeswitch.org/wiki/Variable_transfer_ringback

-MC

On Fri, Jun 25, 2010 at 3:35 PM, Stephen Cattaneo <stephen@mymessage.us> wrote:
i am trying to understand why when i do session.preanswer ringback works when i bridge the call but when i do session.answer it does not.


Thanks,
Stephen C
-All of my email addresses go to the same place
-Save Paper, think before you print


_______________________________________________
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




---------- Forwarded message ----------
From: Anthony Minessale <anthony.minessale@gmail.com>
To: freeswitch-users@lists.freeswitch.org
Date: Fri, 25 Jun 2010 21:35:32 -0500
Subject: Re: [Freeswitch-users] Erlang Examples
Hey Seven, is JP still working with you guys?
We haven't heard from him in a year or more... =D


On Thu, Jun 24, 2010 at 8:35 PM, Seven Du <dujinfang@gmail.com> wrote:
Welcome to the Erlang world.

Erlang was initially designed to write telecom softwares and I found
gen_fsm is easy to use and very clear to describe business logic. I'm
the idapted person. I updated the post in the bottom to be more
complete.

Another vote to OpenACD  because it is written by the author of
mod_erlang_event. :)

2010/6/25 Anthony Minessale <anthony.minessale@gmail.com>:
> The guy who wrote mod_erlang_event and a developer of OpenACD is the same
> guy already here helping him namely Andrew.
>
>
> On Thu, Jun 24, 2010 at 11:27 AM, Jan Berger <jan.berger@video24.no> wrote:
>>
>> Hi, The OpenACD guys are writing the ACD in Erlang and integrating to FS,
>> so
>> you might find something there.
>>
>> ---
>>
>> I don't know the Ericsson Language that well myself, but having had a look
>> at it I decided to stay away from this technology.
>>
>> What I am doing is writing IVR's in Java, C# or even C++ and I decided to
>> use vxml/ccxml to bring IVR capability into the standard dev environment
>> so
>> I can deal with business in a proper language.
>>
>> Jan
>>
>> -----Original Message-----
>> From: freeswitch-users-bounces@lists.freeswitch.org
>> [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of David
>> Swardstrom
>> Sent: 24. juni 2010 17:52
>> To: freeswitch-users
>> Subject: [Freeswitch-users] Erlang Examples
>>
>> I have been using JavaScript to handle a Conferencing application that
>> started
>> with the conf-ivr.js example program but is significantly more complex.
>> This has been fun even though I had never used JavaScript before this
>> year.
>>
>> However, there are things that seem to not be possible using JavaScript.
>> I need to interact with several web based applications for several reasons
>> and also need to provide some time based interactions with FreeSwitch
>> and/or
>> artifacts (Database entries, files of recorded conferences, etc).
>>
>> We (RemoteLink) have decided that the best solution for this support is
>> to use an Erlang program and mod_erlang_event. So now I need to learn
>> another language.
>>
>> But one thing that I do not find one the FreeSWITCH site is any Erlang
>> examples.
>> Are there some sample programs available such as one that would look for
>> a certain type of event and print it out?
>>
>> I have found some semi-samples in the freeswitch-users archives but am
>> somewhat
>> ambivalent about using any of these without permission.
>>
>> Regards,
>> David Swardstrom
>> (profile)http://wiki.freeswitch.org/wiki/User:Dswardstrom
>>
>> _______________________________________________
>> 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
>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:anthony_minessale@hotmail.com
> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888@conference.freeswitch.org
> googletalk:conf+888@conference.freeswitch.org
> pstn:+19193869900
>
> _______________________________________________
> 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
>
>



--
Blog: http://www.dujinfang.com
Proj:  http://www.freeswitch.org.cn



--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900

_______________________________________________
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