From 90e2c2b9f5922d3959434b24bd1829fdb18e0950 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 26 Oct 2007 05:35:42 +0000 Subject: More ticket #399: pj_sock_close() is called more than once. Also implemented NAT detection callback for Symbian UA git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1526 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/symbian_ua/ua.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'pjsip-apps') diff --git a/pjsip-apps/src/symbian_ua/ua.cpp b/pjsip-apps/src/symbian_ua/ua.cpp index c75432bc..75a8eb7c 100644 --- a/pjsip-apps/src/symbian_ua/ua.cpp +++ b/pjsip-apps/src/symbian_ua/ua.cpp @@ -57,7 +57,7 @@ // // STUN server -#if 0 +#if 1 // Use this to have the STUN server resolved normally # define STUN_DOMAIN NULL # define STUN_SERVER "stun.fwdnet.net" @@ -216,6 +216,16 @@ static void on_call_transfer_status(pjsua_call_id call_id, } +/* NAT detection result */ +static void on_nat_detect(const pj_stun_nat_detect_result *res) +{ + if (res->status != PJ_SUCCESS) { + pjsua_perror(THIS_FILE, "NAT detection failed", res->status); + } else { + PJ_LOG(3, (THIS_FILE, "NAT detected as %s", res->nat_type_name)); + } +} + /* Notification that call is being replaced. */ static void on_call_replaced(pjsua_call_id old_call_id, pjsua_call_id new_call_id) @@ -282,7 +292,8 @@ static pj_status_t app_startup() cfg.cb.on_typing = &on_typing; cfg.cb.on_call_transfer_status = &on_call_transfer_status; cfg.cb.on_call_replaced = &on_call_replaced; - + cfg.cb.on_nat_detect = &on_nat_detect; + if (SIP_PROXY) { cfg.outbound_proxy_cnt = 1; cfg.outbound_proxy[0] = pj_str(SIP_PROXY); -- cgit v1.2.3