** **
\*****************************************************************************/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <poll.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
#include "main.h"
/* note: recording log is written at endpoint */
}
-static void vbox_trace_header(class VBoxPort *vbox, char *message, int direction)
+static void vbox_trace_header(class VBoxPort *vbox, const char *message, int direction)
{
/* init trace with given values */
- start_trace(0,
+ start_trace(-1,
NULL,
- vbox?numberrize_callerinfo(vbox->p_callerinfo.id, vbox->p_callerinfo.ntype):NULL,
+ vbox?numberrize_callerinfo(vbox->p_callerinfo.id, vbox->p_callerinfo.ntype, options.national, options.international):NULL,
vbox?vbox->p_dialinginfo.id:NULL,
direction,
CATEGORY_CH,
int VBoxPort::handler(void)
{
struct lcr_msg *message;
- unsigned long tosend;
+ unsigned int tosend;
unsigned char buffer[ISDN_TRANSMIT];
time_t currenttime;
class Endpoint *epoint;
}
/* calculate the number of bytes */
- tosend = (unsigned long)((now_d-p_vbox_audio_start)*8000) - p_vbox_audio_transferred;
+ tosend = (unsigned int)((now_d-p_vbox_audio_start)*8000) - p_vbox_audio_transferred;
/* wait for more */
if (tosend < sizeof(buffer))
/*
* endpoint sends messages to the vbox port
*/
-int VBoxPort::message_epoint(unsigned long epoint_id, int message_id, union parameter *param)
+int VBoxPort::message_epoint(unsigned int epoint_id, int message_id, union parameter *param)
{
struct lcr_msg *message;
class Endpoint *epoint;
if (c[1] == '/')
SPRINT(filename, c+1);
else
- SPRINT(filename, "%s/%s/%s/vbox/%s", INSTALL_DATA, options.extensions_dir, p_vbox_ext.number);
+ SPRINT(filename, "%s/%s/vbox/%s", EXTENSION_DATA, p_vbox_ext.number);
*c = '\0';
} else
{
- SPRINT(filename, "%s/%s/%s/vbox/announcement", INSTALL_DATA, options.extensions_dir, p_vbox_ext.number);
+ SPRINT(filename, "%s/%s/vbox/announcement", EXTENSION_DATA, p_vbox_ext.number);
}
vbox_trace_header(this, "SETUP to VBox", DIRECTION_OUT);
add_trace("from", "id", "%s", param->setup.callerinfo.id);