Changeset 6137 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Jan 28, 2020 1:47:56 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r6112 r6137 1024 1024 &app_config.auto_hangup_timer, 1025 1025 &delay); 1026 } 1027 1028 /* IP change progress callback. */ 1029 void on_ip_change_progress(pjsua_ip_change_op op, 1030 pj_status_t status, 1031 const pjsua_ip_change_op_info *info) 1032 { 1033 char info_str[128]; 1034 pjsua_acc_info acc_info; 1035 pjsua_transport_info tp_info; 1036 1037 if (status == PJ_SUCCESS) { 1038 switch (op) { 1039 case PJSUA_IP_CHANGE_OP_RESTART_LIS: 1040 pjsua_transport_get_info(info->lis_restart.transport_id, &tp_info); 1041 pj_ansi_snprintf(info_str, sizeof(info_str), 1042 "restart transport %.*s", 1043 tp_info.info.slen, tp_info.info.ptr); 1044 break; 1045 case PJSUA_IP_CHANGE_OP_ACC_SHUTDOWN_TP: 1046 pjsua_acc_get_info(info->acc_shutdown_tp.acc_id, &acc_info); 1047 1048 pj_ansi_snprintf(info_str, sizeof(info_str), 1049 "transport shutdown for account %.*s", 1050 acc_info.acc_uri.slen, acc_info.acc_uri.ptr); 1051 break; 1052 case PJSUA_IP_CHANGE_OP_ACC_UPDATE_CONTACT: 1053 pjsua_acc_get_info(info->acc_shutdown_tp.acc_id, &acc_info); 1054 if (info->acc_update_contact.code) { 1055 pj_ansi_snprintf(info_str, sizeof(info_str), 1056 "update contact for account %.*s, code[%d]", 1057 acc_info.acc_uri.slen, acc_info.acc_uri.ptr, 1058 info->acc_update_contact.code); 1059 } else { 1060 pj_ansi_snprintf(info_str, sizeof(info_str), 1061 "update contact for account %.*s", 1062 acc_info.acc_uri.slen, acc_info.acc_uri.ptr); 1063 } 1064 break; 1065 case PJSUA_IP_CHANGE_OP_ACC_HANGUP_CALLS: 1066 pjsua_acc_get_info(info->acc_shutdown_tp.acc_id, &acc_info); 1067 pj_ansi_snprintf(info_str, sizeof(info_str), 1068 "hangup call for account %.*s, call_id[%d]", 1069 acc_info.acc_uri.slen, acc_info.acc_uri.ptr, 1070 info->acc_hangup_calls.call_id); 1071 break; 1072 case PJSUA_IP_CHANGE_OP_ACC_REINVITE_CALLS: 1073 pjsua_acc_get_info(info->acc_shutdown_tp.acc_id, &acc_info); 1074 pj_ansi_snprintf(info_str, sizeof(info_str), 1075 "reinvite call for account %.*s, call_id[%d]", 1076 acc_info.acc_uri.slen, acc_info.acc_uri.ptr, 1077 info->acc_reinvite_calls.call_id); 1078 break; 1079 case PJSUA_IP_CHANGE_OP_COMPLETED: 1080 pj_ansi_snprintf(info_str, sizeof(info_str), 1081 "done"); 1082 break; 1083 } 1084 PJ_LOG(3,(THIS_FILE, "IP change progress report : %s", info_str)); 1085 1086 } else { 1087 PJ_PERROR(3,(THIS_FILE, status, "IP change progress fail")); 1088 } 1026 1089 } 1027 1090 … … 1301 1364 app_config.cfg.cb.on_snd_dev_operation = &on_snd_dev_operation; 1302 1365 app_config.cfg.cb.on_call_media_event = &on_call_media_event; 1366 app_config.cfg.cb.on_ip_change_progress = &on_ip_change_progress; 1303 1367 #ifdef TRANSPORT_ADAPTER_SAMPLE 1304 1368 app_config.cfg.cb.on_create_media_transport = &on_create_media_transport;
Note: See TracChangeset
for help on using the changeset viewer.