lc not found - it's warning, not error,
[asterisk/asterisk.git] / addons / ooh323c / src / ooCmdChannel.c
index 003a5df..ff39882 100644 (file)
@@ -14,8 +14,8 @@
  *
  *****************************************************************************/
 
-#include <asterisk.h>
-#include <asterisk/lock.h>
+#include "asterisk.h"
+#include "asterisk/lock.h"
 #include "ooStackCmds.h"
 #include "ootrace.h"
 #include "ooq931.h"
@@ -56,7 +56,7 @@ int ooCreateCallCmdConnection(OOH323CallData* call)
 
     OOTRACEINFO2("INFO: create cmd connect for call: %lx\n", call);
 
-   call->CmdChanLock = malloc(sizeof(ast_mutex_t));
+   call->CmdChanLock = ast_calloc(1, sizeof(ast_mutex_t));
    ast_mutex_init(call->CmdChanLock);
 
 
@@ -402,6 +402,15 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
               ooSendRequestMode(call, *(int *)cmd.param2);
               break;
 
+           case OO_CMD_SETANI:
+               OOTRACEINFO3("Processing SetANI command %s, ani is %s\n",
+                               (char *)cmd.param1, (char *)cmd.param2);
+               if(cmd.param2) {
+                       strncpy(call->ourCallerId, cmd.param2, sizeof(call->ourCallerId)-1);
+                       call->ourCallerId[sizeof(call->ourCallerId)-1] = '\0';
+               }
+               break;
+
             default: OOTRACEERR1("ERROR:Unknown command\n");
          }
       }