/*! * \internal * \brief Add any appropriate identification headers to an outbound SIP message * * This will determine if an outbound message should have identification headers and * will add the appropriately configured headers * * \param session The session on which we will be sending the message * \param tdata The outbound message * \param The identity information to place on the message */ static void add_id_headers(const struct ast_sip_session *session, pjsip_tx_data *tdata, const struct ast_party_id *id) { if (!id->number.valid || (!session->endpoint->id.trust_outbound && (ast_party_id_presentation(id) & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED)) { return; } if (session->endpoint->id.send_pai) { add_pai_header(tdata, id); } if (session->endpoint->id.send_rpid) { add_rpid_header(tdata, id); } }
/*! * \internal * \brief Add any appropriate identification headers to an outbound SIP message * * This will determine if an outbound message should have identification headers and * will add the appropriately configured headers * * \param session The session on which we will be sending the message * \param tdata The outbound message * \param The identity information to place on the message */ static void add_id_headers(const struct ast_sip_session *session, pjsip_tx_data *tdata, const struct ast_party_id *id) { if (((id->name.presentation & AST_PRES_RESTRICTION) == AST_PRES_RESTRICTED || (id->number.presentation & AST_PRES_RESTRICTION) == AST_PRES_RESTRICTED) && !session->endpoint->id.trust_outbound) { return; } if (session->endpoint->id.send_pai) { add_pai_header(tdata, id); } if (session->endpoint->id.send_rpid) { add_rpid_header(tdata, id); } }