<div dir="ltr"><div>Local route is invoked by opensips when a REQUEST is generated by TM module internally, NOT the replies. See its description for details,<br><br><a href="http://www.opensips.org/Documentation/Script-Routes-1-9#toc6">http://www.opensips.org/Documentation/Script-Routes-1-9#toc6</a><br>

<br></div>Thank you.<br><br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 24, 2013 at 11:42 PM, Jason Caulfield <span dir="ltr">&lt;<a href="mailto:opensips@jcpd.biz" target="_blank">opensips@jcpd.biz</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Users,<br><br>I am just getting started with opensips.  (version 1.7 from CentOS 6 epel repo)<br><br>Can you please help me understand why in my code (see below) local_route is not invoked.<br>

<br>I would expect that local_route would be invoked when a &quot;100 Trying&quot; is issued, but it is not.<br>

<br>Below is the config, log out, and network output.<br><br>I am testing it with sipp.<br><br><br>Config:<br><br>####### Global Parameters #########<br>debug=0<br>log_stderror=no<br>log_facility=LOG_LOCAL0<br>fork=yes<br>



children=12<br>log_name=&quot;TEST&quot;<br>disable_tcp=yes<br>port=5060<br>###################################<br><br>####### Modules Section ###########<br>mpath=&quot;/usr/lib/opensips/modules&quot;<br><br>loadmodule &quot;tm.so&quot;<br>



loadmodule &quot;textops.so&quot;<br>loadmodule &quot;exec.so&quot;<br><br>modparam(&quot;tm&quot; , &quot;onreply_avp_mode&quot;, 1)<br>modparam(&quot;tm&quot; , &quot;fr_timer&quot;, 2)  # Vendor timeout<br>modparam(&quot;tm&quot; , &quot;fr_inv_timer&quot;, 2)<br>



modparam(&quot;tm&quot; , &quot;enable_stats&quot;, 0)<br>modparam(&quot;tm&quot; , &quot;via1_matching&quot;, 0)<br>modparam(&quot;tm&quot; , &quot;T1_timer&quot;, 500)  # Retransmit interval<br>modparam(&quot;tm&quot; , &quot;T2_timer&quot;, 1000)  # Retransmit total duration<br>



###################################<br><br>####### Routing Logic #############<br>route {<br>        xlog(&quot;ROUTE&quot;);<br>        seturi(&quot;<a href="http://sip:5555555555@10.0.1.27:9003" target="_blank">sip:5555555555@10.0.1.27:9003</a>&quot;);<br>



        t_relay();<br>}<br><br>onreply_route {<br>        xlog(&quot;ONREPLY&quot;);<br>}<br>error_route {<br>        xlog(&quot;ERROR&quot;);<br>}<br><br>local_route {<br>        xlog(&quot;LOCAL&quot;);<br>}<br>###################################<br>



<br><br>Log:<br><br>Jul 25 05:34:32 rmps-b TEST[12856]: ROUTE<br>Jul 25 05:34:32 rmps-b TEST[12855]: ONREPLY<br>Jul 25 05:34:32 rmps-b TEST[12857]: ONREPLY<br>Jul 25 05:34:32 rmps-b TEST[12858]: ROUTE<br>Jul 25 05:34:42 rmps-b TEST[12860]: ROUTE<br>



Jul 25 05:34:42 rmps-b TEST[12861]: ONREPLY<br><br><br>Network:<br><br>#<br>U <a href="http://10.0.1.27:5060" target="_blank">10.0.1.27:5060</a> -&gt; <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a><br>

INVITE <a href="http://sip:5555555555@10.0.1.147:5060" target="_blank">sip:5555555555@10.0.1.147:5060</a> SIP/2.0.<br>

Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0.<br>From: sipp &lt;<a href="http://sip:9123456789@10.0.1.27:5060" target="_blank">sip:9123456789@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>To: sut &lt;<a href="http://18574921119@10.0.1.147:5060" target="_blank">18574921119@10.0.1.147:5060</a>&gt;.<br>



Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060" target="_blank">sip:sipp@10.0.1.27:5060</a>.<br>Max-Forwards: 70.<br>

Subject: Performance Test.<br>

Content-Type: application/sdp.<br>Content-Length:   129.<br>.<br>v=0.<br>o=user1 53655765 2353687637 IN IP4 10.0.1.27.<br>s=-.<br>c=IN IP4 10.0.1.27.<br>t=0 0.<br>m=audio 6000 RTP/AVP 0.<br>a=rtpmap:0 PCMU/8000.<br><br>#<br>



U <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a> -&gt; <a href="http://10.0.1.27:5060" target="_blank">10.0.1.27:5060</a><br>SIP/2.0 100 Giving a try.<br>Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0.<br>

From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>

To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Server: OpenSIPS (1.7.2-tls (i386/linux)).<br>



Content-Length: 0.<br>.<br><br>#<br>U <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a> -&gt; <a href="http://10.0.1.27:9003" target="_blank">10.0.1.27:9003</a><br>INVITE <a href="http://sip:5555555555@10.0.1.27:9003" target="_blank">sip:5555555555@10.0.1.27:9003</a> SIP/2.0.<br>



Via: SIP/2.0/UDP 10.0.1.147;branch=z9hG4bK580f.8ddd3891.0.<br>Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0.<br>From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>



To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060" target="_blank">sip:sipp@10.0.1.27:5060</a>.<br>



Max-Forwards: 70.<br>Subject: Performance Test.<br>Content-Type: application/sdp.<br>Content-Length:   129.<br>.<br>v=0.<br>o=user1 53655765 2353687637 IN IP4 10.0.1.27.<br>s=-.<br>c=IN IP4 10.0.1.27.<br>t=0 0.<br>m=audio 6000 RTP/AVP 0.<br>



a=rtpmap:0 PCMU/8000.<br><br>#<br>U <a href="http://10.0.1.27:9003" target="_blank">10.0.1.27:9003</a> -&gt; <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a><br>SIP/2.0 180 Ringing.<br>Via: SIP/2.0/UDP 10.0.1.147;branch=z9hG4bK580f.8ddd3891.0, SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0.<br>



From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;;tag=10195SIPpTag014.<br>



Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: &lt;sip:10.0.1.27:9003;transport=UDP&gt;.<br>Content-Length: 0.<br>.<br><br>#<br>U <a href="http://10.0.1.27:9003" target="_blank">10.0.1.27:9003</a> -&gt; <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a><br>



SIP/2.0 200 OK.<br>Via: SIP/2.0/UDP 10.0.1.147;branch=z9hG4bK580f.8ddd3891.0, SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0.<br>From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>



To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;;tag=10195SIPpTag014.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>

Contact: &lt;sip:10.0.1.27:9003;transport=UDP&gt;.<br>

Content-Type: application/sdp.<br>Content-Length:   129.<br>.<br>v=0.<br>o=user1 53655765 2353687637 IN IP4 10.0.1.27.<br>s=-.<br>c=IN IP4 10.0.1.27.<br>t=0 0.<br>m=audio 6001 RTP/AVP 0.<br>a=rtpmap:0 PCMU/8000.<br><br>#<br>



U <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a> -&gt; <a href="http://10.0.1.27:5060" target="_blank">10.0.1.27:5060</a><br>SIP/2.0 180 Ringing.<br>Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0.<br>

From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>

To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;;tag=10195SIPpTag014.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>

Contact: &lt;sip:10.0.1.27:9003;transport=UDP&gt;.<br>

Content-Length: 0.<br>.<br><br>#<br>U <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a> -&gt; <a href="http://10.0.1.27:5060" target="_blank">10.0.1.27:5060</a><br>SIP/2.0 200 OK.<br>Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0.<br>



From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;;tag=10195SIPpTag014.<br>



Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: &lt;sip:10.0.1.27:9003;transport=UDP&gt;.<br>Content-Type: application/sdp.<br>Content-Length:   129.<br>.<br>

v=0.<br>o=user1 53655765 2353687637 IN IP4 10.0.1.27.<br>

s=-.<br>c=IN IP4 10.0.1.27.<br>t=0 0.<br>m=audio 6001 RTP/AVP 0.<br>a=rtpmap:0 PCMU/8000.<br><br>#<br>U <a href="http://10.0.1.27:5060" target="_blank">10.0.1.27:5060</a> -&gt; <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a><br>

ACK <a href="http://sip:5555555555@10.0.1.147:5060" target="_blank">sip:5555555555@10.0.1.147:5060</a> SIP/2.0.<br>

Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-5.<br>From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;.<br>



Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 1 ACK.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060" target="_blank">sip:sipp@10.0.1.27:5060</a>.<br>Max-Forwards: 70.<br>

Subject: Performance Test.<br>Content-Length: 0.<br>

.<br><br>#<br>U <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a> -&gt; <a href="http://10.0.1.27:9003" target="_blank">10.0.1.27:9003</a><br>ACK <a href="http://sip:5555555555@10.0.1.27:9003" target="_blank">sip:5555555555@10.0.1.27:9003</a> SIP/2.0.<br>



Via: SIP/2.0/UDP 10.0.1.147;branch=z9hG4bK580f.8ddd3891.2.<br>Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-5.<br>From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>



To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 1 ACK.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060" target="_blank">sip:sipp@10.0.1.27:5060</a>.<br>



Max-Forwards: 70.<br>Subject: Performance Test.<br>Content-Length: 0.<br>.<br><br>#<br>U <a href="http://10.0.1.27:5060" target="_blank">10.0.1.27:5060</a> -&gt; <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a><br>

BYE <a href="http://sip:5555555555@10.0.1.147:5060" target="_blank">sip:5555555555@10.0.1.147:5060</a> SIP/2.0.<br>

Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-7.<br>From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;.<br>



Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 2 BYE.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060" target="_blank">sip:sipp@10.0.1.27:5060</a>.<br>Max-Forwards: 70.<br>

Subject: Performance Test.<br>Content-Length: 0.<br>

.<br><br>#<br>U <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a> -&gt; <a href="http://10.0.1.27:9003" target="_blank">10.0.1.27:9003</a><br>BYE <a href="http://sip:5555555555@10.0.1.27:9003" target="_blank">sip:5555555555@10.0.1.27:9003</a> SIP/2.0.<br>



Via: SIP/2.0/UDP 10.0.1.147;branch=z9hG4bK280f.81db1714.0.<br>Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-7.<br>From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>



To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 2 BYE.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060" target="_blank">sip:sipp@10.0.1.27:5060</a>.<br>



Max-Forwards: 70.<br>Subject: Performance Test.<br>Content-Length: 0.<br>.<br><br>#<br>U <a href="http://10.0.1.27:9003" target="_blank">10.0.1.27:9003</a> -&gt; <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a><br>

SIP/2.0 200 OK.<br>

Via: SIP/2.0/UDP 10.0.1.147;branch=z9hG4bK280f.81db1714.0, SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-7.<br>From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>



To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>CSeq: 2 BYE.<br>Contact: &lt;sip:10.0.1.27:9003;transport=UDP&gt;.<br>



Content-Length: 0.<br>.<br><br>#<br>U <a href="http://10.0.1.147:5060" target="_blank">10.0.1.147:5060</a> -&gt; <a href="http://10.0.1.27:5060" target="_blank">10.0.1.27:5060</a><br>SIP/2.0 200 OK.<br>Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-7.<br>



From: sipp &lt;<a href="http://sip:5555555555@10.0.1.27:5060" target="_blank">sip:5555555555@10.0.1.27:5060</a>&gt;;tag=10199SIPpTag004.<br>To: sut &lt;<a href="http://5555555555@10.0.1.147:5060" target="_blank">5555555555@10.0.1.147:5060</a>&gt;.<br>

Call-ID: <a href="mailto:4-10199@10.0.1.27" target="_blank">4-10199@10.0.1.27</a>.<br>

CSeq: 2 BYE.<br>Contact: &lt;sip:10.0.1.27:9003;transport=UDP&gt;.<br>Content-Length: 0.<br><br><br>Thanks,<br>Jason<br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">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></div><br><br clear="all"><br>-- <br><div><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Mit freundlichen Grüßen</span></div><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Muhammad Shahzad</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">------------------------------</span><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">-----</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">CISCO Rich Media Communication Specialist (CRMCS)</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">CISCO Certified Network Associate (CCNA)</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Cell: +49 176 99 83 10 85</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">MSN: </span><a href="mailto:shari_786pk@hotmail.com" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">shari_786pk@hotmail.com</a><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Email: </span><a href="mailto:shaheryarkh@googlemail.com" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">shaheryarkh@googlemail.com</a>
</div>