end_trace();
release(RELEASE_JOIN, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL, 0, 0, 0);
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNALLOCATED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNALLOCATED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_86");
return;
}
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
release(RELEASE_JOIN, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL, 0, 0, 0);
- message_disconnect_port(portlist, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_81");
return;
}
release(RELEASE_JOIN, LOCATION_PRIVATE_LOCAL, CAUSE_REJECTED, 0, 0, 0);
set_tone(portlist, "cause_82");
denied:
- message_disconnect_port(portlist, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, "", NULL);
new_state(EPOINT_STATE_OUT_DISCONNECT);
return;
}
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
return;
}
add_trace("extension", NULL, "%s", rparam->string_value);
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNALLOCATED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNALLOCATED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_86");
return;
}
trace_header("ACTION vbox-record (internal calls are denied)", DIRECTION_NONE);
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_81");
return;
}
end_trace();
noroom:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
return;
}
end_trace();
/* extension doesn't exist */
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNALLOCATED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNALLOCATED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_86");
return;
}
/* service not available */
trace_header("ACTION change-callerid (denied for this caller)", DIRECTION_NONE);
end_trace();
- message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "", NULL);
new_state(EPOINT_STATE_OUT_DISCONNECT);
set_tone(portlist,"cause_87");
return;
add_trace("new", "caller id", "%s", numberrize_callerinfo(new_id, new_type, options.national, options.international));
add_trace("new", "present", "%s", (new_present==INFO_PRESENT_RESTRICTED)?"restricted":"allowed");
end_trace();
- message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "", NULL);
new_state(EPOINT_STATE_OUT_DISCONNECT);
set_tone(portlist,"activated");
}
trace_header("ACTION change-forward (denied for this caller)", DIRECTION_NONE);
end_trace();
/* service not available */
- message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "", NULL);
new_state(EPOINT_STATE_OUT_DISCONNECT);
set_tone(portlist,"cause_87");
return;
write_extension(&e_ext, e_ext.number);
}
/* function (de)activated */
- message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "", NULL);
new_state(EPOINT_STATE_OUT_DISCONNECT);
if (dest[0])
set_tone(portlist,"activated");
trace_header("ACTION redial/reply (no last number stored)", DIRECTION_NONE);
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
return;
}
trace_header("ACTION powerdial (no last number stored)", DIRECTION_NONE);
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
return;
}
disconnect:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
e_action = NULL;
e_cbcaller[0] = e_cbdialing[0] = '\0';
trace_header("ACTION abbreviation (only for extension)", DIRECTION_NONE);
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
return;
}
add_trace("abbrev", NULL, "%s", abbrev);
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNALLOCATED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNALLOCATED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_01");
return;
}
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
SPRINT(causestr,"cause_%02x",cause);
- message_disconnect_port(portlist, cause, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, cause, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, causestr);
break;
add_trace("cause", NULL, "16");
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "release");
break;
disconnect:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
e_action = NULL;
return;
disconnect:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_SERVICEUNAVAIL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
e_action = NULL;
return;
/* if the 'menu' was selected, we will flush all digits */
if (mode) {
e_dialinginfo.id[0] = 0;
+ e_dialinginfo.sending_complete = 0;
e_extdialing = e_dialinginfo.id;
} else {
/* remove digits that are required to match the rule */
new_state(EPOINT_STATE_OUT_DISCONNECT);
set_tone(portlist, cause_string);
if (!(rparam = routeparam(e_action, PARAM_CONNECT))) {
- message_disconnect_port(portlist, cause, location, display);
+ message_disconnect_port(portlist, cause, location, display, NULL);
} else {
message = message_create(ea_endpoint->ep_serial, ea_endpoint->ep_portlist->port_id, EPOINT_TO_PORT, MESSAGE_NOTIFY);
SCPY(message->param.notifyinfo.display, display);
e_connectedmode = 0;
e_dtmf = 0;
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_10");
return;
}
*/
void EndpointAppPBX::action_init_pots_retrieve(void)
{
+#ifdef ISDN_P_FXS_POTS
struct route_param *rparam;
struct port_list *portlist = ea_endpoint->ep_portlist;
class Port *port;
disconnect:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
e_action = NULL;
return;
goto disconnect;
}
-#ifdef ISDN_P_FXS_POTS
/* release our call */
ourfxs->hangup_ind(0);
/* retrieve selected call */
fxs->retrieve_ind(0);
-#endif
/* split if selected call is member of a 3pty */
epoint = find_epoint_id(ACTIVE_EPOINT(fxs->p_epointlist));
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) try spliting 3pty. this may fail because we don't have a 3pty.\n", epoint->ep_serial);
((class EndpointAppPBX *)epoint->ep_app)->split_3pty();
}
+#endif
}
*/
void EndpointAppPBX::action_init_pots_release(void)
{
+#ifdef ISDN_P_FXS_POTS
struct route_param *rparam;
struct port_list *portlist = ea_endpoint->ep_portlist;
class Port *port;
disconnect:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
e_action = NULL;
return;
#if 0
/* disconnect our call */
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "hangup");
e_action = NULL;
#endif
-#ifdef ISDN_P_FXS_POTS
/* release selected call */
fxs->hangup_ind(0);
-#endif
/* indicate timeout, so next action will be processed */
process_dialing(1);
+#endif
}
*/
void EndpointAppPBX::action_init_pots_reject(void)
{
+#ifdef ISDN_P_FXS_POTS
struct port_list *portlist = ea_endpoint->ep_portlist;
class Port *port;
class Pfxs *ourfxs, *fxs;
end_trace();
disconnect:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
e_action = NULL;
return;
goto disconnect;
}
-#ifdef ISDN_P_FXS_POTS
/* reject alerting call */
fxs->reject_ind(0);
-#endif
/* indicate timeout, so next action will be processed */
process_dialing(1);
+#endif
}
*/
void EndpointAppPBX::action_init_pots_answer(void)
{
+#ifdef ISDN_P_FXS_POTS
struct port_list *portlist = ea_endpoint->ep_portlist;
class Port *port;
class Pfxs *ourfxs, *fxs;
end_trace();
disconnect:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
e_action = NULL;
return;
goto disconnect;
}
-#ifdef ISDN_P_FXS_POTS
/* release our call */
ourfxs->hangup_ind(0);
*/
void EndpointAppPBX::action_init_pots_3pty(void)
{
+#ifdef ISDN_P_FXS_POTS
struct port_list *portlist = ea_endpoint->ep_portlist;
class Port *port;
class Pfxs *ourfxs, *fxs, *fxs1 = NULL, *fxs2 = NULL;
end_trace();
disconnect:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
e_action = NULL;
return;
goto disconnect;
}
-#ifdef ISDN_P_FXS_POTS
/* release our call */
ourfxs->hangup_ind(0);
-#endif
-#ifdef ISDN_P_FXS_POTS
/* retrieve latest active call */
if (fxs2->p_m_fxs_age > fxs1->p_m_fxs_age) {
fxs2->retrieve_ind(0);
fxs1->retrieve_ind(0);
epoint = find_epoint_id(ACTIVE_EPOINT(fxs2->p_epointlist));
}
-#else
- epoint = NULL;
-#endif
if (!epoint) {
trace_header("ACTION pots-3pty (interal error: no endpoint)", DIRECTION_NONE);
end_trace();
return;
}
+#endif
}
/* process pots-transfer
*/
void EndpointAppPBX::action_init_pots_transfer(void)
{
+#ifdef ISDN_P_FXS_POTS
struct route_param *rparam;
struct port_list *portlist = ea_endpoint->ep_portlist;
class Port *port;
disconnect:
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
e_action = NULL;
return;
goto disconnect;
}
-#ifdef ISDN_P_FXS_POTS
/* retrieve call */
if (fxs2->p_m_fxs_age > fxs1->p_m_fxs_age)
fxs2->retrieve_ind(0);
else
fxs1->retrieve_ind(0);
-#endif
/* bridge calls */
join_join_fxs();
+#endif
}
add_trace("max-levels", NULL, "%d", RULE_NESTING);
end_trace();
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
unsched_timer(&e_action_timeout);
unsched_timer(&e_match_timeout);
/* nothing more, so we release */
PDEBUG(DEBUG_ROUTE|DEBUG_EPOINT, "EPOINT(%d): action timed out, and we have no next action, so we disconnect.\n", ea_endpoint->ep_serial);
new_state(EPOINT_STATE_OUT_DISCONNECT);
- message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "", NULL);
set_tone(portlist, "cause_3f");
goto end;
}
goto end;
}
/* invalid dialing */
- message_disconnect_port(portlist, CAUSE_INCALID, LOCATION_PRIVATE_LOCAL, "");
+ message_disconnect_port(portlist, CAUSE_INCALID, LOCATION_PRIVATE_LOCAL, "", NULL);
message = message_create(ea_endpoint->ep_serial, portlist->port_id, EPOINT_TO_PORT, MESSAGE_DISCONNECT);
message->param.disconnectinfo.cause = CAUSE_INVALID;
message->param.disconnectinfo.location = LOCATION_PRIVATE_LOCAL;