[asterisk-commits] may: branch may/ooh323_ipv6_direct_rtp r301219 - in /team/may/ooh323_ipv6_dir...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jan 9 15:20:11 CST 2011
Author: may
Date: Sun Jan 9 15:20:01 2011
New Revision: 301219
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=301219
Log:
direct supported with and without fast start tunneling,
tested h323-h323, sip-h323.
to do - create option per peer/user
to research - early bridging (may be some changes
in app_dial will required)
Modified:
team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCalls.h
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCmdChannel.c
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooLogChan.c
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.c
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.h
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.h
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c
team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
team/may/ooh323_ipv6_direct_rtp/main/rtp_engine.c
Modified: team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c Sun Jan 9 15:20:01 2011
@@ -83,6 +83,7 @@
static enum ast_rtp_glue_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp);
static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *rtp,
struct ast_rtp_instance *vrtp, struct ast_rtp_instance *trtp, format_t codecs, int nat_active);
+static format_t ooh323_get_codec(struct ast_channel *chan);
static struct ast_udptl *ooh323_get_udptl_peer(struct ast_channel *chan);
static int ooh323_set_udptl_peer(struct ast_channel *chan, struct ast_udptl *udptl);
@@ -120,6 +121,7 @@
.get_rtp_info = ooh323_get_rtp_peer,
.get_vrtp_info = ooh323_get_vrtp_peer,
.update_peer = ooh323_set_rtp_peer,
+ .get_codec = ooh323_get_codec,
};
static struct ast_udptl_protocol ooh323_udptl = {
@@ -136,6 +138,7 @@
static struct ooh323_pvt {
ast_mutex_t lock; /* Channel private lock */
struct ast_rtp_instance *rtp;
+ struct ast_sockaddr redirip; /* redir ip */
struct ast_rtp_instance *vrtp; /* Placeholder for now */
int t38support; /* T.38 mode - disable, transparent, faxgw */
@@ -1168,6 +1171,7 @@
struct ooh323_pvt *p = (struct ooh323_pvt *) ast->tech_pvt;
char *callToken = (char *)NULL;
+ int res = 0;
if (!p) return -1;
@@ -1179,6 +1183,11 @@
if (gH323Debug)
ast_verbose(" ooh323_indicate - No callToken\n");
return -1;
+ }
+
+ /* 20110107 if we are redirected then we don't must generate any inband data */
+ if (!ast_sockaddr_isnull(&p->redirip)) {
+ res = 0;
}
if (gH323Debug)
@@ -1291,6 +1300,7 @@
default:
ast_log(LOG_WARNING, "Don't know how to indicate condition %d on %s\n",
condition, callToken);
+ res = -1;
}
ast_mutex_unlock(&p->lock);
@@ -1299,7 +1309,7 @@
ast_verbose("++++ ooh323_indicate %d on %s\n", condition, callToken);
free(callToken);
- return -1;
+ return res;
}
static int ooh323_queryoption(struct ast_channel *ast, int option, void *data, int *datalen)
@@ -3770,12 +3780,32 @@
return 0;
}
+static format_t ooh323_get_codec(struct ast_channel *chan)
+{
+ struct ooh323_pvt *p = chan->tech_pvt;
+ if (gH323Debug) {
+ ast_verbose("+++ ooh323 get_codec\n");
+ }
+
+ if (gH323Debug) {
+ ast_verbose("--- ooh323 get_codec, %d\n", (int) (chan->nativeformats ? chan->nativeformats : (p ? p->capability : 0)));
+ }
+
+ return chan->nativeformats ? chan->nativeformats :
+ (p ? p->capability : 0);
+}
+
static enum ast_rtp_glue_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp)
{
struct ooh323_pvt *p = NULL;
enum ast_rtp_glue_result res = AST_RTP_GLUE_RESULT_LOCAL;
+ struct ast_sockaddr tmp;
+
+ if (gH323Debug) {
+ ast_verbose("+++ ooh323 get_rtp_peer \n");
+ }
if (!(p = (struct ooh323_pvt *) chan->tech_pvt))
return AST_RTP_GLUE_RESULT_FORBID;
@@ -3786,12 +3816,25 @@
*rtp = p->rtp ? ao2_ref(p->rtp, +1), p->rtp : NULL;
- res = AST_RTP_GLUE_RESULT_LOCAL;
+ /* there must be checking of directmedia setting */
+
+ if (chan->_state != AST_STATE_UP && 0) {
+ res = AST_RTP_GLUE_RESULT_LOCAL;
+ } else {
+ res = AST_RTP_GLUE_RESULT_REMOTE;
+ }
if (ast_test_flag(&global_jbconf, AST_JB_FORCED)) {
res = AST_RTP_GLUE_RESULT_FORBID;
}
+ ast_rtp_instance_get_remote_address(*rtp, &tmp);
+ ast_verbose("ooh323_get_rtp_peer %s:%d\n", ast_sockaddr_stringify_addr(&tmp),
+ ast_sockaddr_port(&tmp));
+ if (gH323Debug) {
+ ast_verbose("--- ooh323 get_rtp_peer, res = %d\n", (int) res);
+ }
+
return res;
}
@@ -3808,7 +3851,9 @@
}
*rtp = p->vrtp ? ao2_ref(p->vrtp, +1), p->vrtp : NULL;
- res = AST_RTP_GLUE_RESULT_LOCAL;
+ /* there must check of supporting video per call */
+ /* res = AST_RTP_GLUE_RESULT_LOCAL; */
+ res = AST_RTP_GLUE_RESULT_FORBID;
return res;
}
@@ -3872,15 +3917,12 @@
{
/* XXX Deal with Video */
struct ooh323_pvt *p;
- struct ast_sockaddr tmp;
- int mode;
+ /* struct ast_sockaddr tmp; */
+ int mode, changed = 0;
+ char *callToken = NULL;
if (gH323Debug)
ast_verbose("--- ooh323_set_peer - %s\n", chan->name);
-
- if (!rtp) {
- return 0;
- }
mode = ooh323_convertAsteriskCapToH323Cap(chan->writeformat);
p = (struct ooh323_pvt *) chan->tech_pvt;
@@ -3888,14 +3930,42 @@
ast_log(LOG_ERROR, "No Private Structure, this is bad\n");
return -1;
}
- ast_rtp_instance_get_remote_address(rtp, &tmp);
- ast_rtp_instance_get_local_address(rtp, &tmp);
+
+ ast_mutex_lock(&p->lock);
+
+ if (rtp) {
+ changed |= ast_rtp_instance_get_and_cmp_remote_address(rtp, &p->redirip);
+ } else if (!ast_sockaddr_isnull(&p->redirip)) {
+ changed = 1;
+ memset(&p->redirip, 0, sizeof(p->redirip));
+ }
+
+ callToken = (p->callToken ? strdup(p->callToken) : NULL);
+
+ if (!callToken) {
+ if (gH323Debug)
+ ast_verbose(" set_rtp_peer - No callToken\n");
+ ast_mutex_unlock(&p->lock);
+ return -1;
+ }
+
+
+ /* ast_rtp_instance_get_remote_address(rtp, &tmp);
+ ast_rtp_instance_get_local_address(rtp, &tmp); */
+ if (changed) {
+ if (!ast_sockaddr_isnull(&p->redirip)) {
+ ast_verbose("ooh323_set_rtp_peer %s:%d\n", ast_sockaddr_stringify_addr(&p->redirip),
+ ast_sockaddr_port(&p->redirip));
+ ooUpdateLogChannels(callToken, ast_sockaddr_stringify_addr(&p->redirip),
+ ast_sockaddr_port(&p->redirip));
+ } else {
+ ast_verbose("ooh323_set_rtp_peer return back to local\n");
+ ooUpdateLogChannels(callToken, "0.0.0.0" , 0);
+ }
+ }
+
+ ast_mutex_unlock(&p->lock);
return 0;
-
-/* May 20101003 */
-/* What functionalty is here? */
-
-
}
@@ -4039,10 +4109,12 @@
/* Find the call or allocate a private structure if call not found */
p = find_call(call);
- if (!p) {
+ if (!p || !p->rtp) {
ast_log(LOG_ERROR, "Something is wrong: rtp\n");
return;
}
+
+ ast_mutex_lock(&p->lock);
ast_parse_arg(remoteIp, PARSE_ADDR, &tmp);
ast_sockaddr_set_port(&tmp, remotePort);
@@ -4051,6 +4123,8 @@
if (p->writeformat & AST_FORMAT_G726_AAL2)
ast_rtp_codecs_payloads_set_rtpmap_type(ast_rtp_instance_get_codecs(p->rtp), p->rtp, 2,
"audio", "G726-32", AST_RTP_OPT_G726_NONSTANDARD);
+
+ ast_mutex_unlock(&p->lock);
if(gH323Debug)
ast_verbose("+++ setup_rtp_connection\n");
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCalls.h
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCalls.h?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCalls.h (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCalls.h Sun Jan 9 15:20:01 2011
@@ -97,6 +97,8 @@
int cap;
int lMediaPort;
int lMediaCntrlPort;
+ int lMediaRedirPort;
+ int lMediaRedirCPort;
char lMediaIP[2+8*4+7];
struct OOMediaInfo *next;
} OOMediaInfo;
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCmdChannel.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCmdChannel.c?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCmdChannel.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooCmdChannel.c Sun Jan 9 15:20:01 2011
@@ -411,6 +411,14 @@
}
break;
+ case OO_CMD_UPDLC:
+ OOTRACEINFO4("Processing UpdLC command %s, localIP is %s, port is %d\n",
+ (char *)cmd.param1, (char *)cmd.param2, *(int *)cmd.param3);
+ if(cmd.param2) {
+ ooUpdateAllLogicalChannels(call, (char *)cmd.param2, *(int *)cmd.param3);
+ }
+ break;
+
default: OOTRACEERR1("ERROR:Unknown command\n");
}
}
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooLogChan.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooLogChan.c?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooLogChan.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooLogChan.c Sun Jan 9 15:20:01 2011
@@ -77,8 +77,9 @@
{
OOTRACEDBGC3("Using configured media info (%s, %s)\n", call->callType,
call->callToken);
- pNewChannel->localRtpPort = pMediaInfo->lMediaPort;
- pNewChannel->localRtcpPort = pMediaInfo->lMediaCntrlPort;
+ pNewChannel->localRtpPort = pMediaInfo->lMediaRedirPort ? pMediaInfo->lMediaRedirPort : pMediaInfo->lMediaPort;
+ /* check MediaRedirPort here because RedirCPort is ReditPort + 1 and can't be 0 ;) */
+ pNewChannel->localRtcpPort = pMediaInfo->lMediaRedirPort ? pMediaInfo->lMediaRedirCPort : pMediaInfo->lMediaCntrlPort;
/* If user application has not specified a specific ip and is using
multihomed mode, substitute appropriate ip.
*/
@@ -284,7 +285,7 @@
call->callType, call->callToken);
pLogicalChannel = ooFindLogicalChannelByLogicalChannelNo(call,channelNo);
- if(!pLogicalChannel)
+ do { if(!pLogicalChannel)
{
OOTRACEWARN4("Logical Channel %d doesn't exist, in clearLogicalChannel."
" (%s, %s)\n",
@@ -326,6 +327,7 @@
ooRemoveLogicalChannel(call, channelNo);/* TODO: efficiency - This causes re-search of
of logical channel in the list. Can be
easily improved.*/
+ } while ((pLogicalChannel = ooFindLogicalChannelByLogicalChannelNo(call,channelNo)));
return OO_OK;
}
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.c?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.c Sun Jan 9 15:20:01 2011
@@ -542,6 +542,64 @@
return OO_STKCMD_SUCCESS;
}
+OOStkCmdStat ooUpdateLogChannels(const char *callToken, const char* localIP, int port)
+{
+ OOStackCommand cmd;
+ OOH323CallData *call;
+
+ if(!callToken)
+ {
+ return OO_STKCMD_INVALIDPARAM;
+ }
+
+ if(!(call = ooFindCallByToken(callToken))) {
+ return OO_STKCMD_INVALIDPARAM;
+ }
+
+ if (localIP == NULL) {
+ 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_UPDLC;
+
+ cmd.param1 = (void*) malloc(strlen(callToken)+1);
+ cmd.param2 = (void*) malloc(strlen(localIP)+1);
+ cmd.param3 = (void*) malloc(sizeof(int)+1);
+ if(!cmd.param1 || !cmd.param2 || !cmd.param3)
+ {
+ if(cmd.param1) free(cmd.param1); /* Release memory */
+ if(cmd.param2) free(cmd.param2);
+ if(cmd.param3) free(cmd.param3);
+ return OO_STKCMD_MEMERR;
+ }
+ strcpy((char*)cmd.param1, callToken);
+ cmd.plen1 = strlen(callToken);
+ strcpy((char*)cmd.param2, localIP);
+ cmd.plen2 = strlen(localIP);
+ *((int *)cmd.param3) = port;
+ cmd.plen3 = sizeof(int)+1;
+
+ if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
+ {
+ free(cmd.param1);
+ free(cmd.param2);
+ free(cmd.param3);
+ return OO_STKCMD_WRITEERR;
+ }
+ free(cmd.param1);
+ free(cmd.param2);
+ free(cmd.param3);
+
+ return OO_STKCMD_SUCCESS;
+}
+
OOStkCmdStat ooRequestChangeMode(const char *callToken, int isT38Mode)
{
OOStackCommand cmd;
@@ -590,7 +648,6 @@
return OO_STKCMD_SUCCESS;
}
-
const char* ooGetStkCmdStatusCodeTxt(OOStkCmdStat stat)
{
switch(stat)
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.h
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.h?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.h (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooStackCmds.h Sun Jan 9 15:20:01 2011
@@ -68,7 +68,8 @@
OO_CMD_MANUALPROGRESS, /*!< Send progress */
OO_CMD_STOPMONITOR, /*!< Stop the event monitor */
OO_CMD_REQMODE, /*!< Request new mode */
- OO_CMD_SETANI /*! <Set conncted info */
+ OO_CMD_SETANI, /*! <Set conncted info */
+ OO_CMD_UPDLC /*! <Update Logical channels */
} OOStackCmdID;
@@ -178,6 +179,7 @@
int ooGenerateOutgoingCallToken (char *callToken, size_t size);
EXTERN OOStkCmdStat ooSetANI(const char *callToken, const char* ani);
+EXTERN OOStkCmdStat ooUpdateLogChannels(const char *callToken, const char* localIP, const int port);
#ifdef __cplusplus
}
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.c Sun Jan 9 15:20:01 2011
@@ -1664,11 +1664,11 @@
}
if (call->versionIP == 6) {
- inet_pton(AF_INET6, call->localIP, iP6Address->network.data);
+ inet_pton(AF_INET6, pLogicalChannel->localIP, iP6Address->network.data);
iP6Address->network.numocts = 16;
iP6Address->tsapIdentifier = pLogicalChannel->localRtpPort;
} else {
- inet_pton(AF_INET, call->localIP, iPAddress->network.data);
+ inet_pton(AF_INET, pLogicalChannel->localIP, iPAddress->network.data);
iPAddress->network.numocts = 4;
iPAddress->tsapIdentifier = pLogicalChannel->localRtpPort;
}
@@ -1688,7 +1688,7 @@
memAlloc(pctxt, sizeof(H245UnicastAddress_iP6Address));
iP6Address1 = unicastAddrs1->u.iP6Address;
memset(iP6Address1, 0, sizeof(H245UnicastAddress_iP6Address));
- inet_pton(AF_INET6, call->localIP, iP6Address1->network.data);
+ inet_pton(AF_INET6, pLogicalChannel->localIP, iP6Address1->network.data);
iP6Address1->network.numocts = 16;
iP6Address1->tsapIdentifier = pLogicalChannel->localRtcpPort;
} else {
@@ -1698,7 +1698,7 @@
iPAddress1 = unicastAddrs1->u.iPAddress;
memset(iPAddress1, 0, sizeof(H245UnicastAddress_iPAddress));
- inet_pton(AF_INET, call->localIP, iPAddress1->network.data);
+ inet_pton(AF_INET, pLogicalChannel->localIP, iPAddress1->network.data);
iPAddress1->network.numocts = 4;
iPAddress1->tsapIdentifier = pLogicalChannel->localRtcpPort;
}
@@ -1719,7 +1719,7 @@
{
epCap->startReceiveChannel(call, pLogicalChannel);
OOTRACEINFO6("Receive channel of type %s started at %s:%d(%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->localIP,
+ ooGetCapTypeText(epCap->cap), pLogicalChannel->localIP,
pLogicalChannel->localRtpPort, call->callType,
call->callToken);
}
@@ -2213,6 +2213,57 @@
return OO_OK;
}
+int ooUpdateAllLogicalChannels(OOH323CallData *call, char* localIP, int port)
+{
+ ooLogicalChannel *temp;
+ OOMediaInfo *pMediaInfo = NULL;
+ char *lIP = localIP;
+
+ if (!lIP || !lIP[0]) {
+ lIP = call->localIP;
+ }
+
+/* close all log chans */
+
+ temp = call->logicalChans;
+ while(temp)
+ {
+ if(temp->state == OO_LOGICALCHAN_ESTABLISHED) {
+ /* Sending closelogicalchannel only for outgoing channels */
+ if(!strcmp(temp->dir, "transmit"))
+ {
+ ooSendCloseLogicalChannel(call, temp);
+ }
+ else{
+ ooSendRequestCloseLogicalChannel(call, temp);
+ }
+ }
+ temp = temp->next;
+ }
+
+
+/* change media address for all caps */
+
+ if(call->mediaInfo)
+ {
+ pMediaInfo = call->mediaInfo;
+ while(pMediaInfo)
+ {
+ strcpy(pMediaInfo->lMediaIP, lIP);
+ pMediaInfo->lMediaRedirPort = port;
+ pMediaInfo->lMediaRedirCPort = port + 1;
+ pMediaInfo = pMediaInfo->next;
+ }
+ }
+
+/* Restart TCS exchange proc - Paul Cadah do it in chan_h323_exts native bridge code */
+
+ call->localTermCapState = OO_LocalTermCapExchange_Idle;
+ ooSendTermCapMsg(call);
+
+ return OO_OK;
+}
+
int ooSendCloseLogicalChannel(OOH323CallData *call, ooLogicalChannel *logicalChan)
{
int ret = OO_OK, error=0;
@@ -2265,7 +2316,8 @@
ooFreeH245Message(call, ph245msg);
/* Stop the media transmission */
- OOTRACEINFO4("Closing logical channel %d (%s, %s)\n",
+ /* Moved to OnReceivedClosedChannelAck */
+ /* OOTRACEINFO4("Closing logical channel %d (%s, %s)\n",
clc->forwardLogicalChannelNumber, call->callType,
call->callToken);
ret = ooClearLogicalChannel(call, clc->forwardLogicalChannelNumber);
@@ -2274,7 +2326,7 @@
OOTRACEERR4("ERROR:Failed to close logical channel %d (%s, %s)\n",
clc->forwardLogicalChannelNumber, call->callType, call->callToken);
return OO_FAILED;
- }
+ } */
if(error) return OO_FAILED;
return ret;
}
@@ -2722,6 +2774,17 @@
H245CloseLogicalChannelAck* clcAck)
{
int ret = OO_OK;
+ /* Stop the media transmission */
+ OOTRACEINFO4("Closing logical channel %d (%s, %s)\n",
+ clcAck->forwardLogicalChannelNumber, call->callType,
+ call->callToken);
+ ret = ooClearLogicalChannel(call, clcAck->forwardLogicalChannelNumber);
+ if(ret != OO_OK)
+ {
+ OOTRACEERR4("ERROR:Failed to close logical channel %d (%s, %s)\n",
+ clcAck->forwardLogicalChannelNumber, call->callType, call->callToken);
+ return OO_FAILED;
+ }
return ret;
}
@@ -3129,9 +3192,9 @@
if(!tcs->m.capabilityTablePresent)
{
// OOTRACEWARN3("Warn:Ignoring TCS as no capability table present(%s, %s)\n",
- OOTRACEWARN3("Empty TCS found. Pausing call...(%s, %s)\n",
+ OOTRACEWARN3("Empty TCS found. (%s, %s)\n",
call->callType, call->callToken);
- call->h245SessionState = OO_H245SESSION_PAUSED;
+ // call->h245SessionState = OO_H245SESSION_PAUSED;
//ooSendTerminalCapabilitySetReject(call, tcs->sequenceNumber,
// T_H245TerminalCapabilitySetReject_cause_unspecified);
//return OO_OK;
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.h
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.h?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.h (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh245.h Sun Jan 9 15:20:01 2011
@@ -289,6 +289,8 @@
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooCloseAllLogicalChannels(struct OOH323CallData *call, char* dir);
+
+EXTERN int ooUpdateAllLogicalChannels(struct OOH323CallData *call, char* localIP, int port);
/**
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooh323.c Sun Jan 9 15:20:01 2011
@@ -1333,7 +1333,8 @@
OOTRACEINFO3("Remote endpoint has rejected fastStart. (%s, %s)\n",
call->callType, call->callToken);
/* Clear all channels we might have created */
- ooClearAllLogicalChannels(call);
+ /* don't need this */
+ /* ooClearAllLogicalChannels(call); */
OO_CLRFLAG (call->flags, OO_M_FASTSTART);
}
}
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c Sun Jan 9 15:20:01 2011
@@ -2001,7 +2001,8 @@
if (/* (!OO_TESTFLAG(call->flags, OO_M_FASTSTART) ||
call->remoteFastStartOLCs.count == 0) && */
!OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
- !call->h245listener && ooCreateH245Listener(call) == OO_OK)
+ ( (!call->h245listener && ooCreateH245Listener(call) == OO_OK) ||
+ (call->h245listener && !call->pH245Channel)))
{
connect->m.h245AddressPresent = TRUE;
if (call->versionIP == 6) {
Modified: team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c Sun Jan 9 15:20:01 2011
@@ -27848,9 +27848,9 @@
}
/* Disable early RTP bridge */
- if (!ast_bridged_channel(chan) && !sip_cfg.directrtpsetup) { /* We are in early state */
- return 0;
- }
+ /* if (!ast_bridged_channel(chan) && !sip_cfg.directrtpsetup) { We are in early state */
+ /* return 0;
+ } */
sip_pvt_lock(p);
if (p->alreadygone) {
@@ -27889,6 +27889,9 @@
p->redircodecs = codecs;
changed = 1;
}
+
+ ast_debug(1,"Early remote bridge, is changed %d\n", changed);
+
if (changed && !ast_test_flag(&p->flags[0], SIP_GOTREFER) && !ast_test_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER)) {
if (chan->_state != AST_STATE_UP) { /* We are in early state */
if (p->do_history)
Modified: team/may/ooh323_ipv6_direct_rtp/main/rtp_engine.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/main/rtp_engine.c?view=diff&rev=301219&r1=301218&r2=301219
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/main/rtp_engine.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/main/rtp_engine.c Sun Jan 9 15:20:01 2011
@@ -1485,6 +1485,8 @@
video_glue1_res = glue1->get_vrtp_info ? glue1->get_vrtp_info(c1, &vinstance1) : AST_RTP_GLUE_RESULT_FORBID;
text_glue1_res = glue1->get_trtp_info ? glue1->get_trtp_info(c1, &tinstance1) : AST_RTP_GLUE_RESULT_FORBID;
+ ast_debug(1,"glues %d, %d, %d, %d\n", audio_glue0_res, audio_glue1_res, video_glue0_res, video_glue1_res);
+
/* If we are carrying video, and both sides are not going to remotely bridge... fail the native bridge */
if (video_glue0_res != AST_RTP_GLUE_RESULT_FORBID && (audio_glue0_res != AST_RTP_GLUE_RESULT_REMOTE || video_glue0_res != AST_RTP_GLUE_RESULT_REMOTE)) {
audio_glue0_res = AST_RTP_GLUE_RESULT_FORBID;
@@ -1498,6 +1500,8 @@
if (audio_glue1_res == AST_RTP_GLUE_RESULT_REMOTE && (video_glue1_res == AST_RTP_GLUE_RESULT_FORBID || video_glue1_res == AST_RTP_GLUE_RESULT_REMOTE) && glue1->get_codec(c1)) {
codec1 = glue1->get_codec(c1);
}
+
+ ast_debug(1,"glues %d, %d, codecs %d, %d\n", audio_glue0_res, audio_glue1_res, (int) codec0, (int) codec1);
/* If any sort of bridge is forbidden just completely bail out and go back to generic bridging */
if (audio_glue0_res != AST_RTP_GLUE_RESULT_REMOTE || audio_glue1_res != AST_RTP_GLUE_RESULT_REMOTE) {
More information about the asterisk-commits
mailing list