Ignore:
Timestamp:
Mar 2, 2008 10:37:41 AM (14 years ago)
Author:
bennylp
Message:

Ticket #498: Option in client registration to ignore Contact address in REGISTER response

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c

    r1593 r1837  
    724724            /* Enumerate all Contact headers found in the response and 
    725725             * find the Contact(s) that we register. 
     726             * 
     727             * Note:  
     728             *  by default we require that the exact same URI that we 
     729             *  register is returned in the 200/OK response (by exact, 
     730             *  meaning all URI components including transport param), 
     731             *  otherwise if we don't detect that our URI is there, we 
     732             *  treat registration as failed. 
     733             * 
     734             *  If your registrar server couldn't do this, you can 
     735             *  disable this exact URI checking. See the compile time 
     736             *  setting PJSIP_REGISTER_CLIENT_CHECK_CONTACT or the 
     737             *  corresponding run-time setting in pjsip_cfg(). 
    726738             */ 
    727             for (i=0; i<contact_cnt; ++i) { 
     739            for (i=0; i<contact_cnt && pjsip_cfg()->regc.check_contact; ++i) { 
    728740                pjsip_contact_hdr *our_contact; 
    729741 
     
    761773             * means we have been unregistered. 
    762774             */ 
    763             if (!has_our_contact) 
     775            if (pjsip_cfg()->regc.check_contact && !has_our_contact) 
    764776                expiration = 0; 
    765777 
Note: See TracChangeset for help on using the changeset viewer.