Bogdan,<br><br>The problem is that I don't know much about SIP server and VoIP. This is experimental project, I studied and successfully ran simple OpenSIPS server. When I try to add Asterisk or NAT Traversal, I ran into many problems. One of them is this (Asterisk config), I traced the log file but not much luck understanding what part needs fixing. <br>
<br>Please help me identify the root of the problem and how to fix. How do i find SIP replies, what do i do to see them and capture them.<br><br><br>Thanks in advance,<br><br>Khan<br><br><div class="gmail_quote">On Sun, Dec 28, 2008 at 4:33 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Khan,<br>
<br>
your OpenSIPS runs ok - what you see are runtime errors, not startup errors.<br>
<br>
The errors you see are indicating processing of SIP reply messages that could not be routed - they were received with only one VIA and they were not matching any local transaction.<br>
<br>
Can you identify the SIP replies triggering this error?<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Khan Friend wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hi guys,<br>
<br>
I am trying to troubleshoot errors in my OpenSIPS config file but unable to understand what am i doing wrong.<br>
<br>
The log file shows as follows:<br>
Dec 26 21:38:02 [22302] INFO:usrloc:ul_init_locks: locks array size 512<br>
Dec 26 21:38:02 [22302] INFO:registrar:mod_init: initializing...<br>
Dec 26 21:38:02 [22302] INFO:textops:mod_init: initializing...<br>
Dec 26 21:38:02 [22302] INFO:avpops:avpops_init: initializing...<br>
Dec 26 21:38:02 [22302] INFO:auth:mod_init: initializing...<br>
Dec 26 21:38:02 [22302] INFO:auth_db:mod_init: initializing...<br>
Dec 26 21:38:02 [22302] INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 214 kb<br>
Dec 26 21:38:56 [22303] ERROR:core:forward_reply: no 2nd via found in reply<br>
Dec 26 21:38:57 [22308] ERROR:core:forward_reply: no 2nd via found in reply<br>
Dec 26 21:38:58 [22306] ERROR:core:forward_reply: no 2nd via found in reply<br>
Dec 26 21:38:59 [22304] ERROR:core:forward_reply: no 2nd via found in reply<br>
Dec 26 21:39:00 [22303] ERROR:core:forward_reply: no 2nd via found in reply<br>
Dec 26 21:39:10 [22308] ERROR:core:forward_reply: no 2nd via found in reply<br>
Dec 26 21:39:11 [22306] ERROR:core:forward_reply: no 2nd via found in reply<br>
D<br>
<br>
-- <br>
<br>
<br>
My opensips.cfg is as follows:<br>
<br>
route{<br>
<br>
    # initial sanity checks -- messages with<br>
    # max_forwards==0, or excessively long requests<br>
<br>
    if (!mf_process_maxfwd_header("10")) {<br>
        sl_send_reply("483","Too Many Hops");<br>
        exit;<br>
    };<br>
<br>
    if (msg:len >=  2048 ) {<br>
        sl_send_reply("513", "Message too big");<br>
        exit;<br>
    };<br>
<br>
    # we record-route all messages -- to make sure that<br>
    # subsequent messages will go through our proxy; that's<br>
    # particularly good if upstream and downstream entities<br>
    # use different transport protocol<br>
<br>
    if (!method=="REGISTER")<br>
        record_route();<br>
<br>
    # subsequent messages withing a dialog should take the<br>
    # path determined by record-routing<br>
<br>
    if (loose_route()) {<br>
        # mark routing logic in request<br>
        append_hf("P-hint: rr-enforced\r\n");<br>
        route(1);<br>
    };<br>
<br>
    if (!uri==myself) {<br>
        # mark routing logic in request<br>
        append_hf("P-hint: outbound\r\n");<br>
        route(1);<br>
    };<br>
<br>
    # if the request is for other domain use UsrLoc<br>
    # (in case, it does not work, use the following command<br>
    # with proper names and addresses in it)<br>
    if (uri==myself) {<br>
<br>
        if (method=="REGISTER") {<br>
            if (!www_authorize("", "subscriber")) {<br>
                www_challenge("", "0");<br>
                exit;<br>
            };<br>
<br>
            save("location");<br>
            exit;<br>
        };<br>
<br>
        # requests for Media server<br>
        if(is_method("INVITE") && !has_totag() && uri=~"sip:\*9") {<br>
            route(3);<br>
            exit;<br>
        }<br>
<br>
        # mark transaction if user is in voicemail group<br>
        if(is_method("INVITE") && !has_totag()<br>
            && is_user_in("Request-URI","voicemail"))<br>
        {<br>
            xdbg("user [$ru] has voicemail redirection enabled\n");<br>
            # backup R-URI<br>
            avp_pushto("$ru","$avp(i:10)");<br>
            #avp_write("$ruri","$avp(i:10)");<br>
            setflag(2);<br>
        };<br>
        # native SIP destinations are handled using our USRLOC DB<br>
        if (!lookup("location")) {<br>
            if(isflagset(2)) {<br>
                # route to Asterisk Media Server<br>
                prefix("1");<br></div></div>
                rewritehostport("<a href="http://192.168.1.11:5060" target="_blank">192.168.1.11:5060</a> <<a href="http://192.168.1.11:5060" target="_blank">http://192.168.1.11:5060</a>>");<div><div></div>
<div class="Wj3C7c"><br>
                route(1);<br>
            } else {<br>
                sl_send_reply("404", "Not Found");<br>
                exit;<br>
            }<br>
        };<br>
        append_hf("P-hint: usrloc applied\r\n");<br>
    };<br>
<br>
    route(1);<br>
}<br>
<br>
<br>
route[1] {<br>
       if(isflagset(2))<br>
        t_on_failure("1");<br>
<br>
    if (!t_relay()) {<br>
        sl_reply_error();<br>
    };<br>
    exit;<br>
}<br>
<br>
<br>
# voicemail access<br>
# - *98 - listen caller's voice messages, being prompted for pin<br>
# - *981 - listen voice messages, being promted for mailbox and pin<br>
# - *98XXXX - leave voice message to XXXX<br>
#<br>
route[3] {<br>
      # direct voicemail<br>
    if (uri =~ "sip:\*98@" ) {<br>
            rewriteuser("1");<br>
        xdbg("voicemail access\n");<br>
    } else if (uri =~ "sip:\*981@" ) {<br>
         strip(4);<br>
        rewriteuser("11");<br>
    } else if (uri =~ "sip:\*98.+@" ) {<br>
         strip(3);<br>
        prefix("1");<br>
    } else {<br>
        xlog("unknown media extension $rU\n");<br>
        sl_send_reply("404", "Unknown media service");<br>
        exit;<br>
    }<br>
<br>
    # route to Asterisk Media Server<br></div></div>
    rewritehostport("<a href="http://192.168.1.11:5060" target="_blank">192.168.1.11:5060</a> <<a href="http://192.168.1.11:5060" target="_blank">http://192.168.1.11:5060</a>>");<div class="Ih2E3d"><br>
    route(1);<br>
}<br>
<br>
failure_route[1] {<br>
    if (t_was_cancelled()) {<br>
        xdbg("transaction was cancelled by UAC\n");<br>
        return;<br>
    }<br>
    # restore initial uri<br>
    avp_pushto("$ru","$avp(i:10)");<br>
    #avp_pushto("$ru", "i:10");<br>
    prefix("1");<br>
    # route to Asterisk Media Server<br></div>
    rewritehostport("<a href="http://192.168.1.11:5060" target="_blank">192.168.1.11:5060</a> <<a href="http://192.168.1.11:5060" target="_blank">http://192.168.1.11:5060</a>>");<div class="Ih2E3d"><br>
    resetflag(2);<br>
    route(1);<br>
}<br>
<br>
<br>
Thank you,<br>
<br>
<br>
Khan<br>
<br></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
  <br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Thank you,<br><br><br>Mr. Khan<br>Director Technical Resources, Research, and Deployment.<br>