<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20140523225351671216 { }body { font-size: 10.5pt; font-family: 宋体; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>hello: all of users:</div><div>from opensips debug info, there are few bugs with no totag:</div><div><span style="background-color: rgba(0, 0, 0, 0);">:47:17 [2915] DBG:core:parse_via_param: found param type 232, &lt;branch&gt; = &lt;z9hG4bK-d87543-e049e36a4d0d0d08-1--d87543-&gt;; state=6
<br>May 23 22:47:17 [2915] DBG:core:parse_via_param: found param type 235, &lt;rport&gt; = &lt;7147&gt;; state=16
<br>May 23 22:47:17 [2915] DBG:core:parse_via: end of header reached, state=5
<br>May 23 22:47:17 [2915] DBG:core:parse_headers: via found, flags=100
<br>May 23 22:47:17 [2915] DBG:maxfwd:is_maxfwd_present: value = 17
<br>May 23 22:47:17 [2915] DBG:core:parse_headers: flags=8
<br>May 23 22:47:17 [2915] DBG:core:parse_to: end of header reached, state=10
<br>May 23 22:47:17 [2915] DBG:core:parse_to: display={"alice"}, ruri={sip:alice@192.168.1.104}
<br>May 23 22:47:17 [2915] DBG:core:get_hdr_field: &lt;To&gt; [34]; uri=[sip:alice@192.168.1.104]
<br>May 23 22:47:17 [2915] DBG:core:get_hdr_field: to body ["alice"&lt;sip:alice@192.168.1.104&gt;
<br>]
<br>May 23 22:47:17 [2915] DBG:uri:has_<font color="#ff0000">totag: no totag
</font><br>May 23 22:47:17 [2915] DBG:core:parse_headers: flags=78
<br>May 23 22:47:17 [2915] DBG:core:get_hdr_field: cseq &lt;CSeq&gt;: &lt;1&gt; &lt;REGISTER&gt;
<br>May 23 22:47:17 [2915] DBG:tm:t_lookup_request: start searching: hash=39923, isACK=0
<br>May 23 22:47:17 [2915] DBG:tm:matching_3261: RFC3261 transaction matched, tid=3fb9.febcd94.0
<br>May 23 22:47:17 [2915] DBG:tm:t_lookup_request: REF_UNSAFE:[0xb50e3a50] after is 1
<br>May 23 22:47:17 [2915] DBG:tm:t_lookup_request: transaction found (T=0xb50e3a50)
<br>May 23 22:47:17 [2915] DBG:tm:t_retransmit_reply: nothing to retransmit
<br>May 23 22:47:17 [2915] DBG:tm:t_check_trans: UNREF_UNSAFE: [0xb50e3a50] after is 0
<br>May 23 22:47:17 [2915] DBG:core:destroy_avp_list: destroying list (nil)
<br>May 23 22:47:17 [2915] DBG:core:receive_msg: cleaning up&nbsp;<br></span></div><div>---------------my cfg-opensips-1.8.2 ---------------------------</div><div><span style="background-color: rgba(0, 0, 0, 0);">#<br># $Id: opensips.cfg 8758 2012-02-29 11:59:26Z vladut-paiu $<br>#<br># OpenSIPS residential configuration script<br>#     by OpenSIPS Solutions &lt;team@opensips-solutions.com&gt;<br>#<br># This script was generated via "make menuconfig", from<br>#   the "Residential" scenario.<br># You can enable / disable more features / functionalities by<br>#   re-generating the scenario with different options.#<br>#<br># Please refer to the Core CookBook at:<br>#      http://www.opensips.org/Resources/DocsCookbooks<br># for a explanation of possible statements, functions and parameters.<br>#<br><br><br>####### Global Parameters #########<br><br>debug=3<br>log_stderror=yes<br>log_facility=LOG_LOCAL0<br><br>fork=yes<br>children=4<br><br>/* uncomment the following lines to enable debugging */<br>#debug=6<br>#fork=no<br>#log_stderror=yes<br><br>/* uncomment the next line to enable the auto temporary blacklisting of <br>   not available destinations (default disabled) */<br>disable_dns_blacklist=yes<br><br>/* uncomment the next line to enable IPv6 lookup after IPv4 dns <br>   lookup failures (default disabled) */<br>#dns_try_ipv6=yes<br><br>/* comment the next line to enable the auto discovery of local aliases<br>   based on revers DNS on IPs */<br>auto_aliases=yes<br>alias=test.com<br><br>listen=udp:192.168.1.104:5060   # CUSTOMIZE ME<br><br><br>disable_tcp=yes<br><br># disable_tls=yes<br><br><br>####### Modules Section ########<br><br>#set module path<br>mpath="/usr/local/lib/opensips/modules/"<br><br>loadmodule "db_mysql.so"<br>loadmodule "signaling.so"<br>loadmodule "sl.so"<br>loadmodule "tm.so"<br>loadmodule "rr.so"<br>loadmodule "maxfwd.so"<br>loadmodule "usrloc.so"<br>loadmodule "registrar.so"<br>loadmodule "textops.so"<br>loadmodule "mi_fifo.so"<br>#loadmodule "uri_db.so"<br>loadmodule "uri.so"<br>#loadmodule "xlog.so"<br>loadmodule "acc.so"<br>loadmodule "auth.so"<br>loadmodule "auth_db.so"<br>loadmodule "sipmsgops.so"<br>loadmodule "domain.so"<br><br><br><br># ----------------- setting module-specific parameters ---------------<br><br><br># ----- mi_fifo params -----<br>modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<br><br># ----- rr params -----<br># add value to ;lr param to cope with most of the UAs<br>modparam("rr", "enable_double_rr", 1)<br># do not append from tag to the RR (no need for this script)<br>modparam("rr", "append_fromtag", 0)<br><br># ----- usrloc params -----<br>modparam("usrloc", "db_mode",   2)<br>modparam("usrloc", "db_url",<br>        "mysql://opensips:opensipsrw@localhost/opensips")<br><br># ----- uri_db params -----<br>#modparam("uri_db", "use_uri_table", 0)<br>#modparam("uri_db", "db_url", "")<br><br># ----- acc params -----<br>/* what sepcial events should be accounted ? */<br>modparam("acc", "early_media", 1)<br>#modparam("acc", "report_ack", 1)<br>modparam("acc", "report_cancels", 1)<br>/* account triggers (flags) */<br>modparam("acc", "failed_transaction_flag", 3)<br>modparam("acc", "log_flag", 1)<br>modparam("acc", "log_missed_flag", 2)<br>/* uncomment the following lines to enable DB accounting also */<br>modparam("acc", "db_flag", 1)<br>modparam("acc", "db_missed_flag", 2)<br><br># ----- auth_db params -----<br>modparam("auth_db", "calculate_ha1", yes)<br>modparam("auth_db", "password_column", "password")<br>modparam("auth_db", "db_url",<br>        "mysql://opensips:opensipsrw@localhost/opensips")<br>modparam("auth_db", "load_credentials", "")<br><br># ----- domain params -----<br>modparam("domain", "db_url",<br>        "mysql://opensips:opensipsrw@localhost/opensips")<br>modparam("domain", "db_mode", 1)   # Use caching<br><br># ----- multi-module params -----<br>/* uncomment the following line if you want to enable multi-domain support<br>   in the modules (dafault off) */<br>modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)<br><br><br>####### Routing Logic ########<br><br><br># main request routing logic<br><br>route{<br><br>        if (!mf_process_maxfwd_header("10")) {<br>                send_reply("483","Too Many Hops");<br>                exit;<br>        }<br><br>        if (has_totag()) {<br>                # sequential request withing a dialog should<br>                # take the path determined by record-routing<br>                if (loose_route()) {<br>                        if (is_method("BYE")) {<br>                                setflag(1); # do accounting ...<br>                                setflag(3); # ... even if the transaction fails<br>                        } else if (is_method("INVITE")) {<br>                                # even if in most of the cases is useless, do RR for<br>                                # re-INVITEs alos, as some buggy clients do change route set<br>                                # during the dialog.<br>                                record_route();<br>                        }<br>                        # route it out to whatever destination was set by loose_route()<br>                        # in $du (destination URI).<br>                        route(1);<br>                } else {<br>                        if ( is_method("ACK") ) {<br>                                if ( t_check_trans() ) {<br>                                        # non loose-route, but stateful ACK; must be an ACK after <br>                                        # a 487 or e.g. 404 from upstream server<br>                                        t_relay();<br>                                        exit;<br>                                } else {<br>                                        # ACK without matching transaction -&gt;<br>                                        # ignore and discard<br>                                        exit;<br>                                }<br>                        }<br>                        send_reply("404","Not here");<br>                }<br>                exit;<br>        }<br><br>        #initial requests<br><br>        # CANCEL processing<br>        if (is_method("CANCEL")) {<br>                if (t_check_trans())<br>                        t_relay();<br>                exit;<br>        }<br><br>        t_check_trans();<br><br>        # authenticate if from local subscriber<br>        if (!(method=="REGISTER") &amp;&amp; is_from_local()) {<br>                if (!proxy_authorize("", "subscriber")) {<br>                        proxy_challenge("", "0");<br>                        exit;<br>                }<br>                if (!db_check_from()) {<br>                        send_reply("403","Forbidden auth ID");<br>                        exit;<br>                }<br><br>                consume_credentials();<br>                # caller authenticated<br>        }<br><br>        # preloaded route checking<br>        if (loose_route()) {<br>                xlog("L_ERR",<br>                "Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]");<br>                if (!is_method("ACK"))<br>                        send_reply("403","Preload Route denied");<br>                exit;<br>        }<br><br>        # record routing<br>        if (!is_method("REGISTER|MESSAGE"))<br>                record_route();<br><br>        # account only INVITEs<br>        if (is_method("INVITE")) {<br>                setflag(1); # do accounting<br>        }<br><br>        # if not a targetting a local SIP domain, just send it out<br>        # based on DNS (calls to foreign SIP domains)<br>        if (!is_uri_host_local()) {<br>                append_hf("P-hint: outbound\r\n"); <br>                route(1);<br>        }<br><br>        # requests for my domain<br><br>        if (is_method("REGISTER")) {<br>                # authenticate the REGISTER requests<br>                if (!www_authorize("", "subscriber")) {<br>                        www_challenge("", "0");<br>                        exit;<br>                }<br>                if (!db_check_to()) {<br>                        send_reply("403","Forbidden auth ID");<br>                        exit;<br>                }<br><br>                if (!save("location"))<br>                        sl_reply_error();<br><br>                exit;<br>        }<br><br>        if ($rU==NULL) {<br>                # request with no Username in RURI<br>                send_reply("484","Address Incomplete");<br>                exit;<br>        }<br><br>        # ASTERISK HOOK - BEGIN<br>        # media service number? (digits starting with *)<br>        if ($rU=~"^\*[1-9]+") {<br>                # we do provide access to media services only to our<br>                # subscribers, who were previously authenticated <br>                if (!is_from_local()) {<br>                        send_reply("403","Forbidden access to media service");<br>                        exit;<br>                }<br>                #identify the services and translate to Asterisk extensions<br>                if ($rU=="*1111") {<br>                        # access to own voicemail IVR<br>                        seturi("sip:VM_pickup@192.168.1.104:5090");<br>                } else<br>                if ($rU=="*2111") {<br>                        # access to the "say time" announcement <br>                        seturi("sip:AN_time@192.168.1.104:5090");<br>                } else<br>                if ($rU=="*2112") {<br>                        # access to the "say date" announcement <br>                        seturi("sip:AN_date@192.168.1.104:5090");<br>                } else<br>                if ($rU=="*2113") {<br>                        # access to the "echo" service<br>                        seturi("sip:AN_echo@192.168.1.104:5090");<br>                } else<br>                if ($rU=~"\*3[0-9]{3}") {<br>                        # access to the conference service <br>                        # remove the "*3" prefix and place the "CR_" prefix<br>                        strip(2);<br>                        prefix("CR_");<br>                        rewritehostport("192.168.1.104:5090");<br>                } else {<br>                        # unknown service<br>                        seturi("sip:AN_notavailable@192.168.1.104:5090");<br>                }<br>                # after setting the proper RURI (to point to corresponding ASTERISK extension),<br>                # simply forward the call<br>                t_relay();<br>                exit;<br>        }<br>        # ASTERISK HOOK - END<br><br>        # do lookup<br>        if (!lookup("location")) {<br>                # ASTERISK HOOK - BEGIN<br>                # callee is not registered, so different to Voicemail<br>                # First add the VM recording prefix to the RURI<br>                prefix("VMR_");<br>                # forward to the call to Asterisk (replace below with real IP and port)<br>                 rewritehostport("192.168.1.104:5090");<br>                route(1);<br>                # ASTERISK HOOK - END<br>                exit;<br>        }<br><br>        # when routing via usrloc, log the missed calls also<br>        setflag(2);<br><br>        # arm a failure route in order to catch failed calls<br>        # targeting local subscribers; if we fail to deliver<br>        # the call to the user, we send the call to voicemail<br>        t_on_failure("1");<br><br>        route(1);<br>}<br><br><br>route[1] {<br>        if (!t_relay()) {<br>                sl_reply_error();<br>        };<br>        exit;<br>}<br><br><br>failure_route[1] {<br>        if (t_was_cancelled()) {<br>                exit;<br>        }<br><br>        # if the failure code is "408 - timeout" or "486 - busy",<br>        # forward the calls to voicemail recording<br>        if (t_check_status("486|408")) {<br>                # ASTERISK HOOK - BEGIN<br>                # First revert the RURI to get the original user in RURI<br>                # Then add the VM recording prefix to the RURI<br>                revert_uri();<br>                prefix("VMR_");<br>                # forward to the call to Asterisk (replace below with real IP and port)<br>                 rewritehostport("192.168.1.104:5090");<br>                t_relay();<br>                # ASTERISK HOOK - END<br>                exit;<br>        }<br>}<br><br></span></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><font face="隶书"><b>Cheers!</b></font></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div>&nbsp;</div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>发件人:</b>&nbsp;<a href="mailto:toasterisk@gmail.com">toasterisk@gmail.com</a></div><div><b>发送时间:</b>&nbsp;2014-05-23&nbsp;22:23</div><div><b>收件人:</b>&nbsp;<a href="mailto:users@lists.opensips.org">opensips</a></div><div><b>主题:</b>&nbsp;why 483 too many Hops</div></div></div><div><div class="FoxDiv20140523225351671216">
<div><span></span>hello:</div><div>I install opensips-1.8.2 and asterisk together at my vmware. but when I register the SIP phone or physical</div><div>Phone, the clients always show 483 too many Hops. I disable the fireware and use:</div><div>&nbsp;<span style="background-color: rgb(251, 250, 249); color: rgb(51, 51, 51); font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Bitstream Vera Sans Mono', 'Nimbus Mono L', Monaco, 'Courier New', monospace; line-height: 19.600000381469727px; font-size: 10.5pt;">ngrep -d lo -qt -W byline port 5060, the debug info is this:</span></div>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.4fd0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.3fd0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.2fd0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.1fd0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.0fd0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.fed0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.eed0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.ded0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.ced0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.bed0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.aed0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.9ed0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.8ed0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.7ed0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.6ed0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bKda41.5ed0d422.0.
<br>Via: SIP/2.0/UDP 192.168.1.103:5060;received=192.168.1.103;branch=z9hG4bK176606475;rport=5060.
<br>From: &lt;sip:bob@192.168.1.104&gt;;tag=1356181947.
<br>To: &lt;sip:bob@192.168.1.104&gt;.
<br>Call-ID: 2124473842-5060-1@BJC.BGI.B.BAD.
<br>CSeq: 2029 REGISTER.
<br>Contact: &lt;sip:bob@192.168.1.103:5060&gt;;reg-id=1;+sip.instance="&lt;urn:uuid:00000000-0000-1000-8000-000B824017A0&gt;".
<br>X-Grandstream-PBX: true.
<br>Max-Forwards: 26.
<br>User-Agent: Grandstream GXP2124 1.0.4.10.
<br>Supported: path.
<br>Expires: 480.
<br>Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE.
<br>Content-Length: 0.
<br>P-hint: outbound.
<br>P-hint: outbound.
<br>P-hint: outbound.
<br>P-hint: outbound.
<br>P-hint: outbound.
<br>P-hint: outbound.
<br>P-hint: outbound.
<br>P-hint: outbound.
<br>=================================================================<div>anyone knows this problem?&nbsp;<br><div><span style="background-color: window; font-size: 10.5pt; line-height: 1.5;">&nbsp;</span></div>
<div><br></div><hr style="WIDTH: 210px; HEIGHT: 1px" color="#b5c4df" size="1" align="left">
<div><span><font face="隶书"><b>Cheers!</b></font></span></div>
</div></div></div></blockquote>
</body></html>