+ /* process party line */
+ if (message_type == MESSAGE_SETUP) if (param->setup.partyline && !j_partyline)
+ {
+ j_partyline = param->setup.partyline;
+ j_partyline_jingle = param->setup.partyline_jingle;
+ }
+ if (j_partyline)
+ {
+ switch(message_type)
+ {
+ case MESSAGE_SETUP:
+ PDEBUG(DEBUG_JOIN, "respsone with connect in partyline mode.\n");
+ relation->type = RELATION_TYPE_CONNECT;
+ message = message_create(j_serial, epoint_id, JOIN_TO_EPOINT, MESSAGE_CONNECT);
+ SPRINT(message->param.connectinfo.id, "%d", j_partyline);
+ message->param.connectinfo.ntype = INFO_NTYPE_UNKNOWN;
+ message_put(message);
+ j_updatebridge = 1; /* update bridge flag */
+ if (j_partyline_jingle)
+ play_jingle(1);
+ break;
+
+ case MESSAGE_AUDIOPATH:
+ PDEBUG(DEBUG_JOIN, "join received channel message: %d.\n", param->audiopath);
+ if (relation->channel_state != param->audiopath)
+ {
+ relation->channel_state = param->audiopath;
+ j_updatebridge = 1; /* update bridge flag */
+ if (options.deb & DEBUG_JOIN)
+ joinpbx_debug(this, "Join::message_epoint{after setting new channel state}");
+ }
+ 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);
+ message->param.disconnectinfo.cause = CAUSE_NORMAL;
+ message->param.disconnectinfo.location = LOCATION_PRIVATE_LOCAL;
+ message_put(message);
+ // fall through
+
+ case MESSAGE_RELEASE:
+ PDEBUG(DEBUG_JOIN, "releasing from join\n");
+ release(relation, 0, 0);
+ if (j_partyline_jingle)
+ play_jingle(0);
+ break;
+
+ default:
+ PDEBUG(DEBUG_JOIN, "ignoring message, because join in partyline mode.\n");
+ }
+ return;
+ }
+
+
+ /* process messages */