summaryrefslogtreecommitdiff
path: root/channels/sip/include/dialog.h
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2010-02-17 06:25:15 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2010-02-17 06:25:15 +0000
commite7a5fb5459e9bd65383d08a2c6b1534ea4027526 (patch)
tree71fd1d739915bdaf45c20dc0cd3fda632194f03b /channels/sip/include/dialog.h
parent68c6175f872f76ad047b776759cb6c80b3a7a7c4 (diff)
Make all of the various rtpqos parameters in this branch available from the CHANNEL function.
Also includes a test for retrieving rtpqos parameters, including a NULL RTP driver. Additionally, some further separation of the SIP internal API into headers was necessary. (closes issue #16652) Reported by: kkm Patches: 20100204__issue16652.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/501/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip/include/dialog.h')
-rw-r--r--channels/sip/include/dialog.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/channels/sip/include/dialog.h b/channels/sip/include/dialog.h
new file mode 100644
index 000000000..554aa5e6a
--- /dev/null
+++ b/channels/sip/include/dialog.h
@@ -0,0 +1,75 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2010, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ * \brief sip dialog management header file
+ */
+
+#include "sip.h"
+
+#ifndef _SIP_DIALOG_H
+#define _SIP_DIALOG_H
+
+/*! \brief
+ * when we create or delete references, make sure to use these
+ * functions so we keep track of the refcounts.
+ * To simplify the code, we allow a NULL to be passed to dialog_unref().
+ */
+#define dialog_ref(arg1,arg2) dialog_ref_debug((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
+#define dialog_unref(arg1,arg2) dialog_unref_debug((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
+struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, char *tag, char *file, int line, const char *func);
+struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, char *tag, char *file, int line, const char *func);
+
+struct sip_pvt *sip_alloc(ast_string_field callid, struct sockaddr_in *sin,
+ int useglobal_nat, const int intended_method, struct sip_request *req);
+void sip_scheddestroy(struct sip_pvt *p, int ms);
+int sip_cancel_destroy(struct sip_pvt *p);
+
+/*! \brief Destroy SIP call structure.
+ * Make it return NULL so the caller can do things like
+ * foo = sip_destroy(foo);
+ * and reduce the chance of bugs due to dangling pointers.
+ */
+struct sip_pvt *sip_destroy(struct sip_pvt *p);
+
+/*! \brief Destroy SIP call structure.
+ * Make it return NULL so the caller can do things like
+ * foo = sip_destroy(foo);
+ * and reduce the chance of bugs due to dangling pointers.
+ */
+void __sip_destroy(struct sip_pvt *p, int lockowner, int lockdialoglist);
+/*!
+ * \brief Unlink a dialog from the dialogs container, as well as any other places
+ * that it may be currently stored.
+ *
+ * \note A reference to the dialog must be held before calling this function, and this
+ * function does not release that reference.
+ */
+void *dialog_unlink_all(struct sip_pvt *dialog, int lockowner, int lockdialoglist);
+
+/*! \brief Acknowledges receipt of a packet and stops retransmission
+ * called with p locked*/
+int __sip_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod);
+
+/*! \brief Pretend to ack all packets
+ * called with p locked */
+void __sip_pretend_ack(struct sip_pvt *p);
+
+/*! \brief Acks receipt of packet, keep it around (used for provisional responses) */
+int __sip_semi_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod);
+
+#endif /* defined(_SIP_DIALOG_H) */