/** * \fn _ics_core_hold_call() * \brief Giu cuoc goi * \param agr1: ics_t *data */ static void _ics_core_hold_call(ics_t *data) { if (current_call < 0) printf("No current call\n"); else { pjsua_call_set_hold(current_call, NULL); } }
static void ui_call_hold() { if (current_call != -1) { pjsua_call_set_hold(current_call, NULL); } else { PJ_LOG(3,(THIS_FILE, "No current call")); } }
bool BlabbleCall::Hold() { BlabbleAccountPtr p = CheckAndGetParent(); if (!p) return false; pj_status_t status = pjsua_call_set_hold(call_id_, NULL); return status == PJ_SUCCESS; }
/** * \fn _ics_hold_call() * \brief Giu cuoc goi * \param agr1: ics_t *data */ static void _ics_hold_call(ics_t *data) { PJ_UNUSED_ARG(data); if (current_call < 0) SHOW_LOG(3, "No current call\n"); else { pjsua_call_set_hold(current_call, NULL); } }
void MessagesDlg::OnBnClickedHold() { MessagesContact* messagesContactSelected = GetMessageContact(); if (messagesContactSelected->callId!=-1) { pjsua_call_info info; pjsua_call_get_info(messagesContactSelected->callId,&info); if (info.media_cnt>0) { if (info.media_status == PJSUA_CALL_MEDIA_LOCAL_HOLD || info.media_status == PJSUA_CALL_MEDIA_NONE) { pjsua_call_reinvite(messagesContactSelected->callId, PJSUA_CALL_UNHOLD, NULL); } else { pjsua_call_set_hold(messagesContactSelected->callId, NULL); } } } }
void call_hold_all_except(pjsua_call_id call_id) { pjsua_call_id call_ids[PJSUA_MAX_CALLS]; unsigned count = PJSUA_MAX_CALLS; if (pjsua_enum_calls ( call_ids, &count)==PJ_SUCCESS) { for (unsigned i = 0; i < count; ++i) { if (call_id == PJSUA_INVALID_ID || call_ids[i] != call_id ) { pjsua_call_info call_info; pjsua_call_get_info(call_ids[i], &call_info); if (call_info.media_cnt>0) { if (call_info.media_status != PJSUA_CALL_MEDIA_LOCAL_HOLD && call_info.media_status != PJSUA_CALL_MEDIA_NONE) { pjsua_call_set_hold(call_info.id, NULL); } } } } } }
static void update_active_calls(const pj_str_t *new_ip_addr) { pjsip_tpselector tp_sel; pjsua_init_tpselector(0, &tp_sel); // << 0 is hard coded here for active transportId. could be passed in if needed. int ndx; for (ndx = 0; ndx < pjsua_var.ua_cfg.max_calls; ++ndx) { pjsua_call *call = &pjsua_var.calls[ndx]; if (!call->inv || call->inv->state != PJSIP_INV_STATE_CONFIRMED) { continue; } // -- TODO : we should do something here about transport, // but something that actually restart media transport for this call // cause copying ip addr somewhere is not valid for stun and nat cases //transport_set_sdp_addr_from_string(call->med_orig, new_ip_addr); //transport_set_sdp_addr_from_string(call->med_tp, new_ip_addr); if (call->local_hold) { pjsua_call_set_hold(ndx, NULL); } else { pjsua_call_reinvite(ndx, PJ_TRUE, NULL); } } }