[asterisk-commits] rmudgett: trunk r210354 - in /trunk: include/asterisk/channel.h main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 4 11:36:42 CDT 2009


Author: rmudgett
Date: Tue Aug  4 11:36:41 2009
New Revision: 210354

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=210354
Log:
Initial minimum ast_party_caller support.

Modified:
    trunk/include/asterisk/channel.h
    trunk/main/channel.c

Modified: trunk/include/asterisk/channel.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=210354&r1=210353&r2=210354
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Tue Aug  4 11:36:41 2009
@@ -281,6 +281,23 @@
 
 	/*! \brief Q.931 encoded number presentation/screening fields */
 	int number_presentation;
+};
+
+/*!
+ * \since 1.6.3
+ * \brief Caller Party information.
+ * \note All string fields here are malloc'ed, so they need to be
+ * freed when the structure is deleted.
+ * \note NULL and "" must be considered equivalent.
+ */
+struct ast_party_caller {
+	struct ast_party_id id;		/*! \brief Caller party ID */
+
+	/*! \brief Automatic Number Identification (ANI) (Malloced) */
+	char *ani;
+
+	/*! \brief Automatic Number Identification 2 (Info Digits) */
+	int ani2;
 };
 
 /*!
@@ -2325,6 +2342,16 @@
 
 /*!
  * \since 1.6.3
+ * \brief Initialize the given caller structure.
+ *
+ * \param init Caller structure to initialize.
+ *
+ * \return Nothing
+ */
+void ast_party_caller_init(struct ast_party_caller *init);
+
+/*!
+ * \since 1.6.3
  * \brief Copy the source caller information to the destination caller.
  *
  * \param dest Destination caller

Modified: trunk/main/channel.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/channel.c?view=diff&rev=210354&r1=210353&r2=210354
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Tue Aug  4 11:36:41 2009
@@ -1577,6 +1577,13 @@
 		ast_free(doomed->name);
 		doomed->name = NULL;
 	}
+}
+
+void ast_party_caller_init(struct ast_party_caller *init)
+{
+	ast_party_id_init(&init->id);
+	init->ani = NULL;
+	init->ani2 = 0;
 }
 
 void ast_party_caller_copy(struct ast_callerid *dest, const struct ast_callerid *src)




More information about the asterisk-commits mailing list