[svn-commits] may: branch may/chan_ooh323_rework r223802 - in /team/may/chan_ooh323_rework/...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Oct 12 18:00:50 CDT 2009
Author: may
Date: Mon Oct 12 18:00:47 2009
New Revision: 223802
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=223802
Log:
changed logic of sendging tcs and msd
remove duplicate dtmf if there is duration info in userinput message
Modified:
team/may/chan_ooh323_rework/addons/ooh323c/src/ooCalls.h
team/may/chan_ooh323_rework/addons/ooh323c/src/ooh245.c
team/may/chan_ooh323_rework/addons/ooh323c/src/ooh323.c
team/may/chan_ooh323_rework/addons/ooh323cDriver.h
Modified: team/may/chan_ooh323_rework/addons/ooh323c/src/ooCalls.h
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_rework/addons/ooh323c/src/ooCalls.h?view=diff&rev=223802&r1=223801&r2=223802
==============================================================================
--- team/may/chan_ooh323_rework/addons/ooh323c/src/ooCalls.h (original)
+++ team/may/chan_ooh323_rework/addons/ooh323c/src/ooCalls.h Mon Oct 12 18:00:47 2009
@@ -209,6 +209,8 @@
H235TimeStamp alertingTime, connectTime, endTime; /* time data for gatekeeper */
FastStartResponse *pFastStartRes; /* fast start response */
char rtpMask[20];
+ char lastDTMF;
+ ASN1UINT nextDTMFstamp;
void *usrData; /*!<User can set this to user specific data*/
struct OOH323CallData* next;
struct OOH323CallData* prev;
Modified: team/may/chan_ooh323_rework/addons/ooh323c/src/ooh245.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_rework/addons/ooh323c/src/ooh245.c?view=diff&rev=223802&r1=223801&r2=223802
==============================================================================
--- team/may/chan_ooh323_rework/addons/ooh323c/src/ooh245.c (original)
+++ team/may/chan_ooh323_rework/addons/ooh323c/src/ooh245.c Mon Oct 12 18:00:47 2009
@@ -2882,6 +2882,24 @@
}
else if((indication->t == T_H245UserInputIndication_signal) &&
(call->dtmfmode & OO_CAP_DTMF_H245_signal)) {
+ if(call->lastDTMF && indication->u.signal->signalType[0] == call->lastDTMF &&
+ call->nextDTMFstamp && indication->u.signal->m.rtpPresent &&
+ indication->u.signal->rtp.m.timestampPresent) {
+ if(call->nextDTMFstamp > indication->u.signal->rtp.timestamp) {
+ OOTRACEERR4("Duplicate dtmf %c on ((%s, %s)\n", call->lastDTMF, call->callType,
+ call->callToken);
+ return OO_OK;
+ }
+ }
+ if (indication->u.signal->m.rtpPresent && indication->u.signal->rtp.m.timestampPresent &&
+ indication->u.signal->m.durationPresent) {
+ call->nextDTMFstamp = indication->u.signal->rtp.timestamp +
+ indication->u.signal->duration;
+ call->lastDTMF = indication->u.signal->signalType[0];
+ } else {
+ call->nextDTMFstamp = 0;
+ call->lastDTMF = 0;
+ }
if(gH323ep.h323Callbacks.onReceivedDTMF)
gH323ep.h323Callbacks.onReceivedDTMF(call,
indication->u.signal->signalType);
Modified: team/may/chan_ooh323_rework/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_rework/addons/ooh323c/src/ooh323.c?view=diff&rev=223802&r1=223801&r2=223802
==============================================================================
--- team/may/chan_ooh323_rework/addons/ooh323c/src/ooh323.c (original)
+++ team/may/chan_ooh323_rework/addons/ooh323c/src/ooh323.c Mon Oct 12 18:00:47 2009
@@ -111,12 +111,6 @@
}
if(!strcmp(pChannel->dir, "transmit"))
{
- /* May 20090728 */
- if (!epCapIsPreferred(call, pChannel->chanCap)) {
- ret =ooSendCapsAndMSdeterm(call);
- if (ret != OO_OK)
- return ret;
- }
if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
@@ -222,6 +216,10 @@
return OO_FAILED;
}
}
+ } else if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
+ ret =ooSendCapsAndMSdeterm(call);
+ if (ret != OO_OK)
+ return ret;
}
return OO_OK;
}
@@ -666,13 +664,6 @@
}
if(!strcmp(pChannel->dir, "transmit"))
{
- /* May 20090728 */
- if (!epCapIsPreferred(call, pChannel->chanCap)) {
- ret =ooSendCapsAndMSdeterm(call);
- if (ret != OO_OK)
- return ret;
- }
-
if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
@@ -785,6 +776,10 @@
return OO_FAILED;
}
}
+ } else if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
+ ret =ooSendCapsAndMSdeterm(call);
+ if (ret != OO_OK)
+ return ret;
}
return OO_OK;
}
@@ -891,13 +886,6 @@
}
if(!strcmp(pChannel->dir, "transmit"))
{
- /* May 20090728 */
- if (!epCapIsPreferred(call, pChannel->chanCap)) {
- ret =ooSendCapsAndMSdeterm(call);
- if (ret != OO_OK)
- return ret;
- }
-
if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
@@ -1010,6 +998,10 @@
return OO_FAILED;
}
}
+ } else if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
+ ret =ooSendCapsAndMSdeterm(call);
+ if (ret != OO_OK)
+ return ret;
}
@@ -1117,14 +1109,6 @@
}
if(!strcmp(pChannel->dir, "transmit"))
{
- /* May 20090728 */
- if (!epCapIsPreferred(call, pChannel->chanCap)) {
- ret =ooSendCapsAndMSdeterm(call);
- if (ret != OO_OK)
- return ret;
- }
-
-
if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
@@ -1237,6 +1221,10 @@
return OO_FAILED;
}
}
+ } else if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
+ ret =ooSendCapsAndMSdeterm(call);
+ if (ret != OO_OK)
+ return ret;
}
return OO_OK;
Modified: team/may/chan_ooh323_rework/addons/ooh323cDriver.h
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_rework/addons/ooh323cDriver.h?view=diff&rev=223802&r1=223801&r2=223802
==============================================================================
--- team/may/chan_ooh323_rework/addons/ooh323cDriver.h (original)
+++ team/may/chan_ooh323_rework/addons/ooh323cDriver.h Mon Oct 12 18:00:47 2009
@@ -27,14 +27,16 @@
#define H323_DTMF_H245ALPHANUMERIC (1 << 2)
#define H323_DTMF_H245SIGNAL (1 << 3)
#define H323_DTMF_INBAND (1 << 4)
+#define H323_DTMF_CISCO (1 << 5)
#define H323_DTMF_INBANDRELAX (1 << 8)
struct h323_pvt;
int ooh323c_start_stack_thread(void);
int ooh323c_stop_stack_thread(void);
int ooh323c_set_capability
- (struct ast_codec_pref *prefs, int capability, int dtmf);
+ (struct ast_codec_pref *prefs, int capability, int dtmf, int dtmfcodec);
int convertH323CapToAsteriskCap(int cap);
int ooh323c_set_capability_for_call
- (ooCallData *call, struct ast_codec_pref *prefs, int capability, int dtmf, int t38support);
+ (ooCallData *call, struct ast_codec_pref *prefs, int capability, int dtmf, int dtmfcodec,
+ int t38support);
#endif
More information about the svn-commits
mailing list