--- /tmp/asterisk-11.11.0/main/features.c       2014-05-09 16:28:40.000000000 -0600
+++ main/features.c     2014-08-10 15:08:43.000000000 -0600
@@ -421,4 +421,34 @@
                </description>
        </manager>
+        <function name="CHECKPARKINGSLOT" language="en_US">
+                <synopsis>
+                        Check whether a parking slot in a parking lot is currently occupied.
+                </synopsis>
+                <syntax>
+                        <parameter name="parking_slot" required="true">
+                        </parameter>
+                        <parameter name="parking_lot" required="true">
+                        </parameter>
+                </syntax>
+                <description>
+                        <para>This function returns true if the current parking slot
+                        in the parking lot space is occupied.</para>
+                </description>
+        </function>
+        <function name="GETPARKINGSLOTCHANNEL" language="en_US">
+                <synopsis>
+                        Get the channel name of an occupied parking slot in a parking lot. 
+                </synopsis>
+                <syntax>
+                        <parameter name="parking_slot" required="true">
+                        </parameter>
+                        <parameter name="parking_lot" required="true">
+                        </parameter>
+                </syntax>
+                <description>
+                        <para>This function returns true if the current parking slot
+                        in the parking lot space is occupied.</para>
+                </description>
+        </function>
        <function name="FEATURE" language="en_US">
                <synopsis>
@@ -9031,4 +9061,114 @@
 }
 
+
+/*! \brief  Dial plan function to get the parking log channel */
+static int func_get_parkingslot_channel(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
+{
+
+       struct ast_parkinglot *parkinglot;
+       struct parkeduser *pu;
+       const char *content = NULL;
+       int parking_space = -1;
+
+        AST_DECLARE_APP_ARGS(args,
+                AST_APP_ARG(parking_space);
+                AST_APP_ARG(parking_lot);
+                AST_APP_ARG(other);     /* Any remining unused arguments */
+        );
+
+        /* Parse the arguments. */
+        AST_STANDARD_APP_ARGS(args, data);
+
+        if (args.argc < 2) {
+                /* Didn't receive enough arguments to do anything */
+                ast_log(LOG_ERROR,
+                        "Usage: %s(<parking_space>,<parking_lot>)\n",
+                        cmd);
+                return -1;
+        }
+
+       parkinglot = find_parkinglot(args.parking_lot);
+       if (!parkinglot) {
+               ast_debug(1, "GETPARKINGSLOTCHANNEL Function Call Failed as parking lot %s does not exist.\n",
+                       args.parking_lot);
+       } else {
+
+               sscanf(args.parking_space, "%30d", &parking_space);
+
+               /* Check if parking space is occupied. */
+               AST_LIST_LOCK(&parkinglot->parkings);
+               AST_LIST_TRAVERSE_SAFE_BEGIN(&parkinglot->parkings, pu, list) {
+                       if (pu->parkingnum == parking_space) {
+                               content = ast_channel_name(pu->chan);
+                               ast_copy_string(buf, content, len); 
+                               break;
+                       }
+               }
+               AST_LIST_TRAVERSE_SAFE_END;
+               AST_LIST_UNLOCK(&parkinglot->parkings);
+
+       }
+
+       parkinglot_unref(parkinglot);
+
+       return 0;
+
+}
+
+/*! \brief  Dial plan function to check if parking slot is occupied */
+static int func_check_parkingslot(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
+{
+
+       struct ast_parkinglot *parkinglot;
+       struct parkeduser *pu;
+       int parking_space = -1;
+       int ret = 0;
+
+        AST_DECLARE_APP_ARGS(args,
+                AST_APP_ARG(parking_space);
+                AST_APP_ARG(parking_lot);
+                AST_APP_ARG(other);     /* Any remining unused arguments */
+        );
+
+        /* Parse the arguments. */
+        AST_STANDARD_APP_ARGS(args, data);
+
+        if (args.argc < 2) {
+                /* Didn't receive enough arguments to do anything */
+                ast_log(LOG_ERROR,
+                        "Usage: %s(<parking_space>,<parking_lot>)\n",
+                        cmd);
+                return -1;
+        }
+
+       parkinglot = find_parkinglot(args.parking_lot);
+       if (!parkinglot) {
+               ast_debug(1, "CHECKPARKINGSLOT Function Call Failed as parking lot %s does not exist.\n",
+                       args.parking_lot);
+       } else {
+
+               sscanf(args.parking_space, "%30d", &parking_space);
+
+               /* Check if parking space is occupied. */
+               AST_LIST_LOCK(&parkinglot->parkings);
+               AST_LIST_TRAVERSE_SAFE_BEGIN(&parkinglot->parkings, pu, list) {
+                       if (pu->parkingnum == parking_space) {
+                               ret = 1;
+                               break;
+                       }
+               }
+               AST_LIST_TRAVERSE_SAFE_END;
+               AST_LIST_UNLOCK(&parkinglot->parkings);
+
+       }
+
+       parkinglot_unref(parkinglot);
+
+       ast_copy_string(buf, ret ? "1" : "0" , len);
+
+       return 0;
+
+}
+
 static struct ast_custom_function feature_function = {
        .name = "FEATURE",
@@ -9043,4 +9183,14 @@
 };
 
+static struct ast_custom_function checkparkingslot_function = {
+        .name = "CHECKPARKINGSLOT",
+        .read = func_check_parkingslot,
+};
+
+static struct ast_custom_function getparkingslotchannel_function = {
+        .name = "GETPARKINGSLOTCHANNEL",
+        .read = func_get_parkingslot_channel,
+};
+
 /*! \internal \brief Clean up resources on Asterisk shutdown */
 static void features_shutdown(void)
@@ -9050,4 +9200,6 @@
        ast_custom_function_unregister(&featuremap_function);
        ast_custom_function_unregister(&feature_function);
+        ast_custom_function_unregister(&checkparkingslot_function);
+        ast_custom_function_unregister(&getparkingslotchannel_function);
        ast_manager_unregister("Bridge");
        ast_manager_unregister("Park");
@@ -9097,4 +9249,6 @@
        res |= __ast_custom_function_register(&feature_function, NULL);
        res |= __ast_custom_function_register(&featuremap_function, NULL);
+        res |= __ast_custom_function_register(&checkparkingslot_function, NULL);
+        res |= __ast_custom_function_register(&getparkingslotchannel_function, NULL);
 
        res |= ast_devstate_prov_add("Park", metermaidstate);s