summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2016-05-31 04:28:00 +0000
committerNanang Izzuddin <nanang@teluu.com>2016-05-31 04:28:00 +0000
commit44ffa26787dc2e24069303eded31c9be5253e102 (patch)
tree456ad8b0f00e29ef28a2815faac09f33b46980dd /pjsip/include
parent2e0a80f6dcd9a642d659a452df264196ac701819 (diff)
Re #1918:
- Fixed issue of cannot make/receive call after previous call initialization fails due to STUN error, reproducing steps: 1. Configure an account with acc->cfg.media_stun_use set PJSUA_STUN_RETRY_ON_FAILURE. 2. Start pjsua with STUN servers A and B configured. On startup, both STUN servers A and B are available, so PJSIP will use STUN server A 3. Both STUN server A and B become unavailable 4. Make an outgoing call. 5. Pjsua first tries with STUN server A, fails 6. Pjsua then retry with STUN server B, still fails 7. PJSIP then aborts the call with error (which is desired!) 8. Both STUN server A and B become available again 9. User tries to dial or receive an incoming call, but cannot because the last STUN server status is stored and used in making/receiving call without retrying to resolve STUN server. - Fixed deadlock issues. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5326 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h2
-rw-r--r--pjsip/include/pjsua-lib/pjsua_internal.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index b88aa462..e75636ca 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -3325,7 +3325,7 @@ typedef struct pjsua_acc_config
/**
* Control the use of STUN for the media transports.
*
- * Default: PJSUA_STUN_USE_DEFAULT
+ * Default: PJSUA_STUN_RETRY_ON_FAILURE
*/
pjsua_stun_use media_stun_use;
diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h
index 24a87fc0..8a4f6c84 100644
--- a/pjsip/include/pjsua-lib/pjsua_internal.h
+++ b/pjsip/include/pjsua-lib/pjsua_internal.h
@@ -367,6 +367,8 @@ typedef struct pjsua_stun_resolve
void *token; /**< App token */
pj_stun_resolve_cb cb; /**< App callback */
pj_bool_t blocking; /**< Blocking? */
+ pj_thread_t *waiter; /**< Waiting thread */
+ pj_timer_entry timer; /**< Destroy timer */
pj_status_t status; /**< Session status */
pj_sockaddr addr; /**< Result */
pj_stun_sock *stun_sock; /**< Testing STUN sock */
@@ -608,7 +610,7 @@ void pjsua_set_state(pjsua_state new_state);
* STUN resolution
*/
/* Resolve the STUN server */
-pj_status_t resolve_stun_server(pj_bool_t wait);
+pj_status_t resolve_stun_server(pj_bool_t wait, pj_bool_t retry_if_cur_error);
/**
* Normalize route URI (check for ";lr" and append one if it doesn't