Misc fix (#1003): resolve NAT type after mapped addresses for SIP/RTP/RTCP sockets have been resolved, so reduce chattiness during initialization and simplify debugging related to STUN problems


git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3041 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index ebabd8e..3a6bb04 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -334,9 +334,6 @@
     }
 #endif
 
-    /* Perform NAT detection */
-    pjsua_detect_nat_type();
-
     return PJ_SUCCESS;
 }
 
@@ -641,6 +638,9 @@
     pj_timer_entry_init(&pjsua_var.snd_idle_timer, PJ_FALSE, NULL, 
 			&close_snd_timer_cb);
 
+    /* Perform NAT detection */
+    pjsua_detect_nat_type();
+
     return PJ_SUCCESS;
 }