geoffreymina@gmail.com wrote:
Hello, I have a need to translate a 486 from my asterisk server to a 600 when sending upstream to my carrier. The problem I am seeing is that when I return 486, the carrier re-presents the call to my next server in the SRV rotation... I really want the 486 to be a final disposition, so I am assuming sending a 600 would solve my issue.
I am not sure how to go about forwarding the message, but modifying the SIP code... is that even allowed?
This would be something like what I'm trying to do:
failure_route[1]{ if(t_check_status("
Sure, you can do that. It is not a good idea to do so in principle because it violates how proxies should behave; proxies are very thin interoperation layers that are designed to statefully pass requests and replies back and forth more or less strictly as intended by the endpoints involved, and a B2BUA would more ideally fit your goal. Nevertheless, it is possible.
failure_route[1] {
if(t_was_cancelled()) exit;
if(t_check_status("486")) { t_reply("603", "Declined"); exit; } }