<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>Hello,<br></div><div><br></div><div>I have a Kamailio IMS instance setup, using different hosts for each IMS function (P-CSCF,S-CSCF,I-CSCF etc) and am able to register clients successfully. </div><div><br></div><div>However, when Client-A tries to call Client-B (both registered to the same S-CSCF), the call is failing with the "403 Forbidden - You must register first with a S-CSCF" error. .</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>All hosts & clients are running on the same subnet using RFC1918 IP addresses, there is no NAT involved.</div><div>I've seen the same issue on both 4.2 and Master branches.</div><div>I have the nathelper 'nat_uac_test' parameter set to 18.</div></blockquote><div><br></div><div>Looking at the debug prints and SIP traces, I can see that the 403 Error is being generated by the P-CSCF when it receives the INVITE from the S-CSCF (for forwarding to Client-B). </div><div>Digging deeper into the debug logs, it looks like this is a result of a failed contact match - I've experimented with different values for "hashing_type", which do change the routing logic but still I see the 403 Error.</div><div><br></div><div>Here's 2 excerpts from the debug prints for different values of hashing_type :</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><b>modparam("ims_usrloc_pcscf", ""hashing_type",hashing_type", 0) :</b></div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">2(19636) DEBUG: ims_registrar_pcscf [service_routes.c:183]: getContactP(): Searching in usrloc for <a href="http://10.133.202.17:5060">10.133.202.17:5060</a> (Proto 1)</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 2(19636) DEBUG: ims_usrloc_pcscf [udomain.c:618]: get_pcontact_by_src(): Trying to find contact by src with URI: [sip:*@<a href="http://10.133.202.17:5060">10.133.202.17:5060</a>]</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 2(19636) DEBUG: ims_usrloc_pcscf [udomain.c:465]: get_pcontact(): Searching for contact in P-CSCF usrloc [sip:*@<a href="http://10.133.202.17:5060">10.133.202.17:5060</a>]</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 2(19636) DEBUG: ims_usrloc_pcscf [usrloc.c:187]: get_aor_hash(): Returning hash slot: [1670705485]</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 2(19636) DEBUG: ims_registrar_pcscf [service_routes.c:186]: getContactP(): No entry in usrloc for <a href="http://10.133.202.17:5060">10.133.202.17:5060</a> (Proto 1) found!</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 2(19636) DEBUG: ims_usrloc_pcscf [udomain.c:465]: get_pcontact(): Searching for contact in P-CSCF usrloc [sip:john@10.133.202.61:64019;transport=udp]</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 2(19636) DEBUG: ims_usrloc_pcscf [usrloc.c:187]: get_aor_hash(): Returning hash slot: [397265208]</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 2(19636) DEBUG: ims_registrar_pcscf [service_routes.c:119]: checkcontact(): Port 64019 (search 5060), Proto 1 (search 1), reg_state registered (search registered)</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 2(19636) ERROR: *** cfgtrace:request_route=[Orig_Initial] c=[/etc/kamailio/kamailio.cfg] l=926 a=26 n=send_reply</blockquote></div><div><br></div><div><b>modparam("ims_usrloc_pcscf", ""hashing_type",hashing_type", 2) :</b></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">1(19401) DEBUG: ims_registrar_pcscf [service_routes.c:183]: getContactP(): Searching in usrloc for <a href="http://10.133.202.17:5060">10.133.202.17:5060</a> (Proto 1)</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) DEBUG: ims_usrloc_pcscf [udomain.c:618]: get_pcontact_by_src(): Trying to find contact by src with URI: [sip:*@<a href="http://10.133.202.17:5060">10.133.202.17:5060</a>]</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) DEBUG: ims_usrloc_pcscf [udomain.c:465]: get_pcontact(): Searching for contact in P-CSCF usrloc [sip:*@<a href="http://10.133.202.17:5060">10.133.202.17:5060</a>]</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) DEBUG: ims_usrloc_pcscf [usrloc.c:97]: get_alias_host_from_contact(): no params</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) DEBUG: ims_usrloc_pcscf [usrloc.c:183]: get_aor_hash(): using host for hash [10.133.202.17]</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) DEBUG: ims_usrloc_pcscf [usrloc.c:187]: get_aor_hash(): Returning hash slot: [-1564914093]</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) DEBUG: ims_registrar_pcscf [service_routes.c:186]: getContactP(): No entry in usrloc for <a href="http://10.133.202.17:5060">10.133.202.17:5060</a> (Proto 1) found!</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) DEBUG: ims_usrloc_pcscf [udomain.c:465]: get_pcontact(): Searching for contact in P-CSCF usrloc [sip:john@10.133.202.61:64013;transport=udp]</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) DEBUG: ims_usrloc_pcscf [usrloc.c:176]: get_aor_hash(): Looks like this contact is natted - contact URI: [10.133.202.61] but came from received_host: [10.133.202.17] so will use received_host for hash</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) DEBUG: ims_usrloc_pcscf [usrloc.c:187]: get_aor_hash(): Returning hash slot: [-1564914093]</blockquote></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 1(19401) ERROR: *** cfgtrace:request_route=[Orig_Initial] c=[/etc/kamailio/kamailio.cfg] l=926 a=26 n=send_reply</blockquote></blockquote></blockquote><div><br></div><div> </div><div>Can anyone offer any hints as to how to resolve this?</div><div><br></div><div>I am attaching a SIP call flow - I can supply a complete Kamailio debug trace if needed.</div><div><br></div><div>Thanks</div><div><br></div><div>Phill</div><div><br></div></div>
</div><br></div>