summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2009-10-22 16:33:22 +0000
committerRichard Mudgett <rmudgett@digium.com>2009-10-22 16:33:22 +0000
commit1174a6161274ee600f77089bff5f87a98f57bf4f (patch)
tree6e14b9b86b44349743912e3e737f8cbe8c706d22 /include/asterisk
parent3acfd4933cf70974fda938fb2e7421d659aa87d0 (diff)
Add support for calling and called subaddress. Partial support for COLP subaddress.
The Telecom Specs in NZ suggests that SUB ADDRESS is always on, so doing "desk to desk" between offices each with an asterisk box over the ISDN should then be possible, without a whole load of DDI numbers required. (closes issue #15604) Reported by: alecdavis Patches: asterisk_subaddr_trunk.diff11.txt uploaded by alecdavis (license 585) Some minor modificatons were made. Tested by: alecdavis, rmudgett Review: https://reviewboard.asterisk.org/r/405/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/autoconfig.h.in49
-rw-r--r--include/asterisk/channel.h105
2 files changed, 125 insertions, 29 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 0746a890f..05f0fe22d 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -668,6 +668,9 @@
/* Define to 1 if you have the ISDN service messages library. */
#undef HAVE_PRI_SERVICE_MESSAGES
+/* Define to 1 if you have the ISDN PRI subaddressing library. */
+#undef HAVE_PRI_SUBADDR
+
/* Define to 1 if you have the ISDN PRI get_version library. */
#undef HAVE_PRI_VERSION
@@ -1253,9 +1256,6 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define to 1 if the C compiler supports function prototypes. */
-#undef PROTOTYPES
-
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE
@@ -1272,11 +1272,6 @@
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
-/* Define to 1 if the `setvbuf' function takes the buffering type as its
- second argument and the buffer pointer as the third, as on System V before
- release 3. */
-#undef SETVBUF_REVERSED
-
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
@@ -1297,20 +1292,30 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
-/* Define to 1 if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
+/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
@@ -1328,20 +1333,6 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
-/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-
-/* Define like PROTOTYPES; this can be used by system headers. */
-#undef __PROTOTYPES
-
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 2b285ba8d..1edd0d883 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -185,6 +185,37 @@ struct ast_generator {
};
/*!
+ * \since 1.6.3
+ * \brief Information needed to specify a subaddress in a call.
+ * \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_subaddress {
+ /*!
+ * \brief Malloced subaddress string.
+ * \note If the subaddress type is user specified then the subaddress is
+ * a string of ASCII hex because the actual subaddress is likely BCD encoded.
+ */
+ char *str;
+ /*!
+ * \brief Q.931 subaddress type.
+ * \details
+ * nsap(0),
+ * user_specified(2)
+ */
+ int type;
+ /*!
+ * \brief TRUE if odd number of address signals
+ * \note The odd/even indicator is used when the type of subaddress is
+ * user_specified and the coding is BCD.
+ */
+ unsigned char odd_even_indicator;
+ /*! \brief TRUE if the subaddress information is valid/present */
+ unsigned char valid;
+};
+
+/*!
* \brief Structure for all kinds of caller ID identifications.
* \note All string fields here are malloc'ed, so they need to be
* freed when the structure is deleted.
@@ -260,6 +291,16 @@ struct ast_callerid {
* (Field will eventually move to struct ast_channel.dialed.transit_network_select)
*/
int cid_tns;
+ /*!
+ * \brief Caller id subaddress.
+ * (Field will eventually move to struct ast_channel.caller.id.subaddress)
+ */
+ struct ast_party_subaddress subaddress;
+ /*!
+ * \brief Dialed/Called subaddress.
+ * (Field will eventually move to struct ast_channel.dialed.subaddress)
+ */
+ struct ast_party_subaddress dialed_subaddress;
};
/*!
@@ -276,6 +317,9 @@ struct ast_party_id {
/*! \brief Subscriber name (Malloced) */
char *name;
+ /*! \brief Subscriber subaddress. */
+ struct ast_party_subaddress subaddress;
+
/*! \brief Q.931 encoded type-of-number/numbering-plan fields */
int number_type;
@@ -2342,6 +2386,67 @@ void ast_channel_set_linkgroup(struct ast_channel *chan, struct ast_channel *pee
/*!
* \since 1.6.3
+ * \brief Initialize the given subaddress structure.
+ *
+ * \param init Subaddress structure to initialize.
+ *
+ * \return Nothing
+ */
+void ast_party_subaddress_init(struct ast_party_subaddress *init);
+
+/*!
+ * \since 1.6.3
+ * \brief Copy the source party subaddress information to the destination party subaddress.
+ *
+ * \param dest Destination party subaddress
+ * \param src Source party subaddress
+ *
+ * \return Nothing
+ */
+void ast_party_subaddress_copy(struct ast_party_subaddress *dest, const struct ast_party_subaddress *src);
+
+/*!
+ * \since 1.6.3
+ * \brief Initialize the given party subadress structure using the given guide
+ * for a set update operation.
+ *
+ * \details
+ * The initialization is needed to allow a set operation to know if a
+ * value needs to be updated. Simple integers need the guide's original
+ * value in case the set operation is not trying to set a new value.
+ * String values are simply set to NULL pointers if they are not going
+ * to be updated.
+ *
+ * \param init Party Subaddress structure to initialize.
+ * \param guide Source party subaddress to use as a guide in initializing.
+ *
+ * \return Nothing
+ */
+void ast_party_subaddress_set_init(struct ast_party_subaddress *init, const struct ast_party_subaddress *guide);
+
+/*!
+ * \since 1.6.3
+ * \brief Set the source party subaddress information into the destination party subaddress.
+ *
+ * \param dest Destination party subaddress
+ * \param src Source party subaddress
+ *
+ * \return Nothing
+ */
+void ast_party_subaddress_set(struct ast_party_subaddress *dest, const struct ast_party_subaddress *src);
+
+/*!
+ * \since 1.6.3
+ * \brief Destroy the party subaddress contents
+ *
+ * \param doomed The party subaddress to destroy.
+ *
+ * \return Nothing
+ */
+void ast_party_subaddress_free(struct ast_party_subaddress *doomed);
+
+/*!
+ * \since 1.6.3
* \brief Initialize the given caller structure.
*
* \param init Caller structure to initialize.