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 "100 Trying" 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="TEST"<br>disable_tcp=yes<br>port=5060<br>###################################<br><br>####### Modules Section ###########<br>mpath="/usr/lib/opensips/modules"<br><br>loadmodule "tm.so"<br>
loadmodule "textops.so"<br>loadmodule "exec.so"<br><br>modparam("tm" , "onreply_avp_mode", 1)<br>modparam("tm" , "fr_timer", 2) # Vendor timeout<br>modparam("tm" , "fr_inv_timer", 2)<br>
modparam("tm" , "enable_stats", 0)<br>modparam("tm" , "via1_matching", 0)<br>modparam("tm" , "T1_timer", 500) # Retransmit interval<br>modparam("tm" , "T2_timer", 1000) # Retransmit total duration<br>
###################################<br><br>####### Routing Logic #############<br>route {<br> xlog("ROUTE");<br> seturi("<a href="http://sip:5555555555@10.0.1.27:9003">sip:5555555555@10.0.1.27:9003</a>");<br>
t_relay();<br>}<br><br>onreply_route {<br> xlog("ONREPLY");<br>}<br>error_route {<br> xlog("ERROR");<br>}<br><br>local_route {<br> xlog("LOCAL");<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">10.0.1.27:5060</a> -> <a href="http://10.0.1.147:5060">10.0.1.147:5060</a><br>INVITE <a href="http://sip:5555555555@10.0.1.147:5060">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 <<a href="http://sip:9123456789@10.0.1.27:5060">sip:9123456789@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>To: sut <<a href="http://18574921119@10.0.1.147:5060">18574921119@10.0.1.147:5060</a>>.<br>
Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060">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">10.0.1.147:5060</a> -> <a href="http://10.0.1.27:5060">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>
To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27">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">10.0.1.147:5060</a> -> <a href="http://10.0.1.27:9003">10.0.1.27:9003</a><br>INVITE <a href="http://sip:5555555555@10.0.1.27:9003">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>
To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060">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">10.0.1.27:9003</a> -> <a href="http://10.0.1.147:5060">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>;tag=10195SIPpTag014.<br>
Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: <sip:10.0.1.27:9003;transport=UDP>.<br>Content-Length: 0.<br>.<br><br>#<br>U <a href="http://10.0.1.27:9003">10.0.1.27:9003</a> -> <a href="http://10.0.1.147:5060">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>
To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>;tag=10195SIPpTag014.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: <sip:10.0.1.27:9003;transport=UDP>.<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">10.0.1.147:5060</a> -> <a href="http://10.0.1.27:5060">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>
To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>;tag=10195SIPpTag014.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: <sip:10.0.1.27:9003;transport=UDP>.<br>
Content-Length: 0.<br>.<br><br>#<br>U <a href="http://10.0.1.147:5060">10.0.1.147:5060</a> -> <a href="http://10.0.1.27:5060">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>;tag=10195SIPpTag014.<br>
Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 1 INVITE.<br>Contact: <sip:10.0.1.27:9003;transport=UDP>.<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">10.0.1.27:5060</a> -> <a href="http://10.0.1.147:5060">10.0.1.147:5060</a><br>ACK <a href="http://sip:5555555555@10.0.1.147:5060">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>.<br>
Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 1 ACK.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060">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">10.0.1.147:5060</a> -> <a href="http://10.0.1.27:9003">10.0.1.27:9003</a><br>ACK <a href="http://sip:5555555555@10.0.1.27:9003">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>
To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 1 ACK.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060">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">10.0.1.27:5060</a> -> <a href="http://10.0.1.147:5060">10.0.1.147:5060</a><br>BYE <a href="http://sip:5555555555@10.0.1.147:5060">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>.<br>
Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 2 BYE.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060">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">10.0.1.147:5060</a> -> <a href="http://10.0.1.27:9003">10.0.1.27:9003</a><br>BYE <a href="http://sip:5555555555@10.0.1.27:9003">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>
To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 2 BYE.<br>Contact: <a href="http://sip:sipp@10.0.1.27:5060">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">10.0.1.27:9003</a> -> <a href="http://10.0.1.147:5060">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>
To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>CSeq: 2 BYE.<br>Contact: <sip:10.0.1.27:9003;transport=UDP>.<br>
Content-Length: 0.<br>.<br><br>#<br>U <a href="http://10.0.1.147:5060">10.0.1.147:5060</a> -> <a href="http://10.0.1.27:5060">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 <<a href="http://sip:5555555555@10.0.1.27:5060">sip:5555555555@10.0.1.27:5060</a>>;tag=10199SIPpTag004.<br>To: sut <<a href="http://5555555555@10.0.1.147:5060">5555555555@10.0.1.147:5060</a>>.<br>Call-ID: <a href="mailto:4-10199@10.0.1.27">4-10199@10.0.1.27</a>.<br>
CSeq: 2 BYE.<br>Contact: <sip:10.0.1.27:9003;transport=UDP>.<br>Content-Length: 0.<br><br><br>Thanks,<br>Jason<br>