All pastes #41079 Raw Edit

Untitled

public text v1 · immutable
#41079 ·published 2006-02-10 23:51 UTC
rendered paste body
route[2] {

        # -----------------------------------------------------------------
        # REGISTER Message Handler
        # -----------------------------------------------------------------
        xlog("L_ALERT", "Incoming REGISTER %tu %fu %ru \n");

        if (!search("^Contact:[ ]*\*") && (client_nat_test("7")||client_nat_test("3"))) {
                setflag(6);
                fix_nated_register();
                fix_nated_contact();
                force_rport();
        }; 

        sl_send_reply("100", "Trying");
        
        if (!www_authorize("","subscriber")) {
                xlog("L_ALERT", "Sending Challenge to REGISTER - %tu \n");
                www_challenge("","0");
                break;
        } else {
                xlog("L_ALERT", "REGISTERed - %tu \n");
        }

        #if (!check_to()) {
                #sl_send_reply("401", "Unauthorized");
                #break;
        #};

        consume_credentials();

        if (!save("location")) {
                xlog("L_ALERT", "cant save location - %tu \n");
                sl_reply_error();
        };
}