aboutsummaryrefslogtreecommitdiffstats
path: root/addons/ooh323c/src/ooStackCmds.c
diff options
context:
space:
mode:
authormay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-24 22:42:11 +0000
committermay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-24 22:42:11 +0000
commit901630e56d49150925387fe59ec07fbdfd6e6021 (patch)
tree9f6b57f17d4c31304e70c47817e22f4cbde87ded /addons/ooh323c/src/ooStackCmds.c
parente9e6d14932447cf2767a8abdae04eef0017f3d8a (diff)
AST_CONTROL_CONNECTED_LINE frame type processing added to setup DisplayIE field
incorrect q.931 message order filtered on incoming calls (first msg must be setup, next must be not setup) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@242645 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'addons/ooh323c/src/ooStackCmds.c')
-rw-r--r--addons/ooh323c/src/ooStackCmds.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/addons/ooh323c/src/ooStackCmds.c b/addons/ooh323c/src/ooStackCmds.c
index f09d33405..4c732d538 100644
--- a/addons/ooh323c/src/ooStackCmds.c
+++ b/addons/ooh323c/src/ooStackCmds.c
@@ -494,6 +494,54 @@ OOStkCmdStat ooSendDTMFDigit(const char *callToken, const char* dtmf)
return OO_STKCMD_SUCCESS;
}
+OOStkCmdStat ooSetANI(const char *callToken, const char* ani)
+{
+ OOStackCommand cmd;
+ OOH323CallData *call;
+
+ if(!callToken)
+ {
+ return OO_STKCMD_INVALIDPARAM;
+ }
+
+ if(!(call = ooFindCallByToken(callToken))) {
+ return OO_STKCMD_INVALIDPARAM;
+ }
+
+ if(call->CmdChan == 0)
+ {
+ if(ooCreateCallCmdConnection(call) != OO_OK)
+ return OO_STKCMD_CONNECTIONERR;
+ }
+
+ memset(&cmd, 0, sizeof(OOStackCommand));
+ cmd.type = OO_CMD_SETANI;
+
+ cmd.param1 = (void*) malloc(strlen(callToken)+1);
+ cmd.param2 = (void*) malloc(strlen(ani)+1);
+ if(!cmd.param1 || !cmd.param2)
+ {
+ if(cmd.param1) free(cmd.param1); /* Release memory */
+ if(cmd.param2) free(cmd.param2);
+ return OO_STKCMD_MEMERR;
+ }
+ strcpy((char*)cmd.param1, callToken);
+ cmd.plen1 = strlen(callToken);
+ strcpy((char*)cmd.param2, ani);
+ cmd.plen2 = strlen(ani);
+
+ if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
+ {
+ free(cmd.param1);
+ free(cmd.param2);
+ return OO_STKCMD_WRITEERR;
+ }
+ free(cmd.param1);
+ free(cmd.param2);
+
+ return OO_STKCMD_SUCCESS;
+}
+
OOStkCmdStat ooRequestChangeMode(const char *callToken, int isT38Mode)
{
OOStackCommand cmd;