route{ if (!mf_process_maxfwd_header(10)) { sl_send_reply(483,"Too Many Hops"); exit; }
if (has_totag()) { # sequential requests within a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { # do accunting, even if the transaction fails do_accounting("log","failed"); } else if (is_method("INVITE")) { # even if in most of the cases is useless, do RR for # re-INVITEs alos, as some buggy clients do change route set # during the dialog. record_route(); } # route it out to whatever destination was set by loose_route() # in $du (destination URI). route(relay); } else { if ( is_method("ACK") ) { if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be an ACK after # a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction -> # ignore and discard exit; } } sl_send_reply(404,"Not here"); } exit; } # CANCEL processing if (is_method("CANCEL")) { if (t_check_trans()) t_relay(); exit; } t_check_trans(); if (is_method("REGISTER")) { mid_registrar_save("location"); switch ($retcode) { case 1: xlog("forwarding REGISTER to main registrar ($$ci=$ci)\n"); fix_nated_contact(); add_path_received(); $ru = "sip:bp214.erss.in:443;transport=wss;"; t_relay(); break; case 2: xlog("absorbing REGISTER! ($$ci=$ci)\n"); break; default: xlog("failed to save registration! ($$ci=$ci)\n"); } exit; } # preloaded route checking if (loose_route()) { xlog("L_ERR", "Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]"); if (!is_method("ACK")) sl_send_reply(403,"Preload Route denied"); exit; } # record routing if (!is_method("REGISTER|MESSAGE")) record_route(); # account only INVITEs if (is_method("INVITE")) { #sethostport("10.214.0.18:443"); do_accounting("log"); } if (!is_myself("$ru")) { append_hf("P-hint: outbound\r\n"); route(relay); } # requests for my domain if (is_method("PUBLISH|SUBSCRIBE")) { sl_send_reply(503, "Service Unavailable"); exit; } if ($rU==NULL) { # request with no Username in RURI sl_send_reply(484,"Address Incomplete"); exit; } # initial requests from main registrar, need to look them up! if (is_method("INVITE|MESSAGE") && $si == "10.214.0.18" && $sp == 443) { xlog("looking up $ru!\n"); if (!mid_registrar_lookup("location")) { t_reply(404, "Not Found"); exit; } t_relay(); exit; } # when routing via usrloc, log the missed calls also do_accounting("log","missed"); route(relay); } when I make a call from user A to user B, it throws "480: Temporarily Unavailable". Both User A and User B are registered. Sent from Outlook for Android<https://aka.ms/AAb9ysg>
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users