summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2013-02-27 10:16:08 +0000
committerLiong Sauw Ming <ming@teluu.com>2013-02-27 10:16:08 +0000
commite0b9872e5b72532014d4f2fd8116662cc92fdf64 (patch)
treebe3ac789db5892454d95b218849b56ebdcf24520 /pjsip
parent1703f7d9893e43ae31e81cb9de5b26420e2f6857 (diff)
Re #1559: Backported to 1.x, except r4312,r4330
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4387 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/build/Makefile2
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h13
-rw-r--r--pjsip/src/pjsip/sip_parser.c9
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c15
4 files changed, 32 insertions, 7 deletions
diff --git a/pjsip/build/Makefile b/pjsip/build/Makefile
index 4e55b239..a14432c9 100644
--- a/pjsip/build/Makefile
+++ b/pjsip/build/Makefile
@@ -137,7 +137,7 @@ pjsip-simple:
pjsua-lib:
$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $(PJSUA_LIB_LIB)
-pjsip-test:
+pjsip-test: pjsip
$(MAKE) -f $(RULES_MAK) APP=TEST app=pjsip-test $(TEST_EXE)
.PHONY: ../lib/pjsip.ko
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index 417301e5..7b66d5c3 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -653,9 +653,10 @@ typedef struct pjsua_callback
* callback.
* - it may delay the processing of the request, for example to request
* user permission whether to accept or reject the request. In this
- * case, the application MUST set the \a code argument to 202, and
- * later calls #pjsua_pres_notify() to accept or reject the
- * subscription request.
+ * case, the application MUST set the \a code argument to 202, then
+ * IMMEDIATELY calls #pjsua_pres_notify() with state
+ * PJSIP_EVSUB_STATE_PENDING and later calls #pjsua_pres_notify()
+ * again to accept or reject the subscription request.
*
* Any \a code other than 200 and 202 will be treated as 200.
*
@@ -2240,7 +2241,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.
*/
@@ -3524,7 +3526,8 @@ PJ_DECL(pj_status_t) pjsua_call_update(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) != '>')
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 434bbee4..0d700bd7 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -34,6 +34,17 @@
*/
#define LOCK_CODEC_MAX_RETRY 5
+
+/*
+ * The INFO method.
+ */
+const pjsip_method pjsip_info_method =
+{
+ PJSIP_OTHER_METHOD,
+ { "INFO", 4 }
+};
+
+
/* This callback receives notification from invite session when the
* session state has changed.
*/
@@ -175,6 +186,10 @@ pj_status_t pjsua_call_subsys_init(const pjsua_config *cfg)
pjsip_endpt_add_capability(pjsua_var.endpt, NULL, PJSIP_H_SUPPORTED,
NULL, 1, &str_norefersub);
+ /* Add "INFO" in Allow header, for DTMF and video key frame request. */
+ pjsip_endpt_add_capability(pjsua_var.endpt, NULL, PJSIP_H_ALLOW,
+ NULL, 1, &pjsip_info_method.name);
+
return status;
}