diff options
Diffstat (limited to 'pjsip/include/pjsip/sip_dialog.h')
-rw-r--r-- | pjsip/include/pjsip/sip_dialog.h | 28 |
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, |