[OpenSIPS-Users] local_route not being called
Muhammad Shahzad
shaheryarkh at gmail.com
Thu Jul 25 03:55:45 CEST 2013
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 <opensips at jcpd.biz> 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:5555555555 at 10.0.1.27: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:5555555555 at 10.0.1.147:5060 SIP/2.0.
> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-0.
> From: sipp <sip:9123456789 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <18574921119 at 10.0.1.147:5060>.
> Call-ID: 4-10199 at 10.0.1.27.
> CSeq: 1 INVITE.
> Contact: sip:sipp at 10.0.1.27: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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>.
> Call-ID: 4-10199 at 10.0.1.27.
> 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:5555555555 at 10.0.1.27: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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>.
> Call-ID: 4-10199 at 10.0.1.27.
> CSeq: 1 INVITE.
> Contact: sip:sipp at 10.0.1.27: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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>;tag=10195SIPpTag014.
> Call-ID: 4-10199 at 10.0.1.27.
> 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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>;tag=10195SIPpTag014.
> Call-ID: 4-10199 at 10.0.1.27.
> 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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>;tag=10195SIPpTag014.
> Call-ID: 4-10199 at 10.0.1.27.
> 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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>;tag=10195SIPpTag014.
> Call-ID: 4-10199 at 10.0.1.27.
> 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:5555555555 at 10.0.1.147:5060 SIP/2.0.
> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-5.
> From: sipp <sip:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>.
> Call-ID: 4-10199 at 10.0.1.27.
> CSeq: 1 ACK.
> Contact: sip:sipp at 10.0.1.27:5060.
> Max-Forwards: 70.
> Subject: Performance Test.
> Content-Length: 0.
> .
>
> #
> U 10.0.1.147:5060 -> 10.0.1.27:9003
> ACK sip:5555555555 at 10.0.1.27: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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>.
> Call-ID: 4-10199 at 10.0.1.27.
> CSeq: 1 ACK.
> Contact: sip:sipp at 10.0.1.27:5060.
> Max-Forwards: 70.
> Subject: Performance Test.
> Content-Length: 0.
> .
>
> #
> U 10.0.1.27:5060 -> 10.0.1.147:5060
> BYE sip:5555555555 at 10.0.1.147:5060 SIP/2.0.
> Via: SIP/2.0/UDP 10.0.1.27:5060;branch=z9hG4bK-10199-4-7.
> From: sipp <sip:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>.
> Call-ID: 4-10199 at 10.0.1.27.
> CSeq: 2 BYE.
> Contact: sip:sipp at 10.0.1.27:5060.
> Max-Forwards: 70.
> Subject: Performance Test.
> Content-Length: 0.
> .
>
> #
> U 10.0.1.147:5060 -> 10.0.1.27:9003
> BYE sip:5555555555 at 10.0.1.27: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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>.
> Call-ID: 4-10199 at 10.0.1.27.
> CSeq: 2 BYE.
> Contact: sip:sipp at 10.0.1.27: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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>.
> Call-ID: 4-10199 at 10.0.1.27.
> 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:5555555555 at 10.0.1.27:5060>;tag=10199SIPpTag004.
> To: sut <5555555555 at 10.0.1.147:5060>.
> Call-ID: 4-10199 at 10.0.1.27.
> CSeq: 2 BYE.
> Contact: <sip:10.0.1.27:9003;transport=UDP>.
> Content-Length: 0.
>
>
> Thanks,
> Jason
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> 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: shari_786pk at hotmail.com
Email: shaheryarkh at googlemail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130725/0f241f43/attachment.htm>
More information about the Users
mailing list