[Asterisk-cvs] asterisk-addons/asterisk-ooh323c/src chan_h323.c, 1.4, 1.5

vphirke at lists.digium.com vphirke at lists.digium.com
Tue Jul 19 09:50:21 CDT 2005


Update of /usr/cvsroot/asterisk-addons/asterisk-ooh323c/src
In directory mongoose.digium.com:/tmp/cvs-serv16722/src

Modified Files:
	chan_h323.c 
Log Message:
Fixed callerid problem

Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/src/chan_h323.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- chan_h323.c	27 Jun 2005 15:28:31 -0000	1.4
+++ chan_h323.c	19 Jul 2005 13:57:45 -0000	1.5
@@ -1279,6 +1279,7 @@
 int onNewCallCreated(ooCallData *call)
 {
    struct h323_pvt *p = NULL;
+   int i=0;
 
    if(gH323Debug)
       ast_verbose("---   onNewCallCreated %s\n", call->callToken);
@@ -1295,11 +1296,23 @@
       if(p->callerid_name){
          ooCallSetCallerId(call, p->callerid_name);
       }
-      /*      if(p->callerid_num)
+      if(p->callerid_num)
       {
-         ooCallSetCallingPartyNumber(call, p->callerid_num);
+         i=0;
+         while(*(p->callerid_num+i) != '\0')
+         {
+            if(!isdigit(*(p->callerid_num+i)))
+               break;
+            i++;
+         }
+         if(*(p->callerid_num+i) == '\0')
+            ooCallSetCallingPartyNumber(call, p->callerid_num);
+         else{
+            if(!p->callerid_name)
+               ooCallSetCallerId(call, p->callerid_num);
+         }
       }
-      */
+      
       if(!ast_strlen_zero(p->caller_h323id))
          ooCallAddAliasH323ID(call, p->caller_h323id);
       if(!ast_strlen_zero(p->caller_dialedDigits)){




More information about the svn-commits mailing list