In the dialplan I answer the call and then call the mod_java script. I log the UUID to the console. It looks valid. How do I verify that the UUID is valid and the correct UUID?<br><br><div class="gmail_quote">On Fri, Apr 4, 2008 at 6:27 AM, Anthony Minessale <<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.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;">The change was to the underlying C++ constructor to keep track of if the wrapper actually has control of a session or not.<br>
<br>CoreSession::CoreSession(char *nuuid)<br>{<br><br> if (session = switch_core_session_locate(nuuid)) {<br>
channel = switch_core_session_get_channel(session);<br> init_vars();<br> uuid = strdup(nuuid);<br> memset(&caller_profile, 0, sizeof(caller_profile));<br> allocated = 1;<br> }<br>
}<br><br>all the methods contain a sanity check that says.<br>if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;<br><br>so make sure that the uuid string is actually the uuid of your call.<br>
perhaps the author of this module could look at creating the session wrapper for you when it's in the context of a call like the js mod does.<div><div></div><div class="Wj3C7c"><br><br><br><br><br><br><br><br><div class="gmail_quote">
On Fri, Apr 4, 2008 at 7:54 AM, Damjan Jovanovic <<a href="mailto:damjan@ecntelecoms.com" target="_blank">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=-102.277, required 6, autolearn=not spam, ALL_TRUSTED -1.80,<br>
AWL -0.48, USER_IN_WHITELIST -100.00)<br>
X-ECN Telecoms-MailScanner-From: <a href="mailto:damjan@ecntelecoms.com" target="_blank">damjan@ecntelecoms.com</a><br>
X-Spam-Status: No<br>
<div><br>
<br>
On Fri, 2008-04-04 at 00:38 -0700, jonathan augenstine wrote:<br>
> I have a mod-java script that is encountering an error on the latest<br>
> version from svn.<br>
><br>
> The script runs successfully on build: FreeSwitch Version 1.0.pre3<br>
> (7616M)<br>
><br>
> When I retrieve the latest version from svn (8019) I get the following<br>
> output from the console:<br>
><br>
> 2008-04-04 02:03:15 [ERR] switch_cpp.cpp:146 getVariable() session is<br>
> not initalized<br>
> 2008-04-04 02:03:15 [ERR] switch_cpp.cpp:146 getVariable() session is<br>
> not initalized<br>
> 2008-04-04 02:03:15 [ERR] switch_cpp.cpp:153 execute() session is not<br>
> initalized<br>
> 2008-04-04 02:03:15 [DEBUG] switch_cpp.cpp:98 ~CoreSession()<br>
> CoreSession::~CoreSession desctructor<br>
<br>
<br>
</div>Make sure the UUID is valid.<br>
<br>
Otherwise, whoever changed the semantics of the session API should also<br>
patch mod_java.<br>
<div><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 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 = session.getVariable("caller_id_number");<br>
><br>
> Has something changed on the Java module. Do I need any new<br>
> additional initialization?<br>
><br>
> Jonathan<br>
><br>
</div>> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">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>
Bye<br>
Damjan<br>
<br>
<br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">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></div></div>-- <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" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">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" target="_blank">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" target="_blank">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></blockquote></div><br>