public void run(String sessionUuid, String args)<br> {<br> freeswitch.console_log("notice", "INBOUND UUID: " + sessionUuid + " ARGS: " + args + "\n");<br> JavaSession session = null;<br>
<br> try<br> {<br> session = new JavaSession(sessionUuid);<br> <br> if(session == null) {<br> freeswitch.console_log("notice", "ERROR: session is NULL\n");<br>
return;<br> } else {<br> freeswitch.console_log("notice", "SUCCESS creating session\n");<br> }<br> <br> session.setAutoHangup(false);<br>
<br> byte[] dtmf_buf = new byte[20];<br> byte[] term_buf = new byte[4];<br> <br> String raw_dnis = session.getVariable("originate_caller_id_number");<br> String raw_ani = session.getVariable("caller_id_number");<br>
<br> String leading = raw_ani.substring(0, 1);<br> String ani = null;<br> if(leading.startsWith("+")) {<br> // skip first digit<br> ani = raw_ani.substring(1);<br>
} else {<br> // capture all digits<br> ani = raw_ani.substring(0);<br> }<br> <br> freeswitch.console_log("notice", "INBOUND ANI: 00" + ani + " DNIS: " + raw_dnis + "\n");<br>
<br> String destNumber = authorize("001" + ani);<br> <br> if(destNumber == null) {<br> // handle as non-widget call<br> // collect DTMF of dial out phone number<br>
<br> freeswitch.console_log("notice", "playAndGetDigits called next!!!\n");<br> <br> int done = 0;<br> do {<br> dtmf_buf = new byte[20];<br>
term_buf = new byte[4];<br><br> // dial number collection<br> session.playAndGetDigits(10, 20, 3, 30000, "#", "/usr/local/freeswitch/sounds/DialNumber.wav", "/usr/local/freeswitch/sounds/NotAsDialed.wav", dtmf_buf, "");<br>
<br><div class="gmail_quote">On Sun, Apr 6, 2008 at 11:05 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=-104.399, required 6, autolearn=not spam, ALL_TRUSTED -1.80,<br>
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>
Calling the playAndGetDigits() function is a bit obscure in Java, some<br>
args are input/output parameters. Post the code so I can see how you're<br>
trying to call it.<br>
<br>
Bye<br>
<font color="#888888">Damjan<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
On Sun, 2008-04-06 at 22:46 -0700, jonathan augenstine wrote:<br>
> Here is the bt full backtrace:<br>
><br>
> (gdb) bt full<br>
> #0 0x0088b402 in __kernel_vsyscall ()<br>
> No symbol table info available.<br>
> #1 0x00361fa0 in raise () from /lib/libc.so.6<br>
> No symbol table info available.<br>
> #2 0x003638b1 in abort () from /lib/libc.so.6<br>
> No symbol table info available.<br>
> #3 0x00398ebb in __libc_message () from /lib/libc.so.6<br>
> No symbol table info available.<br>
> #4 0x003a0f41 in _int_free () from /lib/libc.so.6<br>
> No symbol table info available.<br>
> #5 0x003a4580 in free () from /lib/libc.so.6<br>
> No symbol table info available.<br>
> #6 0x011e747c in os::free ()<br>
> from /usr/java/jdk1.5.0_12/jre/lib/i386/client/libjvm.so<br>
> No symbol table info available.<br>
> #7 0x010fd233 in jni_ReleaseByteArrayElements ()<br>
> from /usr/java/jdk1.5.0_12/jre/lib/i386/client/libjvm.so<br>
> No symbol table info available.<br>
> #8 0x009c1f5e in<br>
> Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1playAndGetDigits<br>
> (jenv=0xad91cf90, jcls=0x6ce587c,<br>
> jarg1=2949394128, jarg1_=0x6ce58a8, jarg2=10, jarg3=20, jarg4=3,<br>
> jarg5=30000, jarg6=0x6ce5894, jarg7=0x6ce5890,<br>
> jarg8=0x6ce588c, jarg9=0x6ce5888, jarg10=0x6ce5884)<br>
> at /usr/java/jdk1.5.0_12/include/jni.h:1665<br>
> jresult = <value optimized out><br>
> arg6 = 0xb291c7a0 "#"<br>
> arg7 = 0xb292d770 "/usr/local/freeswitch/sounds/DialNumber.wav"<br>
> arg8 = 0xb292dab8 "/usr/local/freeswitch/sounds/NotAsDialed.wav"<br>
> arg10 = 0xb2915838 ""<br>
> result = 1<br>
> #9 0x02d562dd in ?? ()<br>
> No symbol table info available.<br>
> #10 0xad91cf90 in ?? ()<br>
> No symbol table info available.<br>
> #11 0x06ce587c in ?? ()<br>
> No symbol table info available.<br>
> #12 0xafcc2ed0 in ?? ()<br>
> No symbol table info available.<br>
> #13 0x00000000 in ?? ()<br>
> No symbol table info available.<br>
><br>
><br>
> On Fri, Apr 4, 2008 at 9:59 PM, Michael Jerris <<a href="mailto:mike@jerris.com">mike@jerris.com</a>><br>
> wrote:<br>
> Can you disable crash protection and get a real backtrace of<br>
> this?<br>
><br>
> Mike<br>
><br>
><br>
> On Apr 5, 2008, at 12:19 AM, jonathan augenstine wrote:<br>
><br>
> > Damjan,<br>
> ><br>
> > OK, the mod_java initialization problem is resolved in the<br>
> latest<br>
> > version of the trunk. I am now back to the initial problem<br>
> I was<br>
> > hoping this version would solve. When I call<br>
> playAndGetDigits() it<br>
> > crashes Freeswitch. The console dump from the<br>
> playAndGetDigits call<br>
> > to the crash is pasted below. What would you suggest is the<br>
> next<br>
> > step to diagnose and fix this issue?<br>
> ><br>
> > Jonathan<br>
> ><br>
> ><br>
> > Freeswitch console output:<br>
> ><br>
> > 2008-04-04 22:39:50 [NOTICE] switch_cpp.cpp:509<br>
> console_log()<br>
> > playAndGetDigits called next!!!<br>
> > 2008-04-04 22:39:50 [DEBUG] switch_cpp.cpp:154 execute()<br>
> > CoreSession::execute. app: sleep data:500<br>
> > 2008-04-04 22:39:50 [DEBUG] switch_ivr_play_say.c:1225<br>
> > switch_play_and_get_digits()<br>
> switch_play_and_get_digits(session, 10,<br>
> > 20, 3, 30000,<br>
> #, /usr/local/freeswitch/sounds/DialNumber.wav, /usr/<br>
> > local/freeswitch/sounds/NotAsDialed.wav, digit_buffer, 128,<br>
> > XXXXXXXXXX)<br>
> > *** glibc detected *** ./freeswitch: free(): invalid<br>
> pointer:<br>
> > 0x08cf29d0 ***<br>
> > ======= Backtrace: =========<br>
> > /lib/libc.so.6[0x3a0f41]<br>
> > /lib/libc.so.6(cfree+0x90)[0x3a4580]<br>
> > /lib/libc.so.6[0x3bae6f]<br>
> > /lib/libc.so.6(tzset+0x3d)[0x3bb77d]<br>
> > /lib/libc.so.6(strftime_l+0x46)[0x3c0006]<br>
> > /lib/libc.so.6(strftime+0x3f)[0x3bff5f]<br>
> > /usr/local/freeswitch/lib/libfreeswitch.so.1(apr_strftime<br>
> +0x85)<br>
> > [0x19d395]<br>
> > /usr/local/freeswitch/lib/libfreeswitch.so.1(switch_strftime<br>
> +0x39)<br>
> > [0x13a139]<br>
> > /usr/local/freeswitch/lib/libfreeswitch.so.1(switch_log_printf+0x126)<br>
> > [0x17f1f6]<br>
> > /usr/local/freeswitch/lib/libfreeswitch.so.<br>
> > 1(switch_play_and_get_digits+0x192)[0x175ad2]<br>
> > /usr/local/freeswitch/lib/libfreeswitch.so.<br>
> > 1(_ZN11CoreSession16playAndGetDigitsEiiiiPcS0_S0_S0_S0_<br>
> +0xe2)<br>
> > [0x188242]<br>
> > /usr/local/freeswitch/mod/<br>
> > mod_java<br>
> > .so<br>
> ><br>
> (Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1playAndGetDigits<br>
> > +0x15d)[0xe46f3d]<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>
> 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>
</div></div></blockquote></div><br>