Hello,
I 'd like to relay calls to another sip proxy, which requires authentication. But i can't forward the 407 reply to the caller, beacause they cant authenticate themselves, so i have to authenticate the call myself, without the caller knows anything about it.
witch uac_auth, i can add the proxy-authorization header, but i can't send the new request to the proxy.
i try this way:
route[1] { t_on_failure("1"); rewritehostport("another.proxy:5060"); if (!t_relay()) { sl_reply_error(); } exit;
}
failure_route[1] { xlog("L_WARN", "FAILURE Route 3 AUTH required...trying..\n"); uac_auth(); if(t_newtran()) { xlog("L_WARN", "Creating new transaction successfully...\n"); } else { xlog("L_WARN", "Creating new transaction failed...\n"); }; t_relay(); }
When the proxy challange authentication with 407, the call is passed to failure route properly, but t_relay failed with the following error: 0(27975) ERROR:tm:t_forward_nonack: no branch for forwarding 0(27975) ERROR:tm:w_t_relay: t_forward_nonack failed
I think that's mean that the transaction doesn't exists, becacause it acknowleged alrealy, am i right? i think i have to t_newtran(), but it cannot be done in failure route, Can you suggest any method to send the request again with the credentials?
Thanks any help, Tamas