Le Wed, 27 Nov 2013 18:30:32 +0100,
Carsten Bock <[email protected]> a écrit :

Hi Carsten,

> I've implemented it that way in order to cope with NAT; however i can
> probably simply replace it with the "add_contact_alias()" functions
> from Nathelper...

so, maybe the pcscf_is_registered() function could:
    * retrieve the pcontact record in O(1) using the Contact URI hash
      [should pcscf_is_registered() fail if no there is no Contact
      header? Could the Contact URI somehow change between REGISTER and
      other requests?]
    * compare the request's source ip & port with those stored in the
      pcontact record
    * if both steps succeed, return true

This should prevent performances issues if a lot of contacts are
registered. Besides, this would allow to differentiate several UACs
using the same network connection (as they very likely would provide
different contact URIs).
What do you think of this?

Cheers,
-- 
Camille

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to