<div dir="ltr"><div>Hi All,</div><div>   I'm having some issues trying to properly send a '302 Moved Temporarily' reply to the calling UAC (UAC1) when the remote UAC (UAC2) returns a 486 status (Do Not Disturb). The goal is to redirect UAC1 to a voicemail server when UAC2 is in DND.<br></div><div>Here are the pertinent parts of my config:<br></div><div><br></div><div>route {<br>        # drop some things right away<br>        route(DROP);<br><br>        # perform sanity check<br>        route(SANITYCHECK);<br><br>        # handle registrations<br>        if(is_method("REGISTER")) {<br>                route(REGISTRATION);<br>                exit;<br>        }<br><br>        # handle invites<br>        if(is_method("INVITE")) {<br>                route("INVITE");<br>                exit;<br>        }<br><br>        route(RELAY);<br>}</div><div><br></div>route[INVITE] {<br>        # add this proxy to the record-route so it stays in the loop<br>        record_route();<br><br>        # if we can find this user in the location DB...<br>        if(lookup("location")) {<br>                # relay the invite to the new dURI<br>                t_on_failure("FOURDIGITFAIL");<br>                t_on_reply("FOURDIGITREPLY");<br>                route(RELAY);<br>                # go back to the main route<br>                return;<br>        }<br><div><br></div><div>onreply_route[FOURDIGITREPLY] {<br>        if(t_check_status("4[0-9]{2}")) {</div><div>                t_reply("302", "Moved Temporarily");<br>        }<br>}</div><div><br></div><div>I'm having issues with the t_reply in the onreply_route. It successfully sends the reply, but I can't seem to set the Contact header properly. I'm trying to set it to the location of the user's mailbox on the voicemail sever (ie <a href="mailto:sip%3A1000@vmpbx.domain.com">sip:1000@vmpbx.domain.com</a>), but nothing I try works. I've tried:</div><div></div><div>     remove_hf("Contact");<br>     insert_hf("Contact: <a href="mailto:sip%3A1000@vmpbx.domain.com">sip:1000@vmpbx.domain.com</a>");</div><div>     t_reply("302", "Moved Temporarily");</div><div><br></div><div>But as I understand it, that just changes the header in the reply from UAC2, not the reply I'm sending to UAC1</div><div><br></div><div>Then I tried:<br></div><div>     append_to_reply("Contact: <a href="mailto:sip%3A1000@vmpbx.domain.com">sip:1000@vmpbx.domain.com</a>" );</div><div>     t_reply("302", "Moved Temporarily");</div><div><br></div><div>But I can't use append_to_reply in an onreply block.</div><div>How can I change the Contact header in the reply that's sent? Am I just going about this the wrong way? Any help would be appreciated. Thanks<br></div></div>