Hi all, Solved!
As is often the case, after working all morning on the problem, after posting I discovered my error. I noticed that I hadn't included in my post the "alias=" command. It was indeed in my script but I had used aws-rcsstg.voip.systems instead of aws-rcsstg.vvoip.systems ! I don't know how many times I have stared at that but I guess you often see what you want to see...... Apologies for wasting your time. Kind regards Shane > -----Original Message----- > From: Shane Harrison > Sent: Wednesday, 13 July 2016 2:48 p.m. > To: 'sr-users@lists.sip-router.org' > Subject: Determining if request is from a local domain > > Hi all, > > From previous posts my understanding is that RURI's are matched against > reverse DNS lookup of listen addresses and aliases set via the "alias=" > parameter in the config file (assuming the domain module isn't being used). > However I am having difficulty in getting this to work. From looking at the > code and the log file, it appears to me as if the alias isn't making it into > the list > of hosts that is checked against for some reason. > > Kamailio proxy is behind a loadbalancer (Kamailio dispatcher) and proxy is > trying to relay the request because it doesn't recognise it as a local domain. > Any thoughts on where my error is would be appreciated. > > Relevant CFG file section - note that > RCS_LB_PUBLIC_IP:RCS_LB_PUBLIC_PORT is 52.64.xxx.221 :5061 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~~~~~~~~~~~~~~~~ > auto_aliases=yes > > # aliases and listening settings for sipproxy alias="aws-rcsstg.voip.systems" > listen=tcp:10.4.1.62:5060 advertise > RCS_LB_PUBLIC_IP:RCS_LB_PUBLIC_PORT > > > My request is a REGISTER as follows: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > received message > REGISTER call-id b2ed2fdd@192.168.148.30 received from 10.4.1.62 raw msg > REGISTER sip:aws-rcsstg.vvoip.systems;transport=tls SIP/2.0 > Via: SIP/2.0/TCP > 52.64.xxx.221:5060;branch=z9hG4bKa691.5fd57c2a783d3a5d7f6f80fcd0c815d > 6.0;i=d91 > Via: SIP/2.0/TLS > 192.168.148.30:5061;received=203.171.46.54;rport=64515;branch=z9hG4bK68 > b886fd00518;keep > From: <sip:+6421608919@aws- > rcsstg.vvoip.systems;transport=tls>;tag=4af7e7d8 > To: <sip:+6421608919@aws-rcsstg.vvoip.systems;transport=tls> > Call-ID: b2ed2fdd@192.168.148.30 > CSeq: 1995005270 REGISTER > Max-Forwards: 69 > Contact: > <sip:+6421608919@203.171.46.54:64515;transport=tls>;expires=240;+sip.inst > ance="<urn:uuid:23624e3d-c98e-3b76-9acb-5499202e2f8d>";reg- > id=1;+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp- > application.ims.iari.rcs.sm";+g.oma.sip-im;+g.3gpp.iari-ref="urn%3Aurn- > 7%3A3gpp-application.ims.iari.gsma-is";+g.3gpp.cs-voice;+g.3gpp.iari- > ref="urn%3Aurn-7%3A3gpp-application.ims.iari.gsma-vs";+g.3gpp.iari- > ref="urn%3Aurn-7%3A3gpp-application.ims.iari.rcse.sp";+g.3gpp.icsi- > ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";video > User-Agent: FlowTalk-WindowsCommunicator_5.x > P-Access-Network-Info: IEEE-802.3 > Allow: > INVITE,ACK,BYE,CANCEL,REFER,NOTIFY,OPTIONS,PRACK,UPDATE,INFO,MESS > AGE,SUBSCRIBE,PUBLISH > Allow-Events: refer, presence > Supported: 100rel, replaces, timer, gruu, join, histinfo, path > Date: Wed, 13 Jul 2016 00:27:39 GMT > Content-Length: 0 > Path: > <sip:52.64.xxx.221:5060;transport=tcp;lr;received=sip:203.171.46.54:64515%3 > Btransport%3Dtls> > > > Relevant section of the log where if( !uri == me ) is tested: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Jul 13 03:18:06 aws-rcsstg-sip-proxy-i-b879b469 /usr/sbin/kamailio[9367]: > ERROR: *** cfgtrace:request_route=[SIPOUT] > c=[//etc/kamailio/kamailio.cfg] l=1052 a=16 n=if Jul 13 03:18:06 aws-rcsstg- > sip-proxy-i-b879b469 /usr/sbin/kamailio[9367]: DEBUG: <core> > [socket_info.c:583]: grep_sock_info(): grep_sock_info - checking if host==us: > 24==9 && [aws-rcsstg.vvoip.systems] == [10.4.1.62] Jul 13 03:18:06 aws- > rcsstg-sip-proxy-i-b879b469 /usr/sbin/kamailio[9367]: DEBUG: <core> > [socket_info.c:587]: grep_sock_info(): grep_sock_info - checking if port 5060 > (advertise 5061) matches port 5061 Jul 13 03:18:06 aws-rcsstg-sip-proxy-i- > b879b469 /usr/sbin/kamailio[9367]: DEBUG: <core> [socket_info.c:603]: > grep_sock_info(): grep_sock_info - checking advertise if host==us: 24==13 > && [aws-rcsstg.vvoip.systems] == [52.64.xxx.221] Jul 13 03:18:06 aws-rcsstg- > sip-proxy-i-b879b469 /usr/sbin/kamailio[9367]: DEBUG: <core> > [forward.c:448]: check_self(): check_self: host != me > > > Kind regards > > Shane Harrison > Senior Software Engineer > > Imagination Technologies NZ Limited > Level 2 > 1 Market Grove > Lower Hutt, 5010 > New Zealand > > PO Box 30-449 > Lower Hutt, 5040 > New Zealand > > Phone: +64 4 890-3681 ext 3361 > _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users