summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-06-08 04:37:05 +0000
committerBenny Prijono <bennylp@teluu.com>2007-06-08 04:37:05 +0000
commit1839d1e61141663f678b1de1f5a04fb1a4fa97e0 (patch)
tree8ede4756bcde6f05bd8c55e22844881aaa4952a7
parentc76403cbc3eef052a3499d2ccf86a9ef9bb4ea33 (diff)
Fixed ticket #327: SIPS URI in Contact header generated by pjsua causing problems with OpenSER
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1353 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h10
-rw-r--r--pjsip/src/pjsua-lib/pjsua_acc.c4
2 files changed, 12 insertions, 2 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index 0b421046..b560fca1 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -1744,6 +1744,16 @@ PJ_DECL(pj_status_t) pjsua_transport_close( pjsua_transport_id id,
/**
+ * This macro specifies the URI scheme to use in Contact header
+ * when secure transport such as TLS is used. Application can specify
+ * either "sip" or "sips".
+ */
+#ifndef PJSUA_SECURE_SCHEME
+# define PJSUA_SECURE_SCHEME "sips"
+#endif
+
+
+/**
* This structure describes account configuration to be specified when
* adding a new account with #pjsua_acc_add(). Application MUST initialize
* this structure first by calling #pjsua_acc_config_default().
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c
index 446adaa1..f5591697 100644
--- a/pjsip/src/pjsua-lib/pjsua_acc.c
+++ b/pjsip/src/pjsua-lib/pjsua_acc.c
@@ -1048,7 +1048,7 @@ PJ_DEF(pj_status_t) pjsua_acc_create_uac_contact( pj_pool_t *pool,
(int)acc->display.slen,
acc->display.ptr,
(acc->display.slen?" " : ""),
- (secure ? "sips" : "sip"),
+ (secure ? PJSUA_SECURE_SCHEME : "sip"),
(int)acc->user_part.slen,
acc->user_part.ptr,
(acc->user_part.slen?"@":""),
@@ -1155,7 +1155,7 @@ PJ_DEF(pj_status_t) pjsua_acc_create_uas_contact( pj_pool_t *pool,
(int)acc->display.slen,
acc->display.ptr,
(acc->display.slen?" " : ""),
- (secure ? "sips" : "sip"),
+ (secure ? PJSUA_SECURE_SCHEME : "sip"),
(int)acc->user_part.slen,
acc->user_part.ptr,
(acc->user_part.slen?"@":""),