From: Andreas Eversberg Date: Tue, 21 Aug 2012 07:44:33 +0000 (+0200) Subject: Fix: Track notification messages at partyline too X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=commitdiff_plain;h=0562b894ff8302ad4ca2d0df1f659cc18f6af5fb Fix: Track notification messages at partyline too This is required, so inactive parties will be marked as beeing "on hold". These parties will be removed from the bridge, so the partyline is not disturbed by hold music comming from inactive parties. Thanx to Atul for pointing to this bug. --- diff --git a/joinpbx.cpp b/joinpbx.cpp index 6e995f3..c3e9e31 100644 --- a/joinpbx.cpp +++ b/joinpbx.cpp @@ -695,6 +695,26 @@ void JoinPBX::message_epoint(unsigned int epoint_id, int message_type, union par } break; + /* track notify */ + case MESSAGE_NOTIFY: + switch(param->notifyinfo.notify) { + case INFO_NOTIFY_USER_SUSPENDED: + case INFO_NOTIFY_USER_RESUMED: + case INFO_NOTIFY_REMOTE_HOLD: + case INFO_NOTIFY_REMOTE_RETRIEVAL: + case INFO_NOTIFY_CONFERENCE_ESTABLISHED: + case INFO_NOTIFY_CONFERENCE_DISCONNECTED: + new_state = track_notify(relation->rx_state, param->notifyinfo.notify); + if (new_state != relation->rx_state) { + relation->rx_state = new_state; + trigger_work(&j_updatebridge); + if (options.deb & DEBUG_JOIN) + joinpbx_debug(this, "Join::message_epoint{after setting new rx state}"); + } + break; + } + break; + case MESSAGE_DISCONNECT: PDEBUG(DEBUG_JOIN, "releasing after receiving disconnect, because join in partyline mode.\n"); message = message_create(j_serial, epoint_id, JOIN_TO_EPOINT, MESSAGE_RELEASE);