Changeset 5495
- Timestamp:
- Dec 7, 2016 3:33:35 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r5493 r5495 2870 2870 pj_str_t str_dest; 2871 2871 int len; 2872 char call_id_dest_buf[PJSIP_MAX_URL_SIZE * 2]; 2873 int call_id_len; 2872 2874 pjsip_uri *uri; 2873 2875 pj_status_t status; 2876 const pjsip_parser_const_t *pconst; 2874 2877 2875 2878 … … 2916 2919 2917 2920 str_dest.slen += len; 2918 2921 2922 /* This uses the the same scanner definition used for SIP parsing 2923 * to escape the call-id in the refer. 2924 * 2925 * A common pattern for call-ids is: name@domain. The '@' character, 2926 * when used in a URL parameter, throws off many SIP parsers. 2927 * URL escape it based off of the allowed characters for header values. 2928 */ 2929 pconst = pjsip_parser_const(); 2930 call_id_len = pj_strncpy2_escape(call_id_dest_buf, &dest_dlg->call_id->id, 2931 PJ_ARRAY_SIZE(call_id_dest_buf), 2932 &pconst->pjsip_HDR_CHAR_SPEC); 2933 if (call_id_len < 0) { 2934 status = PJSIP_EURITOOLONG; 2935 goto on_error; 2936 } 2919 2937 2920 2938 /* Build the URI */ … … 2927 2945 ((options&PJSUA_XFER_NO_REQUIRE_REPLACES) ? 2928 2946 "" : "Require=replaces&"), 2929 (int)dest_dlg->call_id->id.slen,2930 dest_dlg->call_id->id.ptr,2947 call_id_len, 2948 call_id_dest_buf, 2931 2949 (int)dest_dlg->remote.info->tag.slen, 2932 2950 dest_dlg->remote.info->tag.ptr,
Note: See TracChangeset
for help on using the changeset viewer.