aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-04 16:36:41 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-04 16:36:41 +0000
commit09b65c659695e292b26d07f9b1c0ecc07d7f1574 (patch)
tree5414127383a3033771cb74465f7a6235874331b7
parent88b83cc99f37b3a5d6554cd512ac3b5a22b5985f (diff)
Initial minimum ast_party_caller support.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@210354 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--include/asterisk/channel.h27
-rw-r--r--main/channel.c7
2 files changed, 34 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index dffca516c..0f414e7a9 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -285,6 +285,23 @@ struct ast_party_id {
/*!
* \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;
+};
+
+/*!
+ * \since 1.6.3
* \brief Connected Line/Party information.
* \note All string fields here are malloc'ed, so they need to be
* freed when the structure is deleted.
@@ -2325,6 +2342,16 @@ void ast_channel_set_linkgroup(struct ast_channel *chan, struct ast_channel *pee
/*!
* \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
diff --git a/main/channel.c b/main/channel.c
index eb6995c66..2dba7eba2 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -1579,6 +1579,13 @@ static void ast_party_id_free(struct ast_party_id *doomed)
}
}
+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)
{
if (dest == src) {