[svn-commits] mmichelson: branch group/CCSS r225106 - in /team/group/CCSS: include/asterisk...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 21 11:17:25 CDT 2009


Author: mmichelson
Date: Wed Oct 21 11:17:15 2009
New Revision: 225106

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=225106
Log:
Begin process for querying device name from a channel.

Just a prototype and a stub for now.


Modified:
    team/group/CCSS/include/asterisk/channel.h
    team/group/CCSS/main/channel.c

Modified: team/group/CCSS/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/include/asterisk/channel.h?view=diff&rev=225106&r1=225105&r2=225106
==============================================================================
--- team/group/CCSS/include/asterisk/channel.h (original)
+++ team/group/CCSS/include/asterisk/channel.h Wed Oct 21 11:17:15 2009
@@ -2702,6 +2702,28 @@
  * \retval -1 Error
  */
 int ast_queue_cc_frame(struct ast_channel *chan, const char * const monitor_type, enum ast_cc_service_type service);
+
+/*!
+ * \since 1.6.4
+ * \brief Get a device name given its channel structure
+ *
+ * A common practice in Asterisk is to determine the device being talked
+ * to by dissecting the channel name. For certain channel types, this is not
+ * accurate. For instance, an ISDN channel is named based on what B channel is
+ * used, not the device being communicated with.
+ *
+ * This function interfaces with a channel tech's queryoption callback to
+ * retrieve the name of the device being communicated with. If the channel does not
+ * implement this specific option, then the traditional method of using the channel
+ * name is used instead.
+ *
+ * \param chan The channel to retrieve the information from
+ * \param device_name[out] The buffer to place the device's name into
+ * \param name_buffer_length The allocated space for the device_name
+ * \return 0 always
+ */
+int ast_channel_get_device_name(struct ast_channel *chan, char *device_name, size_t name_buffer_length);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif

Modified: team/group/CCSS/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/channel.c?view=diff&rev=225106&r1=225105&r2=225106
==============================================================================
--- team/group/CCSS/main/channel.c (original)
+++ team/group/CCSS/main/channel.c Wed Oct 21 11:17:15 2009
@@ -7260,6 +7260,13 @@
 	frame.datalen = sizeof(*payload);
 	return ast_queue_frame(chan, &frame);
 }
+
+int ast_channel_get_device_name(struct ast_channel *chan, char *device_name, size_t name_buffer_length)
+{
+	/*XXX STUB */
+	return 0;
+}
+
 /* DO NOT PUT ADDITIONAL FUNCTIONS BELOW THIS BOUNDARY
  *
  * ONLY FUNCTIONS FOR PROVIDING BACKWARDS ABI COMPATIBILITY BELONG HERE




More information about the svn-commits mailing list