<div dir="ltr">Hi Federico,<div><br></div><div>I agree with you re. the specs. I will have a look this evening on our test setup and commit your patch if I am happy. Thanks for your feedback!</div><div><br></div><div>Cheers</div><div>Jason</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 22 Jul 2015 at 12:23 Federico Favaro <<a href="mailto:notifications@github.com">notifications@github.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Dear all,</p>

<p>With this mail i would like to explain better my modifications to CDP module for Rx diameter message routing. (pull request <a href="https://github.com/kamailio/kamailio/pull/238" title="cdp: Fix cdp routing for Rx interface" target="_blank">#238</a>).<br>
As you know, the ims_qos module create AAR Diameter message sent from P-CSCF to PCRF on REGISTER or on the first response received by the P-CSCF with a valid SDP during INVITE and STR message on BYE</p>

<p>After the creation of AAR message, the routing decision is made in the cdp module.</p>

<p>On get_routing_peer function (routing.c file), fist of all, AVP_Vendor_Specific_Application_Id is checked. If this AVP is present, AVP_Vendor_Id and AVP_Auth_Application_Id is checked together.<br>
If they are present on the message, vendor_id and app_id are assigned with the respective values retrieved from the message.<br>
After that, AVP_Auth_Application_Id is checked.<br>
If this AVP is present, AVP_Vendor_Id is checked. If this is not present, vendord_id is assigned to zero.<br>
The same behavior is implemented for AVP_Acct_Application_Id.</p>

<p>This way, if Auth_Application_Id is present but not AVP_Vendor_Id is not, vendor_id variable is zero and peer_handles_application function will return always zero and the module will not be able to route correctly the request (unless you by-pass the routing forcing explicitely the peer on the script).</p>

<p>Taking a look to the specs (TS 29.214)  AVP_Auth_Application_id is mandatory, meanwhile AVP_Vendor_Id and AVP_Acct_Application_Id is not present. For this reason, IMHO vendor_id variable cannot be forced to zero if one of them is not present.<br>
In my patch, vendor_id variable is updated if only both AVP are present (Auth_Application_Id and Vendor_Id or<br>
AVP_Acct_Application_Id and Vendor_Id).</p>

<p>In my tests, everything is working with my patch and also the other Diameter messages (e.g. from I-CSCF or S-CSCF to HSS and vice-versa). However, i would like to have your point of view on the matter.</p>

<p>Best regards,</p>

<p>Federico Favaro<br>
R&D Department<br>
Athonet s.r.l.</p>

<p style="font-size:small;color:#666">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/pull/238#issuecomment-123653011" target="_blank">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZRTDgAMOvyb3R1PxGXlBMLFJs5P_ks5of2aJgaJpZM4FUcXu.gif" width="1"></p>
<div>
  <div>
    
    
  </div>
  
</div>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>