|
@@ -212,6 +212,7 @@ static int w_t_get_status_code(sip_msg_t *msg, char *p1, char *p2);
|
|
|
|
|
|
static int t_clean(struct sip_msg *msg, char *key, char *value);
|
|
|
static int w_t_exists(struct sip_msg *msg, char *p1, char *p2);
|
|
|
+static int w_t_cell_append_branches(sip_msg_t *msg, char *pindex, char *plabel);
|
|
|
|
|
|
/* by default the fr timers avps are not set, so that the avps won't be
|
|
|
* searched for nothing each time a new transaction is created */
|
|
@@ -442,6 +443,8 @@ static cmd_export_t cmds[] = {
|
|
|
{"t_next_contact_flow", t_next_contact_flow, 0, 0, 0, REQUEST_ROUTE},
|
|
|
{"t_clean", t_clean, 0, 0, 0, ANY_ROUTE},
|
|
|
{"t_exists", w_t_exists, 0, 0, 0, ANY_ROUTE},
|
|
|
+ {"t_cell_append_branches", w_t_cell_append_branches, 2, fixup_igp_igp,
|
|
|
+ fixup_free_igp_igp, ANY_ROUTE},
|
|
|
|
|
|
/* not applicable from the script */
|
|
|
{"load_tm", (cmd_function)load_tm, NO_SCRIPT, 0, 0, 0},
|
|
@@ -3209,6 +3212,26 @@ static int w_t_exists(struct sip_msg *msg, char *p1, char *p2)
|
|
|
return ki_t_exists(msg);
|
|
|
}
|
|
|
|
|
|
+static int w_t_cell_append_branches(sip_msg_t *msg, char *pindex, char *plabel)
|
|
|
+{
|
|
|
+ int tindex = 0;
|
|
|
+ int tlabel = 0;
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ if(fixup_get_ivalue(msg, (gparam_t *)pindex, &tindex) != 0) {
|
|
|
+ LM_ERR("invalid index parameter\n");
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ if(fixup_get_ivalue(msg, (gparam_t *)plabel, &tlabel) != 0) {
|
|
|
+ LM_ERR("invalid label parameter\n");
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
+ ret = t_cell_append_branches(tindex, tlabel);
|
|
|
+
|
|
|
+ return (ret == 0) ? 1 : ret;
|
|
|
+}
|
|
|
+
|
|
|
#ifdef USE_DNS_FAILOVER
|
|
|
/* parse reply codes for failover given in module parameter */
|
|
|
static int t_failover_parse_reply_codes()
|