summaryrefslogtreecommitdiff
path: root/pjsip-apps
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2010-06-19 12:35:33 +0000
committerBenny Prijono <bennylp@teluu.com>2010-06-19 12:35:33 +0000
commit8d35b8f739dbad39422332ecb8376cc18a858f2e (patch)
tree622f42846ed18a5eb31b861693a922f51dd4e008 /pjsip-apps
parentf762fd7b4817c6668da0859b188d9d21a21e38bf (diff)
Fixed #1077: In ICE stream transport (ice_strans.c), automaticaly retry allocation once if TURN allocation fails. If this allocation retry also fails, notify the TURN user via on_ice_complete() callback. Details:
- added new PJ_ICE_STRANS_OP_KEEP_ALIVE operation - also added new on_ice_transport_error() pjsua callback to allow application to react to the failure. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3212 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c
index 801170a0..227beca8 100644
--- a/pjsip-apps/src/pjsua/pjsua_app.c
+++ b/pjsip-apps/src/pjsua/pjsua_app.c
@@ -2909,6 +2909,18 @@ static void on_transport_state(pjsip_transport *tp,
}
/*
+ * Notification on ICE error.
+ */
+static void on_ice_transport_error(int index, pj_ice_strans_op op,
+ pj_status_t status, void *param)
+{
+ PJ_UNUSED_ARG(op);
+ PJ_UNUSED_ARG(param);
+ PJ_PERROR(1,(THIS_FILE, status,
+ "ICE keep alive failure for transport %d", index));
+}
+
+/*
* Print buddy list.
*/
static void print_buddy_list(void)
@@ -4505,6 +4517,7 @@ pj_status_t app_init(int argc, char *argv[])
app_config.cfg.cb.on_nat_detect = &on_nat_detect;
app_config.cfg.cb.on_mwi_info = &on_mwi_info;
app_config.cfg.cb.on_transport_state = &on_transport_state;
+ app_config.cfg.cb.on_ice_transport_error = &on_ice_transport_error;
app_config.log_cfg.cb = log_cb;
/* Set sound device latency */