if (!(epoint = new Endpoint(0, 0)))
FATAL("No memory for Endpoint instance\n");
- if (!(epoint->ep_app = apppbx = new DEFAULT_ENDPOINT_APP(epoint, 1))) // outgoing
+ if (!(epoint->ep_app = apppbx = new EndpointAppPBX(epoint, 1))) // outgoing
FATAL("No memory for Endpoint Application instance\n");
apppbx->e_adminid = admin->sockserial;
admin->epointid = epoint->ep_serial;
interface = interface_first;
while(interface) {
ifport = interface->ifport;
+ if (!ifport)
+ i++;
while(ifport) {
i++;
ifport = ifport->next;
num = 0;
while(interface) {
ifport = interface->ifport;
+ if (!ifport) {
+ /* message */
+ response->am[num].message = ADMIN_RESPONSE_S_INTERFACE;
+ /* interface */
+ SCPY(response->am[num].u.i.interface_name, interface->name);
+ /* portnum */
+ response->am[num].u.i.portnum = -100; /* indicate: no ifport */
+ /* iftype */
+ response->am[num].u.i.extension = interface->extension;
+ /* block */
+ num++;
+ }
while(ifport) {
/* message */
response->am[num].message = ADMIN_RESPONSE_S_INTERFACE;
/*release endpoint if exists */
if (admin->epointid) {
epoint = find_epoint_id(admin->epointid);
- if (epoint) {
- ((class DEFAULT_ENDPOINT_APP *)epoint->ep_app)->
+ if (epoint && epoint->ep_app_type == EAPP_TYPE_PBX) {
+ ((class EndpointAppPBX *)epoint->ep_app)->
release(RELEASE_ALL, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL, 0);
}
}