diff options
Diffstat (limited to 'pjsip/include/pjsip/sip_transaction.h')
-rw-r--r-- | pjsip/include/pjsip/sip_transaction.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_transaction.h b/pjsip/include/pjsip/sip_transaction.h index e15fd13d..dfd00339 100644 --- a/pjsip/include/pjsip/sip_transaction.h +++ b/pjsip/include/pjsip/sip_transaction.h @@ -26,6 +26,7 @@ #include <pjsip/sip_msg.h> #include <pjsip/sip_util.h> +#include <pjsip/sip_transport.h> #include <pj/timer.h> PJ_BEGIN_DECL @@ -96,6 +97,7 @@ struct pjsip_transaction pj_str_t transaction_key;/**< Hash table key. */ pj_uint32_t hashed_key; /**< Key's hashed value. */ pj_str_t branch; /**< The branch Id. */ + pjsip_tpselector tp_sel; /**< Transport selector. */ /* * State and status. @@ -214,6 +216,26 @@ PJ_DECL(pj_status_t) pjsip_tsx_create_uas( pjsip_module *tsx_user, /** + * Lock/bind transaction to a specific transport/listener. This is optional, + * as normally transport will be selected automatically based on the + * destination of the request upon resolver completion. Also it's only valid + * for UAC transaction (to send outgoing request), since for UAS the + * transport will be selected according to rules about handling incoming + * request (most likely it will use the transport where the request is + * coming from if ";rport" parameter is present in Via header). + * + * @param tsx The UAC transaction. + * @param sel Transport selector containing the specification of + * transport or listener to be used by this transaction + * to send requests. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + */ +PJ_DECL(pj_status_t) pjsip_tsx_set_transport(pjsip_transaction *tsx, + const pjsip_tpselector *sel); + + +/** * Call this function to manually feed a message to the transaction. * For UAS transaction, application MUST call this function after * UAS transaction has been created. |