diff options
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 10 | ||||
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 4 |
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?"@":""), |