diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2009-08-27 19:55:13 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2009-08-27 19:55:13 +0000 |
commit | 600ea59362df8c53ff23a6c5985eaf20b5460f5a (patch) | |
tree | e1f3266cc30ee3ae3b220f98c353e0058a51efbf /pjsip-apps | |
parent | 04c1872db2effd3ba4f118328aae9d024c647fbc (diff) |
Ticket #957: Initial version of TLS transport for Symbian, includes:
- Secure socket, generic abstraction and Symbian implementation (using CSecureSocket).
- Initial rewriting of SIP TLS transport.
- Updated symbian_ua.mmp to support SIP transport TLS (experimental).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2913 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/symbian_ua/ua.cpp | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/pjsip-apps/src/symbian_ua/ua.cpp b/pjsip-apps/src/symbian_ua/ua.cpp index 2b36b709..d4a5c3ec 100644 --- a/pjsip-apps/src/symbian_ua/ua.cpp +++ b/pjsip-apps/src/symbian_ua/ua.cpp @@ -35,7 +35,7 @@ // // Destination URI (to make call, or to subscribe presence) // -#define SIP_DST_URI "sip:100@pjsip.lab" +#define SIP_DST_URI "<sip:100@pjsip.lab>" // // Account @@ -52,9 +52,11 @@ //#define SIP_PROXY "<sip:192.168.0.8;lr>" // -// Set to 1 if TCP is desired (experimental) +// SIP transports // -#define ENABLE_SIP_TCP 0 +#define ENABLE_SIP_UDP 1 +#define ENABLE_SIP_TCP 0 // experimental +#define ENABLE_SIP_TLS 0 // experimental // // Configure nameserver if DNS SRV is to be used with both SIP @@ -373,11 +375,13 @@ static pj_status_t app_startup() pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt), &codec_id, PJMEDIA_CODEC_PRIO_DISABLED); } + - /* Add UDP transport. */ pjsua_transport_config tcfg; pjsua_transport_id tid; +#if ENABLE_SIP_UDP + /* Add UDP transport. */ pjsua_transport_config_default(&tcfg); tcfg.port = SIP_PORT; status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &tcfg, &tid); @@ -386,9 +390,10 @@ static pj_status_t app_startup() pjsua_destroy(); return status; } - - /* Add TCP transport */ +#endif + #if ENABLE_SIP_TCP + /* Add TCP transport */ pjsua_transport_config_default(&tcfg); tcfg.port = SIP_PORT; status = pjsua_transport_create(PJSIP_TRANSPORT_TCP, &tcfg, &tid); @@ -399,6 +404,18 @@ static pj_status_t app_startup() } #endif +#if ENABLE_SIP_TLS + /* Add TLS transport */ + pjsua_transport_config_default(&tcfg); + tcfg.port = SIP_PORT + 1; + status = pjsua_transport_create(PJSIP_TRANSPORT_TLS, &tcfg, &tid); + if (status != PJ_SUCCESS) { + pjsua_perror(THIS_FILE, "Error creating TLS transport", status); + pjsua_destroy(); + return status; + } +#endif + /* Add account for the transport */ pjsua_acc_add_local(tid, PJ_TRUE, &g_acc_id); |