<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I've using a SIP setup that includes both Kamailio & Freeswitch, invites are passed from Freeswitch and relayed by Kamailio to various dispatchers, I would like to have Kamailio authenticating when Proxy Authentication is required. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=""><font color="#000000" face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;">As I understood, this can be achieved with the help of a failure route, problem is, when I'm utilizing this method - the 407 response gets reverted
 back to Freeswitch, which returns the revised invite filled with the default Freeswitch username/password, how can let Kamailio handle the authentication once receiving the 407? Can I work straight without relying on a failure route, but having the Proxy
</span>Authentication<span style="font-size: 12pt;"> header on my original invite?</span></font></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
This is my relevant configuration -</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>route[RELAY] {<br>
</span>
<div>    if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {<br>
</div>
<div>        if(!t_is_set("branch_route")) {<br>
</div>
<div>                        t_on_branch("MANAGE_BRANCH");<br>
</div>
<div>                 }<br>
</div>
<div>    }<br>
</div>
<div>    if (is_method("INVITE|SUBSCRIBE|UPDATE")) {<br>
</div>
<div>        if(!t_is_set("onreply_route")) {<br>
</div>
<div>                          t_on_reply("MANAGE_REPLY");<br>
</div>
<div>                }<br>
</div>
<div>    }<br>
</div>
<div>    if (is_method("INVITE")) {<br>
</div>
<div>        if(!t_is_set("failure_route")) {<br>
</div>
<div>                     t_on_failure("KAM_AUTH");<br>
</div>
<div>                }<br>
</div>
<div>    }<br>
</div>
<div><br>
</div>
<div>    if (!t_relay()) {<br>
</div>
<div>        sl_reply_error();<br>
</div>
<div>    }<br>
</div>
<div>    exit;<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<div>failure_route[KAM_AUTH] {<br>
</div>
<div>  if(t_check_status("401|407")) {<br>
</div>
<div>    $avp(auser) = "xxx";<br>
</div>
<div>    $avp(apass) = "yyy";<br>
</div>
<div>    t_on_failure("OUTGOING_FAILURE");<br>
</div>
<div>    uac_auth();<br>
</div>
<div>    t_relay();<br>
</div>
<div>    exit;<br>
</div>
<div>  }<br>
</div>
<span>}</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>Edward</span></div>
</body>
</html>