Muhammad, Thanks for the reply.
I guess I don't understand under which circumstances the TM module would send out a request message, presumably an INVITE. Can you please add clarification. Thanks, Jason On Wed, Jul 24, 2013 at 6:55 PM, Muhammad Shahzad <[email protected]>wrote: > Local route is invoked by opensips when a REQUEST is generated by TM > module internally, NOT the replies. See its description for details, > > http://www.opensips.org/Documentation/Script-Routes-1-9#toc6 > > Thank you. > > > > > On Wed, Jul 24, 2013 at 11:42 PM, Jason Caulfield <[email protected]>wrote: > >> Users, >> >> I am just getting started with opensips. (version 1.7 from CentOS 6 epel >> repo) >> >> Can you please help me understand why in my code (see below) local_route >> is not invoked. >> >> I would expect that local_route would be invoked when a "100 Trying" is >> issued, but it is not. >> >> Below is the config, log out, and network output. >> >> I am testing it with sipp. >> >> >> Config: >> >> ####### Global Parameters ######### >> debug=0 >> log_stderror=no >> log_facility=LOG_LOCAL0 >> fork=yes >> children=12 >> log_name="TEST" >> disable_tcp=yes >> port=5060 >> ################################### >> >> ####### Modules Section ########### >> mpath="/usr/lib/opensips/modules" >> >> loadmodule "tm.so" >> loadmodule "textops.so" >> loadmodule "exec.so" >> >> modparam("tm" , "onreply_avp_mode", 1) >> modparam("tm" , "fr_timer", 2) # Vendor timeout >> modparam("tm" , "fr_inv_timer", 2) >> modparam("tm" , "enable_stats", 0) >> modparam("tm" , "via1_matching", 0) >> modparam("tm" , "T1_timer", 500) # Retransmit interval >> modparam("tm" , "T2_timer", 1000) # Retransmit total duration >> ################################### >> >> ####### Routing Logic ############# >> route { >> xlog("ROUTE"); >> seturi("sip:[email protected]:9003"); >> t_relay(); >> } >> >> onreply_route { >> xlog("ONREPLY"); >> } >> error_route { >> xlog("ERROR"); >> } >> >> local_route { >> xlog("LOCAL"); >> } >> ################################### >> >> >> Log: >> >> Jul 25 05:34:32 rmps-b TEST[12856]: ROUTE >> Jul 25 05:34:32 rmps-b TEST[12855]: ONREPLY >> Jul 25 05:34:32 rmps-b TEST[12857]: ONREPLY >> Jul 25 05:34:32 rmps-b TEST[12858]: ROUTE >> Jul 25 05:34:42 rmps-b TEST[12860]: ROUTE >> Jul 25 05:34:42 rmps-b TEST[12861]: ONREPLY >> >> >> Network: >> >> # >> U 10.0.1.27:5060 -> 10.0.1.147:5060 >> INVITE sip:[email protected]:5060 SIP/2.0. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>. >> Call-ID: [email protected]. >> CSeq: 1 INVITE. >> Contact: sip:[email protected]:5060. >> Max-Forwards: 70. >> Subject: Performance Test. >> Content-Type: application/sdp. >> Content-Length: 129. >> . >> v=0. >> o=user1 53655765 2353687637 IN IP4 10.0.1.27. >> s=-. >> c=IN IP4 10.0.1.27. >> t=0 0. >> m=audio 6000 RTP/AVP 0. >> a=rtpmap:0 PCMU/8000. >> >> # >> U 10.0.1.147:5060 -> 10.0.1.27:5060 >> SIP/2.0 100 Giving a try. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>. >> Call-ID: [email protected]. >> CSeq: 1 INVITE. >> Server: OpenSIPS (1.7.2-tls (i386/linux)). >> Content-Length: 0. >> . >> >> # >> U 10.0.1.147:5060 -> 10.0.1.27:9003 >> INVITE sip:[email protected]:9003 SIP/2.0. >> Via: SIP/2.0/UDP 10.0.1.147;branch=z9hG4bK580f.8ddd3891.0. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>. >> Call-ID: [email protected]. >> CSeq: 1 INVITE. >> Contact: sip:[email protected]:5060. >> Max-Forwards: 70. >> Subject: Performance Test. >> Content-Type: application/sdp. >> Content-Length: 129. >> . >> v=0. >> o=user1 53655765 2353687637 IN IP4 10.0.1.27. >> s=-. >> c=IN IP4 10.0.1.27. >> t=0 0. >> m=audio 6000 RTP/AVP 0. >> a=rtpmap:0 PCMU/8000. >> >> # >> U 10.0.1.27:9003 -> 10.0.1.147:5060 >> SIP/2.0 180 Ringing. >> 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. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>;tag=10195SIPpTag014. >> Call-ID: [email protected]. >> CSeq: 1 INVITE. >> Contact: <sip:10.0.1.27:9003;transport=UDP>. >> Content-Length: 0. >> . >> >> # >> U 10.0.1.27:9003 -> 10.0.1.147:5060 >> SIP/2.0 200 OK. >> 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. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>;tag=10195SIPpTag014. >> Call-ID: [email protected]. >> CSeq: 1 INVITE. >> Contact: <sip:10.0.1.27:9003;transport=UDP>. >> Content-Type: application/sdp. >> Content-Length: 129. >> . >> v=0. >> o=user1 53655765 2353687637 IN IP4 10.0.1.27. >> s=-. >> c=IN IP4 10.0.1.27. >> t=0 0. >> m=audio 6001 RTP/AVP 0. >> a=rtpmap:0 PCMU/8000. >> >> # >> U 10.0.1.147:5060 -> 10.0.1.27:5060 >> SIP/2.0 180 Ringing. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>;tag=10195SIPpTag014. >> Call-ID: [email protected]. >> CSeq: 1 INVITE. >> Contact: <sip:10.0.1.27:9003;transport=UDP>. >> Content-Length: 0. >> . >> >> # >> U 10.0.1.147:5060 -> 10.0.1.27:5060 >> SIP/2.0 200 OK. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>;tag=10195SIPpTag014. >> Call-ID: [email protected]. >> CSeq: 1 INVITE. >> Contact: <sip:10.0.1.27:9003;transport=UDP>. >> Content-Type: application/sdp. >> Content-Length: 129. >> . >> v=0. >> o=user1 53655765 2353687637 IN IP4 10.0.1.27. >> s=-. >> c=IN IP4 10.0.1.27. >> t=0 0. >> m=audio 6001 RTP/AVP 0. >> a=rtpmap:0 PCMU/8000. >> >> # >> U 10.0.1.27:5060 -> 10.0.1.147:5060 >> ACK sip:[email protected]:5060 SIP/2.0. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-5. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>. >> Call-ID: [email protected]. >> CSeq: 1 ACK. >> Contact: sip:[email protected]:5060. >> Max-Forwards: 70. >> Subject: Performance Test. >> Content-Length: 0. >> . >> >> # >> U 10.0.1.147:5060 -> 10.0.1.27:9003 >> ACK sip:[email protected]:9003 SIP/2.0. >> Via: SIP/2.0/UDP 10.0.1.147;branch=z9hG4bK580f.8ddd3891.2. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-5. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>. >> Call-ID: [email protected]. >> CSeq: 1 ACK. >> Contact: sip:[email protected]:5060. >> Max-Forwards: 70. >> Subject: Performance Test. >> Content-Length: 0. >> . >> >> # >> U 10.0.1.27:5060 -> 10.0.1.147:5060 >> BYE sip:[email protected]:5060 SIP/2.0. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-7. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>. >> Call-ID: [email protected]. >> CSeq: 2 BYE. >> Contact: sip:[email protected]:5060. >> Max-Forwards: 70. >> Subject: Performance Test. >> Content-Length: 0. >> . >> >> # >> U 10.0.1.147:5060 -> 10.0.1.27:9003 >> BYE sip:[email protected]:9003 SIP/2.0. >> Via: SIP/2.0/UDP 10.0.1.147;branch=z9hG4bK280f.81db1714.0. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-7. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>. >> Call-ID: [email protected]. >> CSeq: 2 BYE. >> Contact: sip:[email protected]:5060. >> Max-Forwards: 70. >> Subject: Performance Test. >> Content-Length: 0. >> . >> >> # >> U 10.0.1.27:9003 -> 10.0.1.147:5060 >> SIP/2.0 200 OK. >> 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. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>. >> Call-ID: [email protected]. >> CSeq: 2 BYE. >> Contact: <sip:10.0.1.27:9003;transport=UDP>. >> Content-Length: 0. >> . >> >> # >> U 10.0.1.147:5060 -> 10.0.1.27:5060 >> SIP/2.0 200 OK. >> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-7. >> From: sipp <sip:[email protected]:5060>;tag=10199SIPpTag004. >> To: sut <[email protected]:5060>. >> Call-ID: [email protected]. >> CSeq: 2 BYE. >> Contact: <sip:10.0.1.27:9003;transport=UDP>. >> Content-Length: 0. >> >> >> Thanks, >> Jason >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > > > -- > Mit freundlichen Grüßen > Muhammad Shahzad > ----------------------------------- > CISCO Rich Media Communication Specialist (CRMCS) > CISCO Certified Network Associate (CCNA) > Cell: +49 176 99 83 10 85 > MSN: [email protected] > Email: [email protected] > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
