}
/* now find out which is ACTIVE-IDLE and which is ACTIVE-HELD */
- if (our_pdss1->p_m_hold && !other_pdss1->p_m_hold) {
+ if (our_port->p_hold && !other_port->p_hold) {
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) our relation is on hold and other is active, so we move our relations to other relations\n", ea_endpoint->ep_serial);
remove_eapp_hold = this;
remove_eapp_active = other_eapp;
if (other_port->p_type==PORT_TYPE_POTS_FXS_OUT
|| other_port->p_type==PORT_TYPE_POTS_FXS_IN) { /* port is FXS */
other_fxs = (class Pfxs *)other_port;
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d) comparing other endpoint's port is of type isdn! comparing our portnum=%d with other's portnum=%d hold=%s state=%d\n", ea_endpoint->ep_serial, our_fxs->p_m_mISDNport->portnum, other_fxs->p_m_mISDNport->portnum, (other_fxs->p_m_hold)?"YES":"NO", other_fxs->p_state);
- if (1 //other_fxs->p_m_hold /* port is on hold */
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d) comparing other endpoint's port is of type isdn! comparing our portnum=%d with other's portnum=%d hold=%s state=%d\n", ea_endpoint->ep_serial, our_fxs->p_m_mISDNport->portnum, other_fxs->p_m_mISDNport->portnum, (other_fxs->p_hold)?"YES":"NO", other_fxs->p_state);
+ if (1 //other_fxs->p_hold /* port is on hold */
&& other_fxs->p_m_mISDNport == our_fxs->p_m_mISDNport) /* same isdn interface */
break;
} else {
}
/* now find out which is ACTIVE-IDLE and which is ACTIVE-HELD */
- if (our_fxs->p_m_hold && !other_fxs->p_m_hold) {
+ if (our_port->p_hold && !other_port->p_hold) {
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) our relation is on hold and other is active, so we move our relations to other relations\n", ea_endpoint->ep_serial);
remove_eapp = this;
remove_join = our_join;
if (other_port->p_type==PORT_TYPE_POTS_FXS_OUT
|| other_port->p_type==PORT_TYPE_POTS_FXS_IN) { /* port is isdn nt-mode */
other_fxs = (class Pfxs *)other_port;
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d) comparing other endpoint's port is of type FXS! comparing our portnum=%d with other's portnum=%d hold=%s state=%d\n", ea_endpoint->ep_serial, our_fxs->p_m_mISDNport->portnum, other_fxs->p_m_mISDNport->portnum, (other_fxs->p_m_hold)?"YES":"NO", other_fxs->p_state);
- if (1 //other_fxs->p_m_hold /* port is on hold */
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d) comparing other endpoint's port is of type FXS! comparing our portnum=%d with other's portnum=%d hold=%s state=%d\n", ea_endpoint->ep_serial, our_fxs->p_m_mISDNport->portnum, other_fxs->p_m_mISDNport->portnum, (other_fxs->p_hold)?"YES":"NO", other_fxs->p_state);
+ if (1 //other_fxs->p_hold /* port is on hold */
&& other_fxs->p_m_mISDNport == our_fxs->p_m_mISDNport) /* same pots interface */
break;
} else {
l1l2l3_trace_header(p_m_mISDNport, this, L3_HOLD_IND, DIRECTION_IN);
end_trace();
- if (!ACTIVE_EPOINT(p_epointlist) || p_m_hold) {
+ if (!ACTIVE_EPOINT(p_epointlist) || p_hold) {
l3m = create_l3msg();
l1l2l3_trace_header(p_m_mISDNport, this, L3_HOLD_REJECT_REQ, DIRECTION_OUT);
- enc_ie_cause(l3m, (p_m_mISDNport->locally)?LOCATION_PRIVATE_LOCAL:LOCATION_PRIVATE_REMOTE, p_m_hold?101:31); /* normal unspecified / incompatible state */
+ enc_ie_cause(l3m, (p_m_mISDNport->locally)?LOCATION_PRIVATE_LOCAL:LOCATION_PRIVATE_REMOTE, p_hold?101:31); /* normal unspecified / incompatible state */
add_trace("reason", NULL, "no endpoint");
end_trace();
p_m_mISDNport->ml3->to_layer3(p_m_mISDNport->ml3, MT_HOLD_REJECT, p_m_d_l3id, l3m);
drop_bchannel();
/* set hold state */
- p_m_hold = 1;
+ p_hold = 1;
#if 0
epoint = find_epoint_id(ACTIVE_EPOINT(p_epointlist));
if (epoint && p_m_d_ntmode) {
dec_ie_channel_id(l3m, &exclusive, &channel);
end_trace();
- if (!p_m_hold) {
+ if (!p_hold) {
cause = 101; /* incompatible state */
reject:
bchannel_event(p_m_mISDNport, p_m_b_index, B_EVENT_USE);
/* set hold state */
- p_m_hold = 0;
+ p_hold = 0;
unsched_timer(&p_m_timeout);
/* acknowledge retrieve */
PDEBUG(DEBUG_ISDN, "Pfxs(%s) bchannel is already active\n", p_name);
}
- if (p_m_hold) {
- p_m_hold = 0;
+ if (p_hold) {
+ p_hold = 0;
message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_NOTIFY);
message->param.notifyinfo.notify = INFO_NOTIFY_REMOTE_RETRIEVAL;
message->param.notifyinfo.local = 1; /* call is held by supplementary service */
drop_bchannel();
PDEBUG(DEBUG_ISDN, "Pfxs(%s) drop bchannel\n", p_name);
- p_m_hold = 1;
+ p_hold = 1;
}
void Pfxs::retrieve_ind(unsigned int cont)
PDEBUG(DEBUG_ISDN, "Pfxs(%s) bchannel is already active\n", p_name);
}
- p_m_hold = 0;
+ p_hold = 0;
message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_NOTIFY);
message->param.notifyinfo.notify = INFO_NOTIFY_REMOTE_RETRIEVAL;
message->param.notifyinfo.local = 1; /* call is held by supplementary service */
if (pots->p_m_mISDNport == p_m_mISDNport) {
if (pots != this)
any_call = 1;
- if (pots->p_state == PORT_STATE_CONNECT && !pots->p_m_hold)
+ if (pots->p_state == PORT_STATE_CONNECT && !pots->p_hold)
break; // found
}
}
trigger_work(&p_m_fxs_delete);
}
if (p_state == PORT_STATE_CONNECT) {
- if (!p_m_hold)
+ if (!p_hold)
set_tone("", "release");
else
trigger_work(&p_m_fxs_delete);
if ((port->p_type & PORT_CLASS_POTS_MASK) == PORT_CLASS_POTS_FXS) {
pots = (class Pfxs *)port;
if (pots->p_m_mISDNport == mISDNport) {
- if (pots->p_state == PORT_STATE_CONNECT && pots->p_m_hold) {
+ if (pots->p_state == PORT_STATE_CONNECT && pots->p_hold) {
if (pots->p_m_fxs_age > latest) {
latest = pots->p_m_fxs_age;
latest_pots = pots;
if ((port->p_type & PORT_CLASS_POTS_MASK) == PORT_CLASS_POTS_FXS) {
pots = (class Pfxs *)port;
if (pots->p_m_mISDNport == mISDNport) {
- if ((pots->p_state != PORT_STATE_CONNECT || !pots->p_m_hold) && pots != alerting_pots) {
+ if ((pots->p_state != PORT_STATE_CONNECT || !pots->p_hold) && pots != alerting_pots) {
PDEBUG(DEBUG_ISDN, "Pfxs(%s) release because pots-ring-after-hangup set and call not on hold / alerting\n", pots->p_name);
pots->hangup_ind(cont);
}
pots = (class Pfxs *)port;
if (pots->p_m_mISDNport == mISDNport) {
if (pots->p_state == PORT_STATE_CONNECT) {
- if (pots->p_m_hold) {
+ if (pots->p_hold) {
if (pots->p_m_fxs_age > latest) {
latest = pots->p_m_fxs_age;
latest_pots = pots;
p_m_b_exclusive = 0;
p_m_b_reserve = 0;
p_m_b_mode = mode;
- p_m_hold = 0;
p_m_tx_gain = mISDNport->ifport->interface->tx_gain;
p_m_rx_gain = mISDNport->ifport->interface->rx_gain;
p_m_conf = 0;
memset(&p_capainfo, 0, sizeof(p_capainfo));
p_echotest = 0;
p_bridge = 0;
+ p_hold = 0;
/* call recording */
p_record = NULL;
void bridge(unsigned int bridge_id); /* join a bridge */
int bridge_tx(unsigned char *data, int len); /* used to transmit data to remote port */
virtual int bridge_rx(unsigned char *data, int len); /* function to be inherited, so data is received */
+ int p_hold; /* if port is on hold */
/* state */
int p_state; /* state of port */
response->am[num].u.p.isdn = 1;
pdss1 = (class Pdss1 *)port;
response->am[num].u.p.isdn_chan = pdss1->p_m_b_channel;
- response->am[num].u.p.isdn_hold = pdss1->p_m_hold;
+ response->am[num].u.p.isdn_hold = pdss1->p_hold;
response->am[num].u.p.isdn_ces = pdss1->p_m_d_ces;
}
#endif