Changeset 3570
- Timestamp:
- May 19, 2011 4:36:01 AM (13 years ago)
- Location:
- pjproject/branches/1.x
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjsip-apps/src/pjsua/pjsua_app.c
r3553 r3570 881 881 882 882 case OPT_100REL: /** 100rel */ 883 cur_acc->require_100rel = PJ _TRUE;884 cfg->cfg.require_100rel = PJ _TRUE;883 cur_acc->require_100rel = PJSUA_100REL_MANDATORY; 884 cfg->cfg.require_100rel = PJSUA_100REL_MANDATORY; 885 885 break; 886 886 -
pjproject/branches/1.x/pjsip/include/pjsua-lib/pjsua.h
r3553 r3570 955 955 956 956 /** 957 * This constants controls the use of 100rel extension. 958 */ 959 typedef enum pjsua_100rel_use 960 { 961 /** 962 * Not used. For UAC, support for 100rel will be indicated in Supported 963 * header so that peer can opt to use it if it wants to. As UAS, this 964 * option will NOT cause 100rel to be used even if UAC indicates that 965 * it supports this feature. 966 */ 967 PJSUA_100REL_NOT_USED, 968 969 /** 970 * Mandatory. UAC will place 100rel in Require header, and UAS will 971 * reject incoming calls unless it has 100rel in Supported header. 972 */ 973 PJSUA_100REL_MANDATORY, 974 975 /** 976 * Optional. Similar to PJSUA_100REL_NOT_USED, except that as UAS, this 977 * option will cause 100rel to be used if UAC indicates that it supports it. 978 */ 979 PJSUA_100REL_OPTIONAL 980 981 } pjsua_100rel_use; 982 983 984 /** 957 985 * This structure describes the settings to control the API and 958 986 * user agent behavior, and can be specified when calling #pjsua_init(). … … 1090 1118 1091 1119 /** 1092 * Specify whether support for reliable provisional response (100rel and1093 * PRACK) should be required by default. Note that this setting can be1120 * Specify how the support for reliable provisional response (100rel/ 1121 * PRACK) should be used by default. Note that this setting can be 1094 1122 * further customized in account configuration (#pjsua_acc_config). 1095 1123 * 1096 * Default: PJ _FALSE1097 */ 1098 pj _bool_trequire_100rel;1124 * Default: PJSUA_100REL_NOT_USED 1125 */ 1126 pjsua_100rel_use require_100rel; 1099 1127 1100 1128 /** … … 2223 2251 2224 2252 /** 2225 * Specify whether support for reliable provisional response (100rel and 2226 * PRACK) should be required for all sessions of this account. 2227 * 2228 * Default: PJ_FALSE 2229 */ 2230 pj_bool_t require_100rel; 2253 * Specify how support for reliable provisional response (100rel/ 2254 * PRACK) should be used for all sessions in this account. See the 2255 * documentation of pjsua_100rel_use enumeration for more info. 2256 * 2257 * Default: The default value is taken from the value of 2258 * require_100rel in pjsua_config. 2259 */ 2260 pjsua_100rel_use require_100rel; 2231 2261 2232 2262 /** -
pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_call.c
r3553 r3570 500 500 /* Create the INVITE session: */ 501 501 options |= PJSIP_INV_SUPPORT_100REL; 502 if (acc->cfg.require_100rel )502 if (acc->cfg.require_100rel == PJSUA_100REL_MANDATORY) 503 503 options |= PJSIP_INV_REQUIRE_100REL; 504 504 if (acc->cfg.use_timer != PJSUA_SIP_TIMER_INACTIVE) { … … 849 849 options |= PJSIP_INV_SUPPORT_100REL; 850 850 options |= PJSIP_INV_SUPPORT_TIMER; 851 if (pjsua_var.acc[acc_id].cfg.require_100rel )851 if (pjsua_var.acc[acc_id].cfg.require_100rel == PJSUA_100REL_MANDATORY) 852 852 options |= PJSIP_INV_REQUIRE_100REL; 853 853 if (pjsua_var.media_cfg.enable_ice) … … 930 930 { 931 931 options &= ~(PJSIP_INV_SUPPORT_TIMER); 932 } 933 934 /* If 100rel is optional and UAC supports it, use it. */ 935 if ((options & PJSIP_INV_REQUIRE_100REL)==0 && 936 pjsua_var.acc[acc_id].cfg.require_100rel == PJSUA_100REL_OPTIONAL) 937 { 938 const pj_str_t token = { "100rel", 6}; 939 pjsip_dialog_cap_status cap_status; 940 941 cap_status = pjsip_dlg_remote_has_cap(dlg, PJSIP_H_SUPPORTED, NULL, 942 &token); 943 if (cap_status == PJSIP_DIALOG_CAP_SUPPORTED) 944 options |= PJSIP_INV_REQUIRE_100REL; 932 945 } 933 946
Note: See TracChangeset
for help on using the changeset viewer.