Changeset 1837 for pjproject/trunk
- Timestamp:
- Mar 2, 2008 10:37:41 AM (17 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_config.h
r1818 r1837 24 24 * @brief Compile time configuration. 25 25 */ 26 #include <pj/ config.h>26 #include <pj/types.h> 27 27 28 28 /** … … 104 104 /* Dialog layer settings .. TODO */ 105 105 106 /** Client registration settings. */ 107 struct { 108 /** 109 * Specify whether client registration should check for its 110 * registered contact in Contact header of successful REGISTE 111 * response to determine whether registration has been successful. 112 * This setting may be disabled if non-compliant registrar is unable 113 * to return correct Contact header. 114 * 115 * Default is PJSIP_REGISTER_CLIENT_CHECK_CONTACT 116 */ 117 pj_bool_t check_contact; 118 119 } regc; 120 106 121 } pjsip_cfg_t; 107 122 … … 700 715 701 716 /** 717 * Specify whether client registration should check for its registered 718 * contact in Contact header of successful REGISTE response to determine 719 * whether registration has been successful. This setting may be disabled 720 * if non-compliant registrar is unable to return correct Contact header. 721 * 722 * This setting can be changed in run-time with using pjsip_cfg(). 723 * 724 * Default is 1 725 */ 726 #ifndef PJSIP_REGISTER_CLIENT_CHECK_CONTACT 727 # define PJSIP_REGISTER_CLIENT_CHECK_CONTACT 1 728 #endif 729 730 731 /** 702 732 * @} 703 733 */ -
pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c
r1593 r1837 724 724 /* Enumerate all Contact headers found in the response and 725 725 * 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(). 726 738 */ 727 for (i=0; i<contact_cnt ; ++i) {739 for (i=0; i<contact_cnt && pjsip_cfg()->regc.check_contact; ++i) { 728 740 pjsip_contact_hdr *our_contact; 729 741 … … 761 773 * means we have been unregistered. 762 774 */ 763 if ( !has_our_contact)775 if (pjsip_cfg()->regc.check_contact && !has_our_contact) 764 776 expiration = 0; 765 777 -
pjproject/trunk/pjsip/src/pjsip/sip_config.c
r1818 r1837 30 30 PJSIP_T4_TIMEOUT, 31 31 PJSIP_TD_TIMEOUT 32 }, 33 34 /* Client registration client */ 35 { 36 PJSIP_REGISTER_CLIENT_CHECK_CONTACT 32 37 } 33 38 };
Note: See TracChangeset
for help on using the changeset viewer.