summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsip/sip_dialog.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-01-12 06:37:35 +0000
committerBenny Prijono <bennylp@teluu.com>2007-01-12 06:37:35 +0000
commit7567c6b90e8e0dd20204a579cd548ad7ae00febf (patch)
treefaadb7133a618fe5b1551b3ea89717eec860bee3 /pjsip/include/pjsip/sip_dialog.h
parent5058236717c4a44f02a1507b2833e8cff8f54083 (diff)
Workaround for ticket #50: added API to lock/bind transaction, dialog, and regc to a specific transport/listener
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@879 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip/sip_dialog.h')
-rw-r--r--pjsip/include/pjsip/sip_dialog.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_dialog.h b/pjsip/include/pjsip/sip_dialog.h
index b4d2a1ac..9cea4ded 100644
--- a/pjsip/include/pjsip/sip_dialog.h
+++ b/pjsip/include/pjsip/sip_dialog.h
@@ -28,6 +28,7 @@
#include <pjsip/sip_msg.h>
#include <pjsip/sip_auth.h>
#include <pjsip/sip_errno.h>
+#include <pjsip/sip_transport.h>
#include <pj/sock.h>
#include <pj/assert.h>
@@ -134,6 +135,9 @@ struct pjsip_dialog
/** Transaction counter. */
int tsx_count; /**< Number of pending transactions. */
+ /** Transport selector. */
+ pjsip_tpselector tp_sel;
+
/* Dialog usages. */
unsigned usage_cnt; /**< Number of registered usages. */
pjsip_module *usage[PJSIP_MAX_MODULE]; /**< Array of usages,
@@ -224,6 +228,30 @@ PJ_DECL(pj_status_t) pjsip_dlg_create_uas( pjsip_user_agent *ua,
/**
+ * Lock/bind dialog to a specific transport/listener. This is optional,
+ * as normally transport will be selected automatically based on the
+ * destination of requests upon resolver completion. When the dialog is
+ * explicitly bound to the specific transport/listener, all UAC transactions
+ * originated by this dialog will use the specified transport/listener
+ * when sending outgoing requests.
+ *
+ * Note that this doesn't affect the Contact header generated by this
+ * dialog. Application must manually update the Contact header if
+ * necessary, to adjust the address according to the transport being
+ * selected.
+ *
+ * @param dlg The dialog instance.
+ * @param sel Transport selector containing the specification of
+ * transport or listener to be used by this dialog
+ * to send requests.
+ *
+ * @return PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_set_transport(pjsip_dialog *dlg,
+ const pjsip_tpselector *sel);
+
+
+/**
* Create a new (forked) dialog on receipt on forked response in rdata.
* The new dialog will be created from original_dlg, except that it will have
* new remote tag as copied from the To header in the response. Upon return,