<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: ËÎÌå; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span><span style="background-color: rgba(0, 0, 0, 0);">Hello,all:</span></div><div><span style="background-color: rgba(0, 0, 0, 0);">I am trying to use asterisk and opensips and follow the link:</span></div><div><span style="background-color: rgba(0, 0, 0, 0);"></span><a href="http://www.opensips.org/Documentation/Tutorials-OpenSIPSAsteriskIntegration-1-8." style="font-size: 10.5pt; line-height: 1.5; background-color: window;">http://www.opensips.org/Documentation/Tutorials-OpenSIPSAsteriskIntegration-1-8.</a><span style="font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);">&nbsp;</span></div><div>when i register my sip phone, I got the 408 timeout and P-hint:outbound from&nbsp;</div><div><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">ngrep -d lo -qt -W byline port 5060. when i use the example CFG to startup the opensips, i got many errors due to&nbsp;</span></div><div><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">the module compatebility. so i change some modules for opensips-1.8, therefore I suspect the modules i loaded is wrong.&nbsp;</span></div><div><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">--------------------------------------------CFG---------------------------------</span></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=5<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># port = 5060<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><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;"><br></span></div><div><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">============================</span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">ngrep debug===================================================</span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">=====&nbsp;</span></div><span style="background-color: rgba(0, 0, 0, 0);"></span><div><span style="background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="background-color: rgba(0, 0, 0, 0);">Via: SIP/2.0/UDP 192.168.1.200:16377;received=192.168.1.200;branch=z9hG4bK-d87543-e92fd965fb6c5113-1--d87543-;rport=16377.
<br>Max-Forwards: 29.
<br>Contact: &lt;sip:101@192.168.1.200:16377;rinstance=624d83088d4ed92e&gt;.
<br>To: "101"&lt;sip:101@192.168.1.104&gt;.
<br>From: "101"&lt;sip:101@192.168.1.104&gt;;tag=de6d7016.
<br>Call-ID: ODMyNTg1MmU2YTQzN2Q5MzAyNDJiYjY2Njk3NWE0MWI..
<br>CSeq: 2 REGISTER.
<br>Expires: 3600.
<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
<br>User-Agent: X-Lite release 1011s stamp 41150.
<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>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>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>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>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>P-hint: outbound.
<br>.
<br>
<br>
<br>U 2014/05/27 15:20:54.894213 192.168.1.104:5060 -&gt; 192.168.1.104:5060
<br>REGISTER sip:192.168.1.104 SIP/2.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.a2d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.92d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.82d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.72d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.62d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.52d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.42d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.32d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.22d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.12d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.02d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.f1d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.e1d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.d1d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.c1d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.b1d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.a1d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.91d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.81d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.71d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.61d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.51d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.41d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.31d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.21d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.11d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.01d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.f0d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.e0d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.d0d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.c0d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.b0d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.a0d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.90d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.80d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.70d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.60d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.50d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.40d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.30d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.20d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.10d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.00d88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.ffc88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.efc88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.dfc88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.cfc88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.104;branch=z9hG4bK6ed.bfc88ec4.0.
<br>Via: SIP/2.0/UDP 192.168.1.103:5060;received=192.168.1.103;branch=z9hG4bK112230595;rport=5060.
<br>From: &lt;sip:bob@192.168.1.104&gt;;tag=1244885899.
<br>To: &lt;sip:bob@192.168.1.104&gt;.
<br>Call-ID: 1761427266-5060-1@BJC.BGI.B.BAD.
<br>CSeq: 2045 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: 22.
<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><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>
</body></html>