[Freeswitch-svn] [commit] r3800 - freeswitch/trunk/src/mod/languages/mod_spidermonkey

Freeswitch SVN mikej at freeswitch.org
Fri Dec 22 14:25:38 EST 2006


Author: mikej
Date: Fri Dec 22 14:25:38 2006
New Revision: 3800

Modified:
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

Log:
add uuid to session properties for spidermonkey

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Fri Dec 22 14:25:38 2006
@@ -1592,7 +1592,7 @@
 /*********************************************************************************/
 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 @@
 	{"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}
 };
 
@@ -1659,6 +1660,9 @@
 	switch(param) {
 	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))));



More information about the Freeswitch-svn mailing list