bool SIPCall::internalOffHold(const std::function<void()>& sdp_cb) { if (not setState(CallState::ACTIVE)) return false; sdp_cb(); if (getConnectionState() == ConnectionState::CONNECTED) { if (SIPSessionReinvite() != PJ_SUCCESS) { RING_WARN("[call:%s] resuming hold", getCallId().c_str()); onhold(); return false; } } return true; }
void RemoteExpress::onhold(unsigned long code, void (*cb) (unsigned long code, unsigned long microsSincePress)){ onhold(code, 0, cb); }