[Users] Not hung upping the softphones...

raviprakash sunkara sunkara.raviprakash.feb14 at gmail.com
Tue Jun 27 12:35:03 CEST 2006


Hi , User,,,

great issue to me ... please  users help into my issue

1) the softphones are not hung upping ... Disconnecting...
 that means  Behind the Nat client  send   Bye request .. But openser server
is responseing the  Bye .. and Ack to server...




my openser.cfg


route{
    log("Testing-------> Starting\n");
    if (!mf_process_maxfwd_header("10")) {
        sl_send_reply("483","Too Many Hops");
        exit;
    };
    if (msg:len >=  2048 ) {
        sl_send_reply("513", "Message too big");
        exit;
    };

    log("Testing------->  NAT detection into route 2 \n");
    route(2);

    if (!method=="REGISTER")   {
    log("Testing-------> method  != REG\n");
        record_route();
    };
    if (loose_route()) {
        append_hf("P-hint: rr-enforced\r\n");
        route(1);
    };

    if (!uri==myself) {
        append_hf("P-hint: outbound\r\n");
        route(1);
    };

    if (uri==myself) {
    log("Testing------->  uri==my\n");
        if (method=="REGISTER") {
            if (!www_authorize("", "subscriber")) {
                www_challenge("", "0");
                exit;
            };

            if (isflagset(5)) {
                setflag(6);
                # if you want OPTIONS natpings uncomment next
                # setflag(7);
            };
            save("location");
            exit;
        };

        if (!lookup("location")) {
            sl_send_reply("404", "Not Found...... ! ");
            exit;
        };
        append_hf("P-hint: usrloc applied\r\n");
    };

    route(1);
}


route[1] {
    log("Testing------->  route[1] \n");
    if (subst_uri('/(sip:.*);nat=yes/\1/')){
        setflag(6);
    };

    if (isflagset(5)||isflagset(6)) {
        route(3);
    }

    if (!t_relay()) {
        sl_reply_error();
    };
    exit;
}

route[2]{
    log("Testing------->  route[2] \n");
    force_rport();
    if (nat_uac_test("19")) {
        log("Testing------->  nat_uac-test_19\n");
        if (method=="REGISTER") {
            log("Testing-------> nat _ reg \n");
            fix_nated_register();
        } else {
            log("Testing-------> nat_cantact \n");
            fix_nated_contact();
        };
        setflag(5);
    };
}

route[3] {
    log("Testing------->  route 3 \n");
    if (is_method("BYE|CANCEL")) {
        log("Testing------->  Bye\n");
        acc_db_request("Stop","acc");
        unforce_rtp_proxy();
    } else if (is_method("INVITE")){
    log("Testing-------> Invite in route [3\n");
    acc_db_request("Start","acc");
        force_rtp_proxy();
        t_on_failure("1");
    };
    if (isflagset(5))
        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
    t_on_reply("1");
}

failure_route[1] {
    if (isflagset(6) || isflagset(5)) {
        acc_db_request("Stop","acc");
        unforce_rtp_proxy();
    }
}

onreply_route[1] {
    log("Testing------->  t_on_reply\n");
    if ((isflagset(5) || isflagset(6)) && status=~"(183)|(2[0-9][0-9])") {
        force_rtp_proxy();
    }
    search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');

    if (isflagset(6)) {
        fix_nated_contact();
    }
    exit;
}

-- 
Thanks and Regards with cheers
Sunkara Ravi Prakash (Voip Developer)
Hyperion Technology
www.hyperion-tech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20060627/f2d185dd/attachment.htm 


More information about the Users mailing list