/* * Prepare all OSP routes * This function does not work in branch route block. * param msg SIP message * param ignore1 * param ignore2 * return MODULE_RETURNCODE_TRUE success, MODULE_RETURNCODE_FALSE failure */ int ospPrepareAllRoutes( struct sip_msg* msg, char* ignore1, char* ignore2) { int result = MODULE_RETURNCODE_TRUE; LOG(L_DBG, "osp: ospPrepareAllRoutes\n"); for(result = ospPrepareDestination(msg, OSP_FIRST_ROUTE, OSP_MAIN_ROUTE, _osp_redir_uri); result == MODULE_RETURNCODE_TRUE; result = ospPrepareDestination(msg, OSP_NEXT_ROUTE, OSP_MAIN_ROUTE, _osp_redir_uri)) { } return MODULE_RETURNCODE_TRUE; }
/* * Prepare OSP route * This function only works in branch route block. * This function is only for OpenSIPS. * param msg SIP message * param ignore1 * param ignore2 * return MODULE_RETURNCODE_TRUE success, MODULE_RETURNCODE_FALSE failure */ int ospPrepareRoute( struct sip_msg* msg, char* ignore1, char* ignore2) { int result = MODULE_RETURNCODE_TRUE; /* The first parameter will be ignored */ result = ospPrepareDestination(msg, OSP_FIRST_ROUTE, OSP_BRANCH_ROUTE, 0, 0); return result; }
/* * Prepare OSP next route * This function prepare the next OSP route * This function is only for SER. SER does not support rewrite_uri in BRANCH_ROUTE. * param msg SIP message * param ignore1 * param ignore2 * return MODULE_RETURNCODE_TRUE success, MODULE_RETURNCODE_FALSE failure */ int ospPrepareNextRoute( struct sip_msg* msg, char* ignore1, char* ignore2) { int result = MODULE_RETURNCODE_TRUE; LOG(L_DBG, "osp: ospPrepareNextRoute\n"); result = ospPrepareDestination(msg, OSP_NEXT_ROUTE, OSP_MAIN_ROUTE, 0); return result; }