From 109b2cf3ec6f2fa03dea4658c0ae49c65b399de5 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 22 Dec 2006 19:25:38 +0000 Subject: [PATCH] add uuid to session properties for spidermonkey git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3800 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/languages/mod_spidermonkey/mod_spidermonkey.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index ba5efc4b35..86877d210a 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -1592,7 +1592,7 @@ static JSBool js_fetchurl_file(JSContext *cx, JSObject *obj, uintN argc, jsval * /*********************************************************************************/ enum session_tinyid { SESSION_NAME, SESSION_STATE, - PROFILE_DIALPLAN, PROFILE_CID_NAME, PROFILE_CID_NUM, PROFILE_IP, PROFILE_ANI, PROFILE_ANI_II, PROFILE_DEST + PROFILE_DIALPLAN, PROFILE_CID_NAME, PROFILE_CID_NUM, PROFILE_IP, PROFILE_ANI, PROFILE_ANI_II, PROFILE_DEST, SESSION_UUID }; static JSFunctionSpec session_methods[] = { @@ -1627,6 +1627,7 @@ static JSPropertySpec session_props[] = { {"ani", PROFILE_ANI, JSPROP_READONLY|JSPROP_PERMANENT}, {"aniii", PROFILE_ANI_II, JSPROP_READONLY|JSPROP_PERMANENT}, {"destination", PROFILE_DEST, JSPROP_READONLY|JSPROP_PERMANENT}, + {"uuid", SESSION_UUID, JSPROP_READONLY|JSPROP_PERMANENT}, {0} }; @@ -1660,6 +1661,9 @@ static JSBool session_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval case SESSION_NAME: *vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, switch_channel_get_name(channel))); break; + case SESSION_UUID: + *vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, switch_channel_get_uuid(channel))); + break; case SESSION_STATE: *vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, switch_channel_state_name(switch_channel_get_state(channel)))); break;