if (e_ext.rights < 1)
{
printlog("%3d action INTERN access to internal phones are denied for this caller.\n", ea_endpoint->ep_serial);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): internal call from terminal %s denied.\n", ea_endpoint->ep_serial, e_terminal);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): internal call from terminal %s denied.\n", ea_endpoint->ep_serial, e_ext.number);
new_state(EPOINT_STATE_OUT_DISCONNECT);
message_disconnect_port(portlist, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, "");
set_tone(portlist, "cause_81");
if (strchr(e_extdialing, '#'))
{
e_extdialing[0] = '\0';
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): '#' detected: terminal '%s' selected caller id '%s' and continues dialing: '%s'\n", ea_endpoint->ep_serial, e_terminal, e_callerinfo.id, e_extdialing);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): '#' detected: terminal '%s' selected caller id '%s' and continues dialing: '%s'\n", ea_endpoint->ep_serial, e_ext.number, e_callerinfo.id, e_extdialing);
}
/* eliminate digits before '*', which is a delete digit
*/
}
UCPY(p, p+1); /* remove '*' */
}
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s deleted digits and got new string: %s\n", ea_endpoint->ep_serial, e_terminal, e_extdialing);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s deleted digits and got new string: %s\n", ea_endpoint->ep_serial, e_ext.number, e_extdialing);
}
}
if (e_ext.rights < 2)
{
printlog("%3d action EXTERN calls are denied for this caller.\n", ea_endpoint->ep_serial);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): external call from terminal denied: %s\n", ea_endpoint->ep_serial, e_terminal);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): external call from terminal denied: %s\n", ea_endpoint->ep_serial, e_ext.number);
release(RELEASE_CALL, LOCATION_PRIVATE_LOCAL, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, 0);
set_tone(portlist, "cause_82");
denied:
if (e_ext.rights < 3)
{
printlog("%3d action EXTERN national calls are denied for this caller.\n", ea_endpoint->ep_serial);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): national call from terminal %s denied.\n", ea_endpoint->ep_serial, e_terminal);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): national call from terminal %s denied.\n", ea_endpoint->ep_serial, e_ext.number);
release(RELEASE_CALL, LOCATION_PRIVATE_LOCAL, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, 0);
set_tone(portlist, "cause_83");
goto denied;
if (e_ext.rights < 4)
{
printlog("%3d action EXTERN international calls are denied for this caller.\n", ea_endpoint->ep_serial);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): international call from terminal %s denied.\n", ea_endpoint->ep_serial, e_terminal);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): international call from terminal %s denied.\n", ea_endpoint->ep_serial, e_ext.number);
release(RELEASE_CALL, LOCATION_PRIVATE_LOCAL, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, 0);
set_tone(portlist, "cause_84");
goto denied;
return;
}
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s dialing extension: %s\n", ea_endpoint->ep_serial, e_terminal, rparam->string_value);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s dialing extension: %s\n", ea_endpoint->ep_serial, e_ext.number, rparam->string_value);
/* check if internal calls are denied */
if (e_ext.rights < 1)
{
printlog("%3d action VBOX-RECORD calls are denied for this caller.\n", ea_endpoint->ep_serial);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): internal call from terminal %s denied.\n", ea_endpoint->ep_serial, e_terminal);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): internal call from terminal %s denied.\n", ea_endpoint->ep_serial, e_ext.number);
new_state(EPOINT_STATE_OUT_DISCONNECT);
message_disconnect_port(portlist, CAUSE_REJECTED, LOCATION_PRIVATE_LOCAL, "");
set_tone(portlist, "cause_81");
}
ea_endpoint->ep_call_id = call->c_serial;
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s dialing room: %d\n", ea_endpoint->ep_serial, e_terminal, partyline);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s dialing room: %d\n", ea_endpoint->ep_serial, e_ext.number, partyline);
set_tone(portlist, "proceeding");
message = message_create(ea_endpoint->ep_serial, portlist->port_id, EPOINT_TO_PORT, MESSAGE_PROCEEDING);
printlog("%3d action CALL to '%s' hangs up.\n", ea_endpoint->ep_serial, e_dialinginfo.number);
/* check */
- if (e_terminal[0] == '\0')
+ if (e_ext.number[0] == '\0')
{
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last dialed number '%s' because caller is unknown (not internal).\n", ea_endpoint->ep_serial, e_terminal, e_dialinginfo.number);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last dialed number '%s' because caller is unknown (not internal).\n", ea_endpoint->ep_serial, e_ext.number, e_dialinginfo.number);
return;
}
- if (!(read_extension(&e_ext, e_terminal)))
+ if (!(read_extension(&e_ext, e_ext.number)))
{
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last dialed number '%s' because cannot read settings.\n", ea_endpoint->ep_serial, e_terminal, e_dialinginfo.number);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last dialed number '%s' because cannot read settings.\n", ea_endpoint->ep_serial, e_ext.number, e_dialinginfo.number);
return;
}
if (e_dialinginfo.number[0] == '\0')
{
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last dialed number because nothing was dialed.\n", ea_endpoint->ep_serial, e_terminal);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last dialed number because nothing was dialed.\n", ea_endpoint->ep_serial, e_ext.number);
return;
}
if (!strcmp(e_dialinginfo.number, e_ext.last_out[0]))
{
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last dialed number '%s' because it is identical with the last one.\n", ea_endpoint->ep_serial, e_terminal, e_dialinginfo.number);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last dialed number '%s' because it is identical with the last one.\n", ea_endpoint->ep_serial, e_ext.number, e_dialinginfo.number);
return;
}
/* insert */
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: storing last number '%s'.\n", ea_endpoint->ep_serial, e_terminal, e_dialinginfo.number);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: storing last number '%s'.\n", ea_endpoint->ep_serial, e_ext.number, e_dialinginfo.number);
i = MAX_REMEMBER-1;
while(i)
{
SCPY(e_ext.last_out[0], e_dialinginfo.number);
/* write extension */
- write_extension(&e_ext, e_terminal);
+ write_extension(&e_ext, e_ext.number);
}
}
/* we changed our extension */
- SCPY(e_terminal, extension);
+ SCPY(e_ext.number, extension);
new_state(EPOINT_STATE_CONNECT);
e_dtmf = 1;
e_connectedmode = 1;
if (!(rparam = routeparam(e_action, PARAM_NOPASSWORD)))
{
/* make call state to enter password */
- printlog("%3d action LOGIN to extension %s, ask for password.\n", ea_endpoint->ep_serial, e_terminal);
+ printlog("%3d action LOGIN to extension %s, ask for password.\n", ea_endpoint->ep_serial, e_ext.number);
new_state(EPOINT_STATE_IN_OVERLAP);
e_ruleset = NULL;
e_rule = NULL;
}
/* caller id complete, dialing with new caller id */
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: storing callerid '%s' for all following calls.\n", ea_endpoint->ep_serial, e_terminal, callerid);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: storing callerid '%s' for all following calls.\n", ea_endpoint->ep_serial, e_ext.number, callerid);
/* write new parameters */
- if (read_extension(&e_ext, e_terminal))
+ if (read_extension(&e_ext, e_ext.number))
{
if (callerid[0] == '\0')
{
if (!next) e_ext.id_next_call_type = -1;
PDEBUG(DEBUG_EPOINT, "EPOINT(%d): nationalized callerid: '%s' type=%d\n", ea_endpoint->ep_serial, (!next)?e_ext.callerid:e_ext.id_next_call, (!next)?e_ext.callerid_type:e_ext.id_next_call_type);
}
- write_extension(&e_ext, e_terminal);
+ write_extension(&e_ext, e_ext.number);
}
/* function activated */
dest = e_extdialing;
}
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: storing forwarding to '%s'.\n", ea_endpoint->ep_serial, e_terminal, dest);
- if (read_extension(&e_ext, e_terminal))
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: storing forwarding to '%s'.\n", ea_endpoint->ep_serial, e_ext.number, dest);
+ if (read_extension(&e_ext, e_ext.number))
{
switch(diversion)
{
SCPY(e_ext.cfp, dest);
break;
}
- write_extension(&e_ext, e_terminal);
+ write_extension(&e_ext, e_ext.number);
}
/* function (de)activated */
message_disconnect_port(portlist, CAUSE_NORMAL, LOCATION_PRIVATE_LOCAL, "");
SPRINT(message->param.notifyinfo.display, "(%d) %s vbox", e_select+1, last+5);
else
SPRINT(message->param.notifyinfo.display, "(%d) %s", e_select+1, (last[0])?last:"- empty -");
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s sending display:%s\n", ea_endpoint->ep_serial, e_terminal, message->param.notifyinfo.display);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s sending display:%s\n", ea_endpoint->ep_serial, e_ext.number, message->param.notifyinfo.display);
message_put(message);
logmessage(message);
}
/* send connect to avoid overlap timeout */
// new_state(EPOINT_STATE_CONNECT); connect may prevent further dialing
- if (e_terminal[0])
+ if (e_ext.number[0])
e_dtmf = 1;
memset(&e_connectinfo, 0, sizeof(e_connectinfo));
message = message_create(ea_endpoint->ep_serial, ea_endpoint->ep_portlist->port_id, EPOINT_TO_PORT, MESSAGE_CONNECT);
portlist = ea_endpoint->ep_portlist;
/* abbrev dialing is only possible if we have a caller defined */
- if (!e_terminal[0])
+ if (!e_ext.number[0])
{
printlog("%3d action ABBREVIATION only possible for internal callers.\n", ea_endpoint->ep_serial);
new_state(EPOINT_STATE_OUT_DISCONNECT);
abbrev = e_extdialing;
phone = NULL;
name = NULL;
- result = parse_phonebook(e_terminal, &abbrev, &phone, &name);
+ result = parse_phonebook(e_ext.number, &abbrev, &phone, &name);
if (result == 0)
{
printlog("%3d action ABBREVIATION '%s' not found.\n", ea_endpoint->ep_serial, abbrev);
case '3':
printlog("%3d action TESTMODE executing 'echo connect' test.\n", ea_endpoint->ep_serial);
new_state(EPOINT_STATE_CONNECT);
- if (e_terminal[0])
+ if (e_ext.number[0])
e_dtmf = 1;
set_tone(portlist, NULL);
memset(&e_connectinfo, 0, sizeof(e_connectinfo));
case '4':
printlog("%3d action TESTMODE executing 'tone connect' test.\n", ea_endpoint->ep_serial);
new_state(EPOINT_STATE_CONNECT);
- if (e_terminal[0])
+ if (e_ext.number[0])
e_dtmf = 1;
memset(&e_connectinfo, 0, sizeof(e_connectinfo));
message = message_create(ea_endpoint->ep_serial, portlist->port_id, EPOINT_TO_PORT, MESSAGE_CONNECT);
case '5':
printlog("%3d action TESTMODE executing 'hold music' test.\n", ea_endpoint->ep_serial);
new_state(EPOINT_STATE_CONNECT);
- if (e_terminal[0])
+ if (e_ext.number[0])
e_dtmf = 1;
memset(&e_connectinfo, 0, sizeof(e_connectinfo));
message = message_create(ea_endpoint->ep_serial, portlist->port_id, EPOINT_TO_PORT, MESSAGE_CONNECT);
cause = 0;
printlog("%3d action TESTMODE executing 'announcement' test with cause %d.\n", ea_endpoint->ep_serial, cause);
new_state(EPOINT_STATE_CONNECT);
- if (e_terminal[0])
+ if (e_ext.number[0])
e_dtmf = 1;
SPRINT(causestr,"cause_%02x",cause);
memset(&e_connectinfo, 0, sizeof(e_connectinfo));
case '9': /* text callerid test */
printlog("%3d action TESTMODE executing 'caller id' test.\n", ea_endpoint->ep_serial);
new_state(EPOINT_STATE_CONNECT);
- if (e_terminal[0])
+ if (e_ext.number[0])
e_dtmf = 1;
memset(&e_connectinfo, 0, sizeof(e_connectinfo));
SCPY(e_connectinfo.id, "12345678");
goto disconnect;
}
- if (e_terminal[0])
+ if (e_ext.number[0])
e_dtmf = 1;
set_tone(ea_endpoint->ep_portlist, rparam->string_value);
/* display dialing */
message = message_create(ea_endpoint->ep_serial, portlist->port_id, EPOINT_TO_PORT, MESSAGE_NOTIFY);
SPRINT(message->param.notifyinfo.display, ">%s", e_extdialing);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s displaying interpreted dialing '%s' internal values: %f %f\n", ea_endpoint->ep_serial, e_terminal, e_extdialing, value1, value2);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s displaying interpreted dialing '%s' internal values: %f %f\n", ea_endpoint->ep_serial, e_ext.number, e_extdialing, value1, value2);
message_put(message);
logmessage(message);
//SCAT(dialing, e_dialinginfo.number);
SCPY(e_dialinginfo.number, dialing);
e_extdialing = e_dialinginfo.number+strlen(numbering->prefix);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s selected a new menu '%s' dialing: %s\n", ea_endpoint->ep_serial, e_terminal, numb_actions[numbering->action], e_dialinginfo.number);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s selected a new menu '%s' dialing: %s\n", ea_endpoint->ep_serial, e_ext.number, numb_actions[numbering->action], e_dialinginfo.number);
nesting?:
process_dialing();
return;
/* send display message to port */
message = message_create(ea_endpoint->ep_serial, ea_endpoint->ep_portlist->port_id, EPOINT_TO_PORT, MESSAGE_NOTIFY);
SPRINT(message->param.notifyinfo.display, ">%s %s%s%s", numbering->prefix, numb_actions[numbering->action], (numbering->param[0])?" ":"", numbering->param);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s selected a new menu '%s' sending display:%s\n", ea_endpoint->ep_serial, e_terminal, numb_actions[numbering->action], message->param.notifyinfo.display);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s selected a new menu '%s' sending display:%s\n", ea_endpoint->ep_serial, e_ext.number, numb_actions[numbering->action], message->param.notifyinfo.display);
message_put(message);
logmessage(message);
#endif
if (command[0] == '\0')
{
printlog("%3d action EXECUTE no 'execute' parameter given at routing.conf.\n", ea_endpoint->ep_serial);
- PERROR("EPOINT(%d): terminal %s: NO PARAMETER GIVEN for 'execute' action. see routing.conf\n", ea_endpoint->ep_serial, e_terminal);
+ PERROR("EPOINT(%d): terminal %s: NO PARAMETER GIVEN for 'execute' action. see routing.conf\n", ea_endpoint->ep_serial, e_ext.number);
return;
}
printlog("%3d action EXECUTE command='%s'\n", ea_endpoint->ep_serial, command);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: executing '%s'.\n", ea_endpoint->ep_serial, e_terminal, command);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: executing '%s'.\n", ea_endpoint->ep_serial, e_ext.number, command);
argv[0] = command;
while(strchr(argv[0], '/'))
if (file[0] == '\0')
{
printlog("%3d action FILE no filename given.\n", ea_endpoint->ep_serial);
- PERROR("EPOINT(%d): terminal %s: NO FILENAME GIVEN for 'file' action. see routing.conf\n", ea_endpoint->ep_serial, e_terminal);
+ PERROR("EPOINT(%d): terminal %s: NO FILENAME GIVEN for 'file' action. see routing.conf\n", ea_endpoint->ep_serial, e_ext.number);
return;
}
if (!(fp = fopen(file, mode)))
{
printlog("%3d action FILE file '%s' cannot be opened. (errno = %d)\n", ea_endpoint->ep_serial, file, errno);
- PERROR("EPOINT(%d): terminal %s: given file '%s' cannot be opened. see routing.conf\n", ea_endpoint->ep_serial, e_terminal, file);
+ PERROR("EPOINT(%d): terminal %s: given file '%s' cannot be opened. see routing.conf\n", ea_endpoint->ep_serial, e_ext.number, file);
return;
}
printlog("%3d action FILE file='%s' content='%s'\n", ea_endpoint->ep_serial, file, content);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: writing file '%s' with content '%s'.\n", ea_endpoint->ep_serial, e_terminal, file, content);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: writing file '%s' with content '%s'.\n", ea_endpoint->ep_serial, e_ext.number, file, content);
fprintf(fp, "%s\n", content);
fclose(fp);
}
if (e_action)
if (e_action->index == ACTION_PASSWORD_WRITE)
{
- append_callbackauth(e_terminal, &e_callbackinfo);
+ append_callbackauth(e_ext.number, &e_callbackinfo);
printlog("%3d action PASSWORD WRITE password written\n", ea_endpoint->ep_serial);
}
if (!portlist)
{
portlist_error:
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): note: dialing call requires exactly one port object to process dialing. this case could happen due to a parked call. we end dialing here.\n", ea_endpoint->ep_serial, e_terminal);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): note: dialing call requires exactly one port object to process dialing. this case could happen due to a parked call. we end dialing here.\n", ea_endpoint->ep_serial, e_ext.number);
e_action_timeout = 0;
e_match_timeout = 0;
return;
if (e_match_timeout && now_d>=e_match_timeout)
{
/* return timeout rule */
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal '%s' dialing: '%s', timeout in ruleset '%s'\n", ea_endpoint->ep_serial, e_terminal, e_dialinginfo.number, e_ruleset->name);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal '%s' dialing: '%s', timeout in ruleset '%s'\n", ea_endpoint->ep_serial, e_ext.number, e_dialinginfo.number, e_ruleset->name);
e_match_timeout = 0;
e_action = e_match_to_action;
e_extdialing = e_match_to_extdialing;
{
//PDEBUG(~0, "HANG-BUG-DEBUGGING: before routing\n");
/* check for matching rule */
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal '%s' dialing: '%s', checking matching rule of ruleset '%s'\n", ea_endpoint->ep_serial, e_terminal, e_dialinginfo.number, e_ruleset->name);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal '%s' dialing: '%s', checking matching rule of ruleset '%s'\n", ea_endpoint->ep_serial, e_ext.number, e_dialinginfo.number, e_ruleset->name);
if (e_ruleset)
{
e_action = route(e_ruleset);
}
if (!e_action)
{
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): no rule within the current ruleset matches yet.\n", ea_endpoint->ep_serial, e_terminal);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): no rule within the current ruleset matches yet.\n", ea_endpoint->ep_serial, e_ext.number);
goto display;
}
if (action_defs[e_action->index].init_func)
{
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: current action '%s' has a init function, so we call it...\n", ea_endpoint->ep_serial, e_terminal, action_defs[e_action->index].name);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: current action '%s' has a init function, so we call it...\n", ea_endpoint->ep_serial, e_ext.number, action_defs[e_action->index].name);
(this->*(action_defs[e_action->index].init_func))();
}
if (e_state!=EPOINT_STATE_IN_SETUP
}
/* show what we are doing */
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal '%s' action: %s (dialing '%s')\n", ea_endpoint->ep_serial, e_terminal, action_defs[e_action->index].name, e_extdialing);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal '%s' action: %s (dialing '%s')\n", ea_endpoint->ep_serial, e_ext.number, action_defs[e_action->index].name, e_extdialing);
/* go to action's dialing function */
if (action_defs[e_action->index].dialing_func)
{
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: current action '%s' has a dialing function, so we call it...\n", ea_endpoint->ep_serial, e_terminal, action_defs[e_action->index].name);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: current action '%s' has a dialing function, so we call it...\n", ea_endpoint->ep_serial, e_ext.number, action_defs[e_action->index].name);
(this->*(action_defs[e_action->index].dialing_func))();
}
SPRINT(message->param.notifyinfo.display, "%s%s%s", action_defs[e_action->index].name, (e_extdialing[0])?" ":"", e_extdialing);
}
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s displaying interpreted dialing '%s'\n", ea_endpoint->ep_serial, e_terminal, message->param.notifyinfo.display);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s displaying interpreted dialing '%s'\n", ea_endpoint->ep_serial, e_ext.number, message->param.notifyinfo.display);
message_put(message);
logmessage(message);
}
char callertext[256], dialingtext[256];
int writeext = 0, i;
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal '%s'\n", ea_endpoint->ep_serial, e_terminal);
- if (e_terminal[0])
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal '%s'\n", ea_endpoint->ep_serial, e_ext.number);
+ if (e_ext.number[0])
{
- if (read_extension(&e_ext, e_terminal))
+ if (read_extension(&e_ext, e_ext.number))
writeext = 0x10;
if (!e_start)
} else
if (!e_stop)
time(&e_stop);
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): writing connect from %s to %s into logfile of %s\n", ea_endpoint->ep_serial, e_callerinfo.id, e_dialinginfo.number, e_terminal);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): writing connect from %s to %s into logfile of %s\n", ea_endpoint->ep_serial, e_callerinfo.id, e_dialinginfo.number, e_ext.number);
switch(e_dialinginfo.itype)
{
case INFO_ITYPE_CHAN:
UNPRINT(strchr(callertext,'\0'), sizeof(callertext)-1+strlen(callertext), " (intern %s)", e_callerinfo.intern);
if (e_callerinfo.voip[0]) /* add voip if present */
UNPRINT(strchr(callertext,'\0'), sizeof(callertext)-1+strlen(callertext), " (voip %s)", e_callerinfo.voip);
- write_log(e_terminal, callertext, dialingtext, e_start, e_stop, 0, cause, location);
+ write_log(e_ext.number, callertext, dialingtext, e_start, e_stop, 0, cause, location);
/* store last received call for reply-list */
if (e_callerinfo.id[0] || e_callerinfo.intern[0])
}
SCPY(e_ext.last_in[0], callertext);
writeext |= 1; /* store extension later */
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: storing last received caller id '%s'.\n", ea_endpoint->ep_serial, e_terminal, e_ext.last_in[0]);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: storing last received caller id '%s'.\n", ea_endpoint->ep_serial, e_ext.number, e_ext.last_in[0]);
} else
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last received id '%s' because it is identical with the last one.\n", ea_endpoint->ep_serial, e_terminal, callertext);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: cannot store last received id '%s' because it is identical with the last one.\n", ea_endpoint->ep_serial, e_ext.number, callertext);
}
}
/* write extension if needed */
if (writeext == 0x11)
- write_extension(&e_ext, e_terminal);
+ write_extension(&e_ext, e_ext.number);
if (e_action)
{
if (action_defs[e_action->index].hangup_func)
{
- PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: current action '%s' has a hangup function, so we call it...\n", ea_endpoint->ep_serial, e_terminal, action_defs[e_action->index].name);
+ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal %s: current action '%s' has a hangup function, so we call it...\n", ea_endpoint->ep_serial, e_ext.number, action_defs[e_action->index].name);
(this->*(action_defs[e_action->index].hangup_func))();
}
}