*/
struct ast_taskprocessor *ast_sip_get_distributor_serializer(pjsip_rx_data *rdata);
+/*!
+ * \brief Record the task's serializer name on the tdata structure.
+ * \since 13.15.0
+ *
+ * \param tdata The outgoing message.
+ *
+ * \retval PJ_SUCCESS.
+ */
+pj_status_t ast_sip_record_request_serializer(pjsip_tx_data *tdata);
+
/*!
* \brief Set a serializer on a SIP dialog so requests and responses are automatically serialized
*
}
}
+ ast_sip_record_request_serializer(tdata);
+
/* We need to insure that the wrapper and tdata are available when the
* transaction callback is executed.
*/
static int distribute(void *data);
static pj_bool_t distributor(pjsip_rx_data *rdata);
-static pj_status_t record_serializer(pjsip_tx_data *tdata);
static pjsip_module distributor_mod = {
.name = {"Request Distributor", 19},
.priority = PJSIP_MOD_PRIORITY_TSX_LAYER - 6,
- .on_tx_request = record_serializer,
+ .on_tx_request = ast_sip_record_request_serializer,
.on_rx_request = distributor,
.on_rx_response = distributor,
};
/*! Pool of serializers to use if not supplied. */
static struct ast_taskprocessor *distributor_pool[DISTRIBUTOR_POOL_SIZE];
-/*!
- * \internal
- * \brief Record the task's serializer name on the tdata structure.
- * \since 14.0.0
- *
- * \param tdata The outgoing message.
- *
- * \retval PJ_SUCCESS.
- */
-static pj_status_t record_serializer(pjsip_tx_data *tdata)
+pj_status_t ast_sip_record_request_serializer(pjsip_tx_data *tdata)
{
struct ast_taskprocessor *serializer;
pjsip_tx_data_set_transport(tdata, &selector);
}
+ ast_sip_record_request_serializer(tdata);
pjsip_publishc_send(client->client, tdata);
}
pjsip_tx_data_set_transport(tdata, &selector);
}
+ ast_sip_record_request_serializer(tdata);
status = pjsip_publishc_send(client->client, tdata);
if (status == PJ_EBUSY) {
/* We attempted to send the message but something else got there first */
pjsip_tx_data_set_transport(tdata, &selector);
}
+ ast_sip_record_request_serializer(tdata);
pjsip_publishc_send(client->client, tdata);
}
client->auth_attempts++;
*/
ast_sip_set_tpselector_from_transport_name(client_state->transport_name, &selector);
pjsip_regc_set_transport(client_state->client, &selector);
+ ast_sip_record_request_serializer(tdata);
status = pjsip_regc_send(client_state->client, tdata);
/* If the attempt to send the message failed and the callback was not invoked we need to