Hi Kenny,

actually is a routing problem. the NOTIFY hits the lookup("location") and because there is no username in RURI, "404" is returned.

these requests are only ping from the phone, so your proxy should just reply them. Do something like this: if it's notify for my domain and there is no username, send stateless 200 OK.

regards,
bogdan

Norman Brandinger wrote:

Hi Kenny,

I think that the 404 User Not Found may be related to the "ping_nated_only" parameter you have set.

I've seen this message in my traces as well. Been too busy over here to track this down as a "real problem" or a "non issue" related to pinging a NATed device. It may be specific to Sipura devices.

Regards,
Norm

Kenny Chua wrote:

Hello all, I've registered my SPA 3000 on my openser server. It logs in and everythin works fine. However I was wondering why do I get this 404 Not found when I do ngrep -qt port 5060. What is causing this? And how do I get rid of it?

U 2006/06/28 01:24:52.587457 192.168.1.101:5060 -> 192.168.1.6:5060
NOTIFY sip:192.168.1.6 SIP/2.0..Via: SIP/2.0/UDP 192.168.1.101:5060;branch= z9hG4bK-9291d204..From: Kenny Sipura <sip:[EMAIL PROTECTED]>;tag=6824a583236f 93f1o0..To: <sip:192.168.1.6>..Call-ID: [EMAIL PROTECTED] eq: 413 NOTIFY..Max-Forwards: 70..Event: keep-alive..User-Agent: Linksys/SP
  A3000-3.1.10(GWd)..Content-Length: 0....

U 2006/06/28 01:24:52.598448 192.168.1.6:5060 -> 192.168.1.101:5060
SIP/2.0 404 User Not Found..Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG 4bK-9291d204..From: Kenny Sipura <sip:[EMAIL PROTECTED]>;tag=6824a583236f93f1 o0..To: <sip:192.168.1.6>;tag=eb9822f1ed1b15a932bf98c097b3aaca.d130..Call-I D: [EMAIL PROTECTED]: 413 NOTIFY..Server: OpenSer (1.0. 1 (i386/linux))..Content-Length: 0..Warning: 392 192.168.1.6:5060 "Noisy fe edback tells: pid=4969 req_src_ip=192.168.1.101 req_src_port=5060 in_uri=s
  ip:192.168.1.6 out_uri=sip:192.168.1.6 via_cnt==1"....

**********Openser.cfg**********************************

debug=3
fork=yes
log_stderror=no

listen=192.168.1.6      alias=test.com
port=5060
children=32

dns=no
rev_dns=no
fifo="/tmp/openser_fifo"
fifo_db_url="mysql://openser:[EMAIL PROTECTED]/openser"

loadmodule "/usr/local/lib/openser/modules/mysql.so"
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/usrloc.so"
loadmodule "/usr/local/lib/openser/modules/registrar.so"
loadmodule "/usr/local/lib/openser/modules/auth.so"
loadmodule "/usr/local/lib/openser/modules/auth_db.so"
loadmodule "/usr/local/lib/openser/modules/uri.so"
loadmodule "/usr/local/lib/openser/modules/uri_db.so"
loadmodule "/usr/local/lib/openser/modules/nathelper.so"
loadmodule "/usr/local/lib/openser/modules/avpops.so"
loadmodule "/usr/local/lib/openser/modules/textops.so"
loadmodule "/usr/local/lib/openser/modules/xlog.so"

modparam("auth_db|uri_db|usrloc", "db_url",
    "mysql://openser:[EMAIL PROTECTED]/openser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")

modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "rtpproxy_sock", "/var/run/rtpproxy.sock")

modparam("usrloc", "db_mode", 2)

modparam("registrar", "nat_flag", 6)

modparam("rr", "enable_full_lr", 1)

modparam("tm", "fr_inv_timer", 27)
modparam("tm", "fr_inv_timer_avp", "inv_timeout")

route {

    # -----------------------------------------------------------------
    # Sanity Check Section
    # -----------------------------------------------------------------
    if (!mf_process_maxfwd_header("10")) {
        sl_send_reply("483", "Too Many Hops");
        exit;
    };

    if (msg:len > max_len) {
        sl_send_reply("513", "Message Overflow");
        exit;
    };

    # -----------------------------------------------------------------
    # Record Route Section
    # -----------------------------------------------------------------
    if (method!="REGISTER") {
        record_route();
    };

    if (method=="BYE" || method=="CANCEL") {
        unforce_rtp_proxy();
        t_relay();
        exit;
    }

    # -----------------------------------------------------------------
    # Loose Route Section
    # -----------------------------------------------------------------
    if (loose_route()) {

        if ((method=="INVITE" || method=="REFER") && !has_totag()) {
            xlog("Does not have to tag, FORBIDDEN\n");
            sl_send_reply("403", "Forbidden");
            exit;
        };

        if (method=="INVITE") {

            if (!proxy_authorize("","subscriber")) {
                proxy_challenge("","0");
                exit;
            } else if (!check_from()) {
                sl_send_reply("403", "Use From=ID");
                exit;
            };
            consume_credentials();

            if (nat_uac_test("19")) {
                setflag(6);
                force_rport();
                xlog("Forcing rtpport\n");
                fix_nated_contact();
            };
            force_rtp_proxy("l");
        };
        route(1);
        return;
    };

    # -----------------------------------------------------------------
    # Call Type Processing Section
    # -----------------------------------------------------------------
    if (uri!=myself) {
        route(4);
        route(1);
        return;
    };

    if (method=="ACK") {
        route(1);
        return;
    } else if (method=="CANCEL") {
        route(1);
        return;
    } else if (method=="INVITE") {
        route(3);
        return;
    } else  if (method=="REGISTER") {
        route(2);
        return;
    };

    lookup("aliases");
    if (uri!=myself) {
        route(4);
        route(1);
        return;
    };

    if (!lookup("location")) {
        sl_send_reply("404", "User Not Found");
        return;
    };

    route(1);
}

route[1] {

    # -----------------------------------------------------------------
    # Default Message Handler
    # -----------------------------------------------------------------

    t_on_reply("1");

    if (!t_relay()) {
        if (method=="INVITE" && isflagset(6)) {
            unforce_rtp_proxy();
            xlog("Unforce RTP proxy2\n");
        };
        xlog("Dunno why forbidden\n");
        sl_reply_error();
        xlog("Forbidden4\n");
    };
   }

route[2] {

    # -----------------------------------------------------------------
    # REGISTER Message Handler
    # ----------------------------------------------------------------

    if (!search("^Contact:[ ]*\*") && nat_uac_test("19")) {
        setflag(6);
        fix_nated_register();
        force_rport();
    };

    sl_send_reply("100", "Trying");

    if (!www_authorize("","subscriber")) {
        www_challenge("","0");
        exit;
    };

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

    consume_credentials();

    if (!save("location")) {
        sl_reply_error();
    };
}

route[3] {

    # -----------------------------------------------------------------
    # INVITE Message Handler
    # -----------------------------------------------------------------

    if (!proxy_authorize("","subscriber")) {
        proxy_challenge("","0");
        exit;
    } else if (!check_from()) {
        sl_send_reply("403", "Use From=ID");
        exit;
    };

    consume_credentials();

    if (nat_uac_test("19")) {
        setflag(6);
        xlog("Setflag cos behind NAT\n");
    }
             lookup("aliases");
    if (uri!=myself) {
        route(4);
        route(1);
        return;
    };
       if (uri=~"^sip:00[0-9]*@") {        # International PSTN
        xlog("International PSTN\n");
        strip(2);
        route(4);
        route(5);
        return;
    };
if (!lookup("location")) {
        sl_send_reply("404", "User Not Found");
        return;
    };

    route(4);
    route(1);
}

route[4] {

    # -----------------------------------------------------------------
    # NAT Traversal Section
    # -----------------------------------------------------------------

    if (isflagset(6)) {
        force_rport();
        fix_nated_contact();
        force_rtp_proxy();
        xlog("NAT Traversal Section\n");
    }
}

route[5] {

    # -----------------------------------------------------------------
    # PSTN Handler
    # -----------------------------------------------------------------
    xlog("Routing to PSTN gateway\n");
    rewritehostport("pstn.gateway:5060");
       avp_write("i:45", "inv_timeout");

    route(1);
    xlog("Routed to PSTN gateway\n");
}


onreply_route[1] {

    if (isflagset(6) && status=~"(180)|(183)|2[0-9][0-9]") {
        if (!search("^Content-Length:[ ]*0")) {
            force_rtp_proxy();
        };
    };

    if (nat_uac_test("1")) {
        fix_nated_contact();
    };
}


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

------------------------------------------------------------------------

_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users
------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 6/26/2006



_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to