diff --git a/include/asterisk/res_sip_session.h b/include/asterisk/res_sip_session.h index e4b05f7c3e3f5ef20cd18c8e5d9cf950e85ba1af..71e9be1c49dcc834403e2874069375d41aea4c6a 100644 --- a/include/asterisk/res_sip_session.h +++ b/include/asterisk/res_sip_session.h @@ -410,20 +410,6 @@ struct ast_datastore *ast_sip_session_get_datastore(struct ast_sip_session *sess */ void ast_sip_session_remove_datastore(struct ast_sip_session *session, const char *name); -/*! - * \brief Retrieve identifying information from an incoming request - * - * This will retrieve identifying information and place it in the - * id parameter. The caller of the function can then apply this to - * caller ID, connected line, or whatever else may be proper. - * - * \param rdata The incoming request or response - * \param[out] id The collected identity information - * \retval 0 Successfully found identifying information - * \retval -1 Identifying information could not be found - */ -int ast_sip_session_get_identity(struct pjsip_rx_data *rdata, struct ast_party_id *id); - /*! * \brief Send a reinvite or UPDATE on a session * diff --git a/res/res_sip_session.c b/res/res_sip_session.c index 9668b73e9ee1d0c60d1531d03d90cf0467931952..6cf63b883559ddd52f5f903dc686a19af8d20618 100644 --- a/res/res_sip_session.c +++ b/res/res_sip_session.c @@ -590,23 +590,6 @@ void ast_sip_session_remove_datastore(struct ast_sip_session *session, const cha ao2_callback(session->datastores, OBJ_KEY | OBJ_UNLINK | OBJ_NODATA, NULL, (void *) name); } -int ast_sip_session_get_identity(struct pjsip_rx_data *rdata, struct ast_party_id *id) -{ - /* XXX STUB - * This is low-priority as far as getting SIP working is concerned, so this - * will be addressed later. - * - * The idea here will be that the rdata will be examined for headers such as - * P-Asserted-Identity, Remote-Party-ID, and From in order to determine Identity - * information. - * - * For reference, Asterisk SCF code does something very similar to this, except in - * C++ and using its version of the ast_party_id struct, so using it as a basis - * would be a smart idea here. - */ - return 0; -} - /*! * \brief Structure used for sending delayed requests * @@ -773,19 +756,11 @@ void ast_sip_session_send_response(struct ast_sip_session *session, pjsip_tx_dat return; } -static pj_status_t session_load(pjsip_endpoint *endpt); -static pj_status_t session_start(void); -static pj_status_t session_stop(void); -static pj_status_t session_unload(void); static pj_bool_t session_on_rx_request(pjsip_rx_data *rdata); static pjsip_module session_module = { .name = {"Session Module", 14}, .priority = PJSIP_MOD_PRIORITY_APPLICATION, - .load = session_load, - .unload = session_unload, - .start = session_start, - .stop = session_stop, .on_rx_request = session_on_rx_request, }; @@ -827,50 +802,6 @@ int ast_sip_session_create_invite(struct ast_sip_session *session, pjsip_tx_data return 0; } -/*! - * \brief Called when the PJSIP core loads us - * - * Since we already have Asterisk's fine module load/unload framework - * in use, we don't need to do anything special here. - */ -static pj_status_t session_load(pjsip_endpoint *endpt) -{ - return PJ_SUCCESS; -} - -/*! - * \brief Called when the PJSIP core starts us - * - * Since we already have Asterisk's fine module load/unload framework - * in use, we don't need to do anything special here. - */ -static pj_status_t session_start(void) -{ - return PJ_SUCCESS; -} - -/*! - * \brief Called when the PJSIP core stops us - * - * Since we already have Asterisk's fine module load/unload framework - * in use, we don't need to do anything special here. - */ -static pj_status_t session_stop(void) -{ - return PJ_SUCCESS; -} - -/*! - * \brief Called when the PJSIP core unloads us - * - * Since we already have Asterisk's fine module load/unload framework - * in use, we don't need to do anything special here. - */ -static pj_status_t session_unload(void) -{ - return PJ_SUCCESS; -} - static int datastore_hash(const void *obj, int flags) { const struct ast_datastore *datastore = obj;