summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h6
-rw-r--r--pjsip/src/pjsip/sip_parser.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index ad8e519c..40975e4e 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -2729,7 +2729,8 @@ typedef struct pjsua_acc_config
/**
* The full SIP URL for the account. The value can take name address or
- * URL format, and will look something like "sip:account@serviceprovider".
+ * URL format, and will look something like "sip:account@serviceprovider"
+ * or "\"Display Name\" <sip:account@provider>".
*
* This field is mandatory.
*/
@@ -4534,7 +4535,8 @@ PJ_DECL(pj_status_t) pjsua_call_update2(pjsua_call_id call_id,
* of the call transfer request.
*
* @param call_id The call id to be transfered.
- * @param dest Address of new target to be contacted.
+ * @param dest URI of new target to be contacted. The URI may be
+ * in name address or addr-spec format.
* @param msg_data Optional message components to be sent with
* the request.
*
diff --git a/pjsip/src/pjsip/sip_parser.c b/pjsip/src/pjsip/sip_parser.c
index ccdf5d35..56ce484c 100644
--- a/pjsip/src/pjsip/sip_parser.c
+++ b/pjsip/src/pjsip/sip_parser.c
@@ -1522,8 +1522,15 @@ static pjsip_name_addr *int_parse_name_addr( pj_scanner *scanner,
/* Get the SIP-URL */
has_bracket = (*scanner->curptr == '<');
- if (has_bracket)
+ if (has_bracket) {
pj_scan_get_char(scanner);
+ } else if (name_addr->display.slen) {
+ /* Must have bracket now (2012-10-26).
+ * Allowing (invalid) name-addr to pass URI verification will
+ * cause us to send invalid URI to the wire.
+ */
+ PJ_THROW( PJSIP_SYN_ERR_EXCEPTION);
+ }
name_addr->uri = int_parse_uri( scanner, pool, PJ_TRUE );
if (has_bracket) {
if (pj_scan_get_char(scanner) != '>')