[Asterisk-cvs] asterisk/res res_osp.c,1.1,1.2
markster at lists.digium.com
markster at lists.digium.com
Fri Jun 25 00:42:02 CDT 2004
Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv7361/res
Modified Files:
res_osp.c
Log Message:
Small outgoing OSP cleanups
Index: res_osp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_osp.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- res_osp.c 25 Jun 2004 03:59:07 -0000 1.1
+++ res_osp.c 25 Jun 2004 04:27:55 -0000 1.2
@@ -28,6 +28,7 @@
#include <asterisk/utils.h>
#include <asterisk/lock.h>
#include <asterisk/causes.h>
+#include <asterisk/callerid.h>
#include <osp.h>
#include <openssl/err.h>
#include <stdio.h>
@@ -434,6 +435,7 @@
char callednum[2048]="";
char destination[2048]="";
char token[2000];
+ char tmp[256]="", *l, *n;
OSPTCALLID *callid;
OSPE_DEST_PROT prot;
@@ -448,6 +450,16 @@
if (!callerid)
callerid = "";
+ strncpy(tmp, callerid, sizeof(tmp) - 1);
+ ast_callerid_parse(tmp, &n, &l);
+ if (!l)
+ l = "";
+ else {
+ ast_shrink_phone_number(l);
+ if (!ast_isphonenumber(l))
+ l = "";
+ }
+ callerid = l;
if (chan) {
strncpy(uniqueid, chan->uniqueid, sizeof(uniqueid) - 1);
More information about the svn-commits
mailing list