mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
sipcall: add onPeerRinging
Refs #69086 Change-Id: I5da61d5041cc2aeeb939f39356a835f5c2bb264f
This commit is contained in:

committed by
Guillaume Roguez

parent
8eb6937323
commit
69ce49813d
@ -701,6 +701,13 @@ SIPCall::onAnswered()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SIPCall::onPeerRinging()
|
||||
{
|
||||
setConnectionState(Call::RINGING);
|
||||
Manager::instance().peerRingingCall(*this);
|
||||
}
|
||||
|
||||
void
|
||||
SIPCall::setupLocalSDPFromIce()
|
||||
{
|
||||
|
@ -171,6 +171,12 @@ class SIPCall : public Call
|
||||
|
||||
void updateSDPFromSTUN();
|
||||
|
||||
/**
|
||||
* Tell the user that the call is ringing
|
||||
* @param
|
||||
*/
|
||||
void onPeerRinging();
|
||||
|
||||
/**
|
||||
* Tell the user that the call was answered
|
||||
* @param
|
||||
|
@ -784,13 +784,6 @@ SIPVoIPLink::requestKeyframe(const std::string &callID)
|
||||
// Private functions
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static void
|
||||
makeCallRing(SIPCall &call)
|
||||
{
|
||||
call.setConnectionState(Call::RINGING);
|
||||
Manager::instance().peerRingingCall(call);
|
||||
}
|
||||
|
||||
static void
|
||||
invite_session_state_changed_cb(pjsip_inv_session *inv, pjsip_event *ev)
|
||||
{
|
||||
@ -819,7 +812,7 @@ invite_session_state_changed_cb(pjsip_inv_session *inv, pjsip_event *ev)
|
||||
|
||||
if (inv->state == PJSIP_INV_STATE_EARLY and ev and ev->body.tsx_state.tsx and
|
||||
ev->body.tsx_state.tsx->role == PJSIP_ROLE_UAC) {
|
||||
makeCallRing(*call);
|
||||
call->onPeerRinging();
|
||||
} else if (inv->state == PJSIP_INV_STATE_CONFIRMED and ev) {
|
||||
// After we sent or received a ACK - The connection is established
|
||||
call->onAnswered();
|
||||
@ -1121,7 +1114,7 @@ transaction_state_changed_cb(pjsip_inv_session * inv, pjsip_transaction *tsx,
|
||||
return;
|
||||
} else if (msg.find("Ringing") != std::string::npos and call) {
|
||||
if (call)
|
||||
makeCallRing(*call);
|
||||
call->onPeerRinging();
|
||||
else
|
||||
RING_WARN("Ringing state on non existing call");
|
||||
sendOK(inv->dlg, r_data, tsx);
|
||||
|
Reference in New Issue
Block a user