From 026b04fc75011a144285f399b82890803b4315bd Mon Sep 17 00:00:00 2001 From: Super User Date: Sun, 1 Jun 2008 18:52:10 +0200 Subject: LCR is now uses socket based mISDN V2 API *** chan_lcr, the Asterisk interface works (not complete yet). -> LCR can be used as Asterisk channel driver. modified: Makefile modified: Makefile.am modified: README modified: action.cpp modified: apppbx.cpp modified: bchannel.c modified: bchannel.h modified: callerid.c modified: cause.c modified: chan_lcr.c modified: chan_lcr.h modified: configure.ac modified: default/routing.conf modified: dss1.cpp modified: dss1.h modified: genrc.c modified: ie.cpp modified: interface.c modified: lcradmin.c modified: mISDN.cpp modified: mISDN.h modified: main.c modified: main.h modified: message.h modified: myisdn.h modified: route.c modified: socket_server.c modified: trace.h --- callerid.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'callerid.c') diff --git a/callerid.c b/callerid.c index 47b51da..7d13f16 100644 --- a/callerid.c +++ b/callerid.c @@ -9,19 +9,23 @@ ** ** \*****************************************************************************/ -#include "main.h" +#include +#include +#include "extension.h" +#include "message.h" +#include "callerid.h" /* create caller id from digits by comparing with national and international * prefixes. */ char *nationalize_callerinfo(char *string, int *ntype, char *national, char *international) { - if (!strncmp(options.international, string, strlen(options.international))) + if (!strncmp(international, string, strlen(international))) { *ntype = INFO_NTYPE_INTERNATIONAL; return(string+strlen(international)); } - if (!strncmp(options.national, string, strlen(options.national))) + if (!strncmp(national, string, strlen(national))) { *ntype = INFO_NTYPE_NATIONAL; return(string+strlen(national)); @@ -40,14 +44,16 @@ char *numberrize_callerinfo(char *string, int ntype, char *national, char *inter switch(ntype) { case INFO_NTYPE_INTERNATIONAL: - UCPY(result, international); - SCAT(result, string); + strcpy(result, international); + strncat(result, string, sizeof(result)); + result[sizeof(result)-1] = '\0'; return(result); break; case INFO_NTYPE_NATIONAL: - UCPY(result, national); - SCAT(result, string); + strcpy(result, national); + strncat(result, string, sizeof(result)); + result[sizeof(result)-1] = '\0'; return(result); break; -- cgit v1.2.3-55-g7522