Commit dab806af authored by Gabriel Margiani's avatar Gabriel Margiani

Some renames in hold mechanism

parent 21518f1a
......@@ -29,7 +29,7 @@ p3::call::call(int i, p3::sipphone &p, p3::account &acc, int call_id) :
p3id(i),
state(p3::callState::NONE),
ringing(false),
hold(false),
isOnHold(false),
mute(false),
aud_med(nullptr)
{}
......@@ -113,10 +113,9 @@ char p3::call::get_state_char() {
void p3::call::hold_toggle() {
try {
std::cout << "holdtx" << std::endl;
pj::AudDevManager& mgr = pj::Endpoint::instance().audDevManager();
pj::CallOpParam o;
if (hold) {
if (isOnHold) {
if (phone.hold_music == nullptr) {
reinvite(o);
} else if (aud_med != nullptr) {
......@@ -124,7 +123,7 @@ void p3::call::hold_toggle() {
aud_med->startTransmit(mgr.getPlaybackDevMedia());
mgr.getCaptureDevMedia().startTransmit(*aud_med);
}
hold = false;
isOnHold = false;
} else {
if (phone.hold_music == nullptr) {
setHold(o);
......@@ -133,7 +132,7 @@ void p3::call::hold_toggle() {
mgr.getCaptureDevMedia().stopTransmit(*aud_med);
phone.hold_music->startTransmit(*aud_med);
}
hold = true;
isOnHold = true;
}
} catch (pj::Error& e) {
throw p3::perror("call:hold toggle", e.info());
......
......@@ -45,7 +45,7 @@ namespace p3 {
callState state;
bool ringing;
bool hold;
bool isOnHold;
bool mute;
pj::AudioMedia* aud_med;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment