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? On Fri, Apr 4, 2008 at 6:27 AM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
The change was to the underlying C++ constructor to keep track of if the wrapper actually has control of a session or not.
CoreSession::CoreSession(char *nuuid) {
if (session = switch_core_session_locate(nuuid)) { channel = switch_core_session_get_channel(session); init_vars(); uuid = strdup(nuuid); memset(&caller_profile, 0, sizeof(caller_profile)); allocated = 1; } }
all the methods contain a sanity check that says. if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;
so make sure that the uuid string is actually the uuid of your call. 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.
On Fri, Apr 4, 2008 at 7:54 AM, Damjan Jovanovic <damjan@ecntelecoms.com> wrote:
X-ECN Telecoms-MailScanner-Information: Contact ECN Telecoms X-ECN Telecoms-MailScanner: Found to be clean X-ECN Telecoms-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-102.277, required 6, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.48, USER_IN_WHITELIST -100.00) X-ECN Telecoms-MailScanner-From: damjan@ecntelecoms.com X-Spam-Status: No
On Fri, 2008-04-04 at 00:38 -0700, jonathan augenstine wrote:
I have a mod-java script that is encountering an error on the latest version from svn.
The script runs successfully on build: FreeSwitch Version 1.0.pre3 (7616M)
When I retrieve the latest version from svn (8019) I get the following output from the console:
2008-04-04 02:03:15 [ERR] switch_cpp.cpp:146 getVariable() session is not initalized 2008-04-04 02:03:15 [ERR] switch_cpp.cpp:146 getVariable() session is not initalized 2008-04-04 02:03:15 [ERR] switch_cpp.cpp:153 execute() session is not initalized 2008-04-04 02:03:15 [DEBUG] switch_cpp.cpp:98 ~CoreSession() CoreSession::~CoreSession desctructor
Make sure the UUID is valid.
Otherwise, whoever changed the semantics of the session API should also patch mod_java.
Java code that works on 7616 but fails on 8019:
public void run(String sessionUuid, String args) { freeswitch.console_log("notice", "INBOUND UUID: " + sessionUuid + " ARGS: " + args + "\n"); JavaSession session = null;
try { session = new JavaSession(sessionUuid);
session.setAutoHangup(false);
String raw_dnis = session.getVariable("originate_caller_id_number"); String raw_ani = session.getVariable("caller_id_number");
Has something changed on the Java module. Do I need any new additional initialization?
Jonathan
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Bye Damjan
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400 _______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org