From 8d35b8f739dbad39422332ecb8376cc18a858f2e Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Sat, 19 Jun 2010 12:35:33 +0000 Subject: 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 --- pjsip-apps/src/pjsua/pjsua_app.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pjsip-apps/src/pjsua') 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 @@ -2908,6 +2908,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. */ @@ -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 */ -- cgit v1.2.3