as per daniel's suggestion, i wrote a new tmx function t_reuse_branch(),
which can currently be called from branch-failure route:
/**
* Creates new "main" branch by making copy of branch-failure branch.
* Currently the following branch attributes are included:
* request-uri, ruid, path, instance, and branch flags.
*/
static int w_t_reuse_branch(struct sip_msg* msg, char *p1, char *p2)
{
struct cell *t;
int branch;
if (msg == NULL) return -1;
/* first get the transaction */
if (_tmx_tmb.t_check(msg, 0) == -1) return -1;
if ((t = _tmx_tmb.t_gett()) == 0) {
LM_ERR("no transaction\n");
return -1;
}
switch (get_route_type()) {
case BRANCH_FAILURE_ROUTE:
/* use the reason of the winning reply */
if ((branch = _tmx_tmb.t_get_picked_branch()) < 0) {
LM_CRIT("no picked branch (%d) for a final response"
" in MODE_ONFAILURE\n", branch);
return -1;
}
rewrite_uri(msg, &(t->uac[branch].uri));
set_ruid(msg, &(t->uac[branch].ruid));
if (t->uac[branch].path.len) {
set_path_vector(msg, &(t->uac[branch].path));
} else {
reset_path_vector(msg);
}
setbflagsval(0, t->uac[branch].flags);
set_instance(msg, &(t->uac[branch].instance));
return 1;
default:
LM_ERR("unsupported route_type %d\n", get_route_type());
return -1;
}
}
the new "main" branch does not include destination uri and socket,
because i didn't find them in struct ua_client. unless someone adds
them to struct ua_clients, they thus need to be set separately from
htable after calling t_reuse_branch().
is it ok that i commit the above function to tmx module?
in addition, i would like to add $T_reply_bf (branch flags) pv, since i
need to test some of the branch flags in other parts of branch-failure
route.
-- juha
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#426 - DNS SRV lookup in rewritehost port fails
User who did this - Daniel-Constantin Mierla (miconda)
----------
A fix should be now on branches 4.1 and master, can you try it and report if works ok?
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=426#comment1428
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#426 - DNS SRV lookup in rewritehost port fails
User who did this - Rob Eijgenraam (robeyg)
----------
There are no global dns parameters defined in kamailio.cfg
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=426#comment1427
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#426 - DNS SRV lookup in rewritehost port fails
User who did this - Rob Eijgenraam (robeyg)
----------
This is the code which is trying to execute:
#rewritehostport("91.236.192.231:5060"); (workaround)
rewritehostport("motto.nl");
remove_hf("To") ;
insert_hf("To: <sip:$rU@$rd>\r\n", "Contact");
In 4.0.3 kamailio version, it retrieved the DNS SRV record _sip._udp.motto.nl
(nslookup -querytype=SRV _sip._udp.motto.nl)
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=426#comment1426
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#410 - textops: add functions to convert and append multipart bodies.
User who did this - Víctor Seva (linuxmaniac)
----------
Maybe it's a good idea to create some helper lib for the functions like get_line, find_line_start and such.
----------
More information can be found at the following URL:
https://sip-router.org/tracker/index.php?do=details&task_id=410#comment1425
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.