On Tuesday 03 March 2015 17:56:45 Jayanth Acharya wrote:
Would like to know if Kamilio (in it's sip-proxy role) could be configured to somehow take note of the 'Contact:' header of a 302 response from B-party, to forward the INVITE to C-party (specified by the updated Contact URI) ?
No problem, if you take a look at the "default" config it will have a failure_route[MANAGE_FAILURE] and a WITH_BLOCK3XX define commented. The failure route will normally block 302:
# block call redirect based on 3xx replies. if (t_check_status("3[0-9][0-9]")) { send_reply("404","Not found BLOCK3XX"); exit; }
If you replace (or insert before) above code something like:
if (t_check_status("302") { $var(contact) = $T_rpl($ct); $var(contact) = $(var(contact){re.subst,/^<(sip:+? [0-9]+@.*)>$/\1/});
$du=$null; $ru=$var(contact);
route(RELAY); exit; }
You have your case solved.
BTW you might want to do additonal checks when billing is concerned.