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 */
SCPY(e_dialinginfo.id, e_extdialing);
e_extdialing = e_dialinginfo.id;
}
+ /* add prefix */
+ if ((rparam = routeparam(e_action, PARAM_PREFIX))) {
+ char extdialing[256];
+ SCPY(extdialing, e_extdialing);
+ SPRINT(e_dialinginfo.id, "%s%s", rparam->string_value, extdialing);
+ e_extdialing = e_dialinginfo.id;
+ }
+
}
/* play sample */
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;
}
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_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
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;
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;
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;
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;
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;